|
@@ -129,7 +129,12 @@
|
|
|
<template #search>
|
|
|
<hc-search-input v-model="formulaInput" @search="searchFormulaClick" />
|
|
|
</template>
|
|
|
- 111111
|
|
|
+ <hc-table v-loading="formulaTableLoading" :is-index="false" :is-current-row="false" :column="formulaTableColumn" :datas="formulaTableData">
|
|
|
+ <template #action="{ row }">
|
|
|
+ <el-link :type="row.globalFormula === 1 ? 'warning' : 'primary'">全局公式</el-link>
|
|
|
+ <el-link v-show="row.hasPartFormula" :type="row.isSaveFormula === 1 ? 'warning' : 'primary'">节点公式</el-link>
|
|
|
+ </template>
|
|
|
+ </hc-table>
|
|
|
</hc-dialog>
|
|
|
</hc-drawer>
|
|
|
</template>
|
|
@@ -681,19 +686,43 @@ const editElementToPage = async (name) => {
|
|
|
|
|
|
//编辑元素公式
|
|
|
const elementFormulasShow = ref(false)
|
|
|
-const elementFormulasClick = (row) => {
|
|
|
+const elementFormulasClick = async (row) => {
|
|
|
elementFormulasShow.value = true
|
|
|
+ formulaTableLoading.value = true
|
|
|
+ const { data } = await wbsTreeApi.selectFormElements({
|
|
|
+ id: row.pkeyId,
|
|
|
+ type: 0,
|
|
|
+ })
|
|
|
+ const arr = getArrValue(data)
|
|
|
+ formulaTableData.value = arr
|
|
|
+ formulaTableList.value = deepClone(arr)
|
|
|
+ formulaTableLoading.value = false
|
|
|
}
|
|
|
|
|
|
+//元素公式列表
|
|
|
+const formulaTableLoading = ref(false)
|
|
|
+const formulaTableColumn = [
|
|
|
+ { key: 'eName', name: '字段信息' },
|
|
|
+ { key: 'action', name: '操作', width: 160, align: 'center' },
|
|
|
+]
|
|
|
+const formulaTableData = ref([])
|
|
|
+const formulaTableList = ref([])
|
|
|
+
|
|
|
// 搜索元素公式
|
|
|
const formulaInput = ref('')
|
|
|
const searchFormulaClick = () => {
|
|
|
-
|
|
|
+ const arr = formulaTableList.value
|
|
|
+ formulaTableData.value = arr.filter(({ eName }) => {
|
|
|
+ return eName.indexOf(formulaInput.value) > -1
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
//编辑元素公式关闭
|
|
|
const elementFormulasClose = () => {
|
|
|
elementFormulasShow.value = false
|
|
|
+ formulaTableLoading.value = false
|
|
|
+ formulaTableData.value = []
|
|
|
+ formulaTableList.value = []
|
|
|
}
|
|
|
|
|
|
//离开了当前页面
|