|
@@ -323,6 +323,7 @@ import WbsTree from "./components/WbsTree.vue"
|
|
import {getTokenHeader} from '~src/api/request/header';
|
|
import {getTokenHeader} from '~src/api/request/header';
|
|
import {getStoreData, setStoreData} from '~src/utils/storage'
|
|
import {getStoreData, setStoreData} from '~src/utils/storage'
|
|
import {isType, deepClone, formValidate} from "vue-utils-plus"
|
|
import {isType, deepClone, formValidate} from "vue-utils-plus"
|
|
|
|
+import {getDictionary} from "~api/other"
|
|
import wbsApi from "~api/data-fill/wbs"
|
|
import wbsApi from "~api/data-fill/wbs"
|
|
import Draggable from "vuedraggable";
|
|
import Draggable from "vuedraggable";
|
|
|
|
|
|
@@ -544,6 +545,7 @@ const setTreeMenuDataClick = ({key,node,data}) => {
|
|
if (key === 'mark' || key === 'cancel_mark') {
|
|
if (key === 'mark' || key === 'cancel_mark') {
|
|
firstItemBox()
|
|
firstItemBox()
|
|
} else if (key === 'edit') {
|
|
} else if (key === 'edit') {
|
|
|
|
+ getDictionaryApi(data?.type)
|
|
if (tabKey === 'tree') {
|
|
if (tabKey === 'tree') {
|
|
const parent = deepClone(node?.parent?.data || {})
|
|
const parent = deepClone(node?.parent?.data || {})
|
|
formEditNodeModel.value = {...deepClone(data), parent: parent}
|
|
formEditNodeModel.value = {...deepClone(data), parent: parent}
|
|
@@ -592,6 +594,14 @@ const setTreeMenuDataClick = ({key,node,data}) => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+//获取节点类型
|
|
|
|
+const getDictionaryApi = async (type) => {
|
|
|
|
+ const { error, code, data } = await getDictionary({
|
|
|
|
+ wbs_node_type: type,
|
|
|
|
+ })
|
|
|
|
+ console.log(data)
|
|
|
|
+}
|
|
|
|
+
|
|
//上传前
|
|
//上传前
|
|
const loadingReactive = ref(null)
|
|
const loadingReactive = ref(null)
|
|
const beforeUpload = () => {
|
|
const beforeUpload = () => {
|
|
@@ -664,7 +674,14 @@ const firstItemHttp = async (info) => {
|
|
|
|
|
|
//编辑节点
|
|
//编辑节点
|
|
const editNodeModal = ref(false)
|
|
const editNodeModal = ref(false)
|
|
-const nodeTypeData = ref([{label: "分项工程", value: 1}, {label: "分部工程", value: 2}])
|
|
|
|
|
|
+const nodeTypeData = ref([
|
|
|
|
+ {label: "单位工程", value: 1},
|
|
|
|
+ {label: "分项工程", value: 2},
|
|
|
|
+ {label: "子分项工程", value: 3},
|
|
|
|
+ {label: "分部工程", value: 4},
|
|
|
|
+ {label: "子分部工程", value: 5},
|
|
|
|
+ {label: "工序", value: 6},
|
|
|
|
+])
|
|
const formEditNodeRef = ref(null)
|
|
const formEditNodeRef = ref(null)
|
|
const formEditNodeModel = ref({})
|
|
const formEditNodeModel = ref({})
|
|
const formEditNodeRules = {
|
|
const formEditNodeRules = {
|