|
@@ -155,73 +155,11 @@ export default {
|
|
|
remark:'test',
|
|
|
},
|
|
|
detail: {
|
|
|
- name: "test",
|
|
|
- deptType: "1",
|
|
|
+ name: "",
|
|
|
+ deptType: "",
|
|
|
},
|
|
|
treeProps: { children: "children", label: "name" },
|
|
|
superiorValue: [],
|
|
|
- superiorOptions: [
|
|
|
- {
|
|
|
- value: "guide",
|
|
|
- label: "Guide",
|
|
|
- children: [
|
|
|
- {
|
|
|
- value: "disciplines",
|
|
|
- label: "Disciplines",
|
|
|
- children: [
|
|
|
- {
|
|
|
- value: "consistency",
|
|
|
- label: "Consistency",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "feedback",
|
|
|
- label: "Feedback",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "efficiency",
|
|
|
- label: "Efficiency",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "controllability",
|
|
|
- label: "Controllability",
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- value: "navigation",
|
|
|
- label: "Navigation",
|
|
|
- children: [
|
|
|
- {
|
|
|
- value: "side nav",
|
|
|
- label: "Side Navigation",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "top nav",
|
|
|
- label: "Top Navigation",
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- value: "resource",
|
|
|
- label: "Resource",
|
|
|
- children: [
|
|
|
- {
|
|
|
- value: "axure",
|
|
|
- label: "Axure Components",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "sketch",
|
|
|
- label: "Sketch Templates",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "docs",
|
|
|
- label: "Design Documentation",
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
treedata: [],
|
|
|
});
|
|
|
const seeDetail = (val) =>{
|
|
@@ -252,10 +190,13 @@ export default {
|
|
|
requestApi = editTreeitem
|
|
|
}
|
|
|
let res = await axios.post(requestApi, apidata)
|
|
|
- console.log('async',res);
|
|
|
- data.show = false;
|
|
|
+ getTreedata()
|
|
|
+ data.detail = {}
|
|
|
+ data.show = false
|
|
|
+ data.superiorValue = []
|
|
|
+ console.log('async',res,data);
|
|
|
+ getApp().$ref.form.resetFields()
|
|
|
getApp().$confirm('组织创建成功', '删除')
|
|
|
- // data.tipsShow = true;
|
|
|
};
|
|
|
const insertProject = (val) => {
|
|
|
console.log('insertProject',val.id);
|
|
@@ -270,7 +211,8 @@ export default {
|
|
|
data.show = true;
|
|
|
};
|
|
|
const handleChange = (val) => {
|
|
|
- console.log("点击handleChange", val,data.superiorValue);
|
|
|
+ data.detail.parentId = val&&val[val.length-1]
|
|
|
+ console.log("点击handleChange", val.length,data);
|
|
|
|
|
|
};
|
|
|
const loadNode = (node, resolve) => {
|
|
@@ -296,15 +238,18 @@ export default {
|
|
|
const remove = async (val) => {
|
|
|
let isOk = await getApp().$confirm('当前组织下尚存在用户或绑定的相机,删除组织将一并删除,确认要删除组织吗?', '删除')
|
|
|
if(isOk){
|
|
|
- let res = await axios.post(delTreeitem+val, {})
|
|
|
+ let res = await axios.post(delTreeitem+val)
|
|
|
console.log("isOk",isOk, val,res);
|
|
|
getApp().$message({message: '删除成功', type: 'success'});
|
|
|
+ getTreedata()
|
|
|
}
|
|
|
};
|
|
|
-
|
|
|
- onMounted(async ()=>{
|
|
|
+ const getTreedata = async () =>{
|
|
|
let res = await axios.get(getTreeselect, {})
|
|
|
data.treedata = res.data
|
|
|
+ }
|
|
|
+ onMounted(async ()=>{
|
|
|
+ getTreedata()
|
|
|
})
|
|
|
return {
|
|
|
// treedata,
|