Commit 41649148 by jack
2 parents f4df38c8 97441189
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<div class="pull-right"> <div class="pull-right">
<el-button type="primary" @click="submitForm" :loading="aloading" v-if="!(setPageTitle == 'view')">保存</el-button> <el-button type="primary" @click="submitForm" :loading="aloading" v-if="!(setPageTitle == 'view')">保存</el-button>
<el-button @click="handCancle('addUpdateForm')">取消</el-button> <el-button @click="handCancle('addUpdateForm')" :loading="bloading">取消</el-button>
</div> </div>
</div> </div>
</template> </template>
...@@ -86,6 +86,7 @@ export default { ...@@ -86,6 +86,7 @@ export default {
enableStatus: [{ required: true }], enableStatus: [{ required: true }],
// menuIdList: [{ required: true, validator: checkMenu, trigger: "blur" }], // menuIdList: [{ required: true, validator: checkMenu, trigger: "blur" }],
}, },
filterText: "",
treedata: [], treedata: [],
treeLeafData: [], treeLeafData: [],
tenantList: [], tenantList: [],
...@@ -99,6 +100,7 @@ export default { ...@@ -99,6 +100,7 @@ export default {
showTree: false, showTree: false,
checkList: [], checkList: [],
aloading: false, aloading: false,
bloading: false,
expandedKey: [], expandedKey: [],
tenantListElement: {}, tenantListElement: {},
type: 1, type: 1,
...@@ -116,6 +118,11 @@ export default { ...@@ -116,6 +118,11 @@ export default {
: "view"; : "view";
}, },
}, },
watch: {
filterText(val) {
this.$refs.tree.filter(val);
},
},
created() {}, created() {},
mounted() { mounted() {
let _this = this; let _this = this;
...@@ -158,6 +165,7 @@ export default { ...@@ -158,6 +165,7 @@ export default {
this.getInfo(o.id); this.getInfo(o.id);
} }
}, },
methods: { methods: {
// 获取租户列表 // 获取租户列表
getTenantList(params) { getTenantList(params) {
...@@ -257,6 +265,7 @@ export default { ...@@ -257,6 +265,7 @@ export default {
_this.goBack(); _this.goBack();
}) })
.catch((error) => { .catch((error) => {
console.log("错误信息:", error);
_this.aloading = false; _this.aloading = false;
}); });
}); });
...@@ -264,6 +273,7 @@ export default { ...@@ -264,6 +273,7 @@ export default {
// 取消保存 // 取消保存
handCancle(formName) { handCancle(formName) {
this.bloading = true;
this.goBack(); this.goBack();
}, },
...@@ -300,7 +310,7 @@ export default { ...@@ -300,7 +310,7 @@ export default {
} }
let o = res.data || {}; let o = res.data || {};
let typeList = o.typeIds; let typeList = o.typeIds;
console.log(new Date().getTime()); console.log("开始", new Date().getTime());
_this.treeMainWorker(o).then((j) => { _this.treeMainWorker(o).then((j) => {
console.log(_this.newArr); console.log(_this.newArr);
_this.expandedKey = j; _this.expandedKey = j;
...@@ -316,7 +326,7 @@ export default { ...@@ -316,7 +326,7 @@ export default {
_this.$refs.tree.setCheckedKeys(_arr); _this.$refs.tree.setCheckedKeys(_arr);
}, 10); }, 10);
}); });
console.log(new Date().getTime()); console.log("结束", new Date().getTime());
this.addUpdateForm.name = o.name || "暂无"; this.addUpdateForm.name = o.name || "暂无";
this.addUpdateForm.initOrganize = o.tenantId; this.addUpdateForm.initOrganize = o.tenantId;
...@@ -379,6 +389,8 @@ export default { ...@@ -379,6 +389,8 @@ export default {
_this.treedata = _obj.tree; _this.treedata = _obj.tree;
_this.newArr = _obj.data; _this.newArr = _obj.data;
resolve(_obj); resolve(_obj);
//关闭线程
// webWorker.terminate();
}; };
// 监听文件失败 // 监听文件失败
webWorker.onmessageerror = function (e) { webWorker.onmessageerror = function (e) {
...@@ -466,6 +478,8 @@ export default { ...@@ -466,6 +478,8 @@ export default {
let _obj = e.data; let _obj = e.data;
_this.showTree = true; _this.showTree = true;
resolve(_obj.expanded); resolve(_obj.expanded);
//关闭线程
// webWorker.terminate();
}; };
// 监听文件失败 // 监听文件失败
webWorker.onmessageerror = function (e) { webWorker.onmessageerror = function (e) {
...@@ -494,6 +508,9 @@ export default { ...@@ -494,6 +508,9 @@ export default {
position: absolute; position: absolute;
z-index: 10; z-index: 10;
} }
.searchInput {
width: 30%;
}
} }
.pull-right { .pull-right {
margin-top: 20px; margin-top: 20px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!