|
@@ -283,6 +283,7 @@
|
|
v-model="editFormulaShow"
|
|
v-model="editFormulaShow"
|
|
:table-id="tableId"
|
|
:table-id="tableId"
|
|
@close="editFormulaClose"
|
|
@close="editFormulaClose"
|
|
|
|
+ @formula="toFormulaClick"
|
|
/>
|
|
/>
|
|
</hc-drawer>
|
|
</hc-drawer>
|
|
<!-- 节点参数设置 -->
|
|
<!-- 节点参数设置 -->
|
|
@@ -293,12 +294,19 @@
|
|
:node-info="nodeInfo"
|
|
:node-info="nodeInfo"
|
|
@close="nodeParamClose"
|
|
@close="nodeParamClose"
|
|
/>
|
|
/>
|
|
|
|
+ <!-- 编辑公式 -->
|
|
|
|
+ <HcEditFormula
|
|
|
|
+ v-model="isEditFormulaShow"
|
|
|
|
+ :data="editFormulaData"
|
|
|
|
+ @finish="editFormulaFinish"
|
|
|
|
+ />
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import { nextTick, onMounted, ref, watch } from 'vue'
|
|
import { nextTick, onMounted, ref, watch } from 'vue'
|
|
import { HcDelMsg } from 'hc-vue3-ui'
|
|
import { HcDelMsg } from 'hc-vue3-ui'
|
|
import { getDictionaryData, getDictionaryName } from '~src/utils/tools'
|
|
import { getDictionaryData, getDictionaryName } from '~src/utils/tools'
|
|
|
|
+import HcEditFormula from '~src/views/project/list/edit-formula.vue'
|
|
import { getStoreValue, setStoreValue } from '~uti/storage'
|
|
import { getStoreValue, setStoreValue } from '~uti/storage'
|
|
import tableSort from './table-sort.vue'
|
|
import tableSort from './table-sort.vue'
|
|
import editFormulaDialog from './edit-formula-dialog.vue'
|
|
import editFormulaDialog from './edit-formula-dialog.vue'
|
|
@@ -780,9 +788,13 @@ const showInfoClick = () => {
|
|
const editFormulaShow = ref(false)
|
|
const editFormulaShow = ref(false)
|
|
const editFormulaClose = () => {
|
|
const editFormulaClose = () => {
|
|
editFormulaShow.value = false
|
|
editFormulaShow.value = false
|
|
|
|
+ elementFormulasObj.value = {}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+const elementFormulasObj = ref({})
|
|
const editFormulaClick = (row) => {
|
|
const editFormulaClick = (row) => {
|
|
const { id } = nodeInfo.value
|
|
const { id } = nodeInfo.value
|
|
|
|
+ elementFormulasObj.value = row
|
|
if (id) {
|
|
if (id) {
|
|
tableId.value = row.id
|
|
tableId.value = row.id
|
|
editFormulaShow.value = true
|
|
editFormulaShow.value = true
|
|
@@ -790,6 +802,44 @@ const editFormulaClick = (row) => {
|
|
window.$message.warning('请先选择左侧节点')
|
|
window.$message.warning('请先选择左侧节点')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+//公式
|
|
|
|
+const editFormulaData = ref({})
|
|
|
|
+const isEditFormulaShow = ref(false)
|
|
|
|
+const toFormulaClick = async ({ type, data }) => {
|
|
|
|
+ const { id } = getObjValue(dataInfo.value)
|
|
|
|
+ if (type === 'global') {
|
|
|
|
+ //全局公式
|
|
|
|
+ editFormulaData.value = {
|
|
|
|
+ node: data,
|
|
|
|
+ wbsId: id,
|
|
|
|
+ nodeId: nodeDetail.value.id,
|
|
|
|
+ eleId: data.id,
|
|
|
|
+ eleType: false,
|
|
|
|
+ tableType: true,
|
|
|
|
+ globalType: 1,
|
|
|
|
+ }
|
|
|
|
+ await nextTick()
|
|
|
|
+ isEditFormulaShow.value = true
|
|
|
|
+ } else if (type === 'node') {
|
|
|
|
+ //节点公式
|
|
|
|
+ editFormulaData.value = {
|
|
|
|
+ node: nodeDetail.value,
|
|
|
|
+ wbsId: id,
|
|
|
|
+ nodeId: nodeDetail.value.id,
|
|
|
|
+ eleId: data.id,
|
|
|
|
+ globalType: 2,
|
|
|
|
+ }
|
|
|
|
+ await nextTick()
|
|
|
|
+ isEditFormulaShow.value = true
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//公式操作完成
|
|
|
|
+const editFormulaFinish = () => {
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
//节点参数设置
|
|
//节点参数设置
|
|
const nodeParamShow = ref(false)
|
|
const nodeParamShow = ref(false)
|
|
const nodeParamClose = () => {
|
|
const nodeParamClose = () => {
|