物机管理配置
parent
3f836a35a0
commit
5b5b506f4e
|
@ -72,6 +72,19 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="showMenusNavIds.includes('8')" :class="(nav >= 800 && nav < 900) || nav == 8 ? 'head-nav active' : 'head-nav'" style="position: relative" class="has-submenu">
|
||||
<div>物机管理</div>
|
||||
<div class="header-btn-list">
|
||||
<div class="header-btn-list-arrow"></div>
|
||||
<div class="header-btn-list-item" style>
|
||||
<div class="header-btn-list-padding menu-row1" style="text-align: left" :class="getMenuClass(800)">
|
||||
<button v-if="showMenusNavIds.includes('801')" type="button" :class="nav == 801 ? 'active' : ''" class="sub-btn" @click="doNav(801)">机械管理</button>
|
||||
<button v-if="showMenusNavIds.includes('802')" type="button" :class="nav == 802 ? 'active' : ''" class="sub-btn" @click="doNav(802)">材料管理</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8" class="header-center">
|
||||
|
@ -189,7 +202,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
getMenuClass(n) {
|
||||
let cnt=this.showMenusNavIds.filter(d=>+d>=n && +d<=n+99).length;
|
||||
let cnt = this.showMenusNavIds.filter((d) => +d >= n && +d <= n + 99).length;
|
||||
if (cnt > 3) {
|
||||
return "grid3";
|
||||
}
|
||||
|
@ -241,7 +254,7 @@ export default {
|
|||
}
|
||||
this.showMenus = objs;
|
||||
this.$root.showMenus = objs;
|
||||
this.$bus.$emit("getMenus",objs)
|
||||
this.$bus.$emit("getMenus", objs);
|
||||
this.showMenusNavIds = this.showMenus.map((d) => d.navId);
|
||||
let tmps = this.showMenusNavIds.filter((item) => [1, 2, 3, 4, 5, 6, 7].includes(+item));
|
||||
if (!tmps.includes(2) && !this.showMenusNavIds.includes("" + this.nav)) {
|
||||
|
@ -323,6 +336,12 @@ export default {
|
|||
case 502:
|
||||
this.$router.push("/planSchedule");
|
||||
break;
|
||||
case 801:
|
||||
this.$router.push("/machineManage");
|
||||
break;
|
||||
case 802:
|
||||
this.$router.push("/materialManage");
|
||||
break;
|
||||
}
|
||||
},
|
||||
doLogout() {
|
||||
|
|
|
@ -91,25 +91,25 @@ const routes = [
|
|||
path: "/towerCrane",
|
||||
name: "towerCrane",
|
||||
meta: { nav: 304 },
|
||||
component: () => import(/* webpackChunkName: "safetyCheck" */ "../views/safety/towerCrane.vue"),
|
||||
component: () => import(/* webpackChunkName: "towerCrane" */ "../views/safety/towerCrane.vue"),
|
||||
},
|
||||
{
|
||||
path: "/powerIot",
|
||||
name: "powerIot",
|
||||
meta: { nav: 306 },
|
||||
component: () => import(/* webpackChunkName: "safetyCheck" */ "../views/safety/powerIot.vue"),
|
||||
component: () => import(/* webpackChunkName: "powerIot" */ "../views/safety/powerIot.vue"),
|
||||
},
|
||||
{
|
||||
path: "/dumbwaiter",
|
||||
name: "dumbwaiter",
|
||||
meta: { nav: 308 },
|
||||
component: () => import(/* webpackChunkName: "safetyCheck" */ "../views/safety/dumbwaiter.vue"),
|
||||
component: () => import(/* webpackChunkName: "dumbwaiter" */ "../views/safety/dumbwaiter.vue"),
|
||||
},
|
||||
{
|
||||
path: "/aiWarning",
|
||||
name: "aiWarning",
|
||||
meta: { nav: 310 },
|
||||
component: () => import(/* webpackChunkName: "safetyCheck" */ "../views/safety/aiWarning.vue"),
|
||||
component: () => import(/* webpackChunkName: "aiWarning" */ "../views/safety/aiWarning.vue"),
|
||||
},
|
||||
{
|
||||
path: "/qualityCheck",
|
||||
|
@ -121,13 +121,25 @@ const routes = [
|
|||
path: "/photography",
|
||||
name: "photography",
|
||||
meta: { nav: 501 },
|
||||
component: () => import(/* webpackChunkName: "safetyCheck" */ "../views/schedule/photography.vue"),
|
||||
component: () => import(/* webpackChunkName: "photography" */ "../views/schedule/photography.vue"),
|
||||
},
|
||||
{
|
||||
path: "/planSchedule",
|
||||
name: "planSchedule",
|
||||
meta: { nav: 502 },
|
||||
component: () => import(/* webpackChunkName: "safetyCheck" */ "../views/schedule/planSchedule.vue"),
|
||||
component: () => import(/* webpackChunkName: "planSchedule" */ "../views/schedule/planSchedule.vue"),
|
||||
},
|
||||
{
|
||||
path: "/machineManage",
|
||||
name: "machineManage",
|
||||
meta: { nav: 801 },
|
||||
component: () => import(/* webpackChunkName: "machineManage" */ "../views/machmater/machineManage.vue"),
|
||||
},
|
||||
{
|
||||
path: "/materialManage",
|
||||
name: "materialManage",
|
||||
meta: { nav: 802 },
|
||||
component: () => import(/* webpackChunkName: "materialManage" */ "../views/machmater/materialManage.vue"),
|
||||
},
|
||||
];
|
||||
const router = new VueRouter({
|
||||
|
|
|
@ -0,0 +1,100 @@
|
|||
<template>
|
||||
<div class="machine-manage main-page">
|
||||
<el-col :span="6" class="h100">
|
||||
<module-one-1-1 label="设备概况" class="labor-base"> </module-one-1-1>
|
||||
|
||||
<module-one-1-1 label="分类及工时情况" class="labor-base"> </module-one-1-1>
|
||||
|
||||
<module-one-1-1 label="设备运行动态" class="labor-base"> </module-one-1-1>
|
||||
</el-col>
|
||||
<el-col :span="12" class="h100">
|
||||
|
||||
<module-one-2-2 label="项目设备分布总览" class="h77">
|
||||
|
||||
</module-one-2-2>
|
||||
|
||||
<module-one-2-1 label class="no-title no-border h22">
|
||||
|
||||
</module-one-2-1>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6" class="h100">
|
||||
<module-one-1-1 label="操作证情况" class="labor-base"> </module-one-1-1>
|
||||
|
||||
<module-one-1-1 label="打卡管控提示" class="labor-base"> </module-one-1-1>
|
||||
|
||||
<module-one-1-1 label="监控异常预警" class="labor-base"> </module-one-1-1>
|
||||
</el-col>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash.debounce";
|
||||
import request from "@/utils/request";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dpi: "",
|
||||
selProject: null,
|
||||
apiPath:'//jzgj.crfeb.com.cn'
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//物资:https://wzxh.crfeb.com.cn/
|
||||
//机械:https://jzgj.crfeb.com.cn/
|
||||
this.$store.dispatch("ChangeNav", 801);
|
||||
this.$bus.$on(
|
||||
"projectChange",
|
||||
debounce((prj) => {
|
||||
this.selProject = prj;
|
||||
this.init();
|
||||
})
|
||||
);
|
||||
this.selProject = this.$store.getters.selProject;
|
||||
this.init();
|
||||
this.dpi = this.$dpi();
|
||||
window.addEventListener("resize", () => {
|
||||
if (this.dpi != this.$dpi()) {
|
||||
this.dpi = this.$dpi();
|
||||
this.resize();
|
||||
}
|
||||
});
|
||||
this.resize();
|
||||
},
|
||||
methods: {
|
||||
resize() {
|
||||
let is1K = this.$dpi() == "1K";
|
||||
let is2K = this.$dpi() == "2K";
|
||||
this.chartKey++;
|
||||
},
|
||||
init() {
|
||||
let url='//jzgj.crfeb.com.cn/largeScreen/digitalConstruction/getManageQuota'
|
||||
request({
|
||||
url:url,
|
||||
method:"post",
|
||||
data:{
|
||||
deptId:1,
|
||||
projectId:1,
|
||||
app_key:'',
|
||||
app_secret:''
|
||||
}
|
||||
}).then(d=>{
|
||||
console.log("====>",d)
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.machine-manage {
|
||||
.screen-module {
|
||||
&.h77 {
|
||||
height: calc(77% - 20px);
|
||||
}
|
||||
&.h22 {
|
||||
height: calc(22% - 20px);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,84 @@
|
|||
<template>
|
||||
<div class="material-manage main-page">
|
||||
<el-col :span="18" class="h100">
|
||||
<module-one-2-3 label="近期工单" class="h66"> </module-one-2-3>
|
||||
|
||||
<module-one-1-3 label="混凝土使用情况" class="h33"> </module-one-1-3>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6" class="h100">
|
||||
<module-one-3-1 label="超耗情况" class="labor-base h100" style="height: cacl(100% - 20px)"></module-one-3-1>
|
||||
</el-col>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash.debounce";
|
||||
import request from "@/utils/request";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dpi: "",
|
||||
selProject: null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("ChangeNav", 802);
|
||||
this.$bus.$on(
|
||||
"projectChange",
|
||||
debounce((prj) => {
|
||||
this.selProject = prj;
|
||||
this.init();
|
||||
})
|
||||
);
|
||||
this.selProject = this.$store.getters.selProject;
|
||||
this.init();
|
||||
this.dpi = this.$dpi();
|
||||
window.addEventListener("resize", () => {
|
||||
if (this.dpi != this.$dpi()) {
|
||||
this.dpi = this.$dpi();
|
||||
this.resize();
|
||||
}
|
||||
});
|
||||
this.resize();
|
||||
},
|
||||
methods: {
|
||||
resize() {
|
||||
let is1K = this.$dpi() == "1K";
|
||||
let is2K = this.$dpi() == "2K";
|
||||
this.chartKey++;
|
||||
},
|
||||
init() {
|
||||
let url='//wzxh.crfeb.com.cn/MklBaseController/getService'
|
||||
request({
|
||||
url,
|
||||
method:"get",
|
||||
params:{
|
||||
userId:'8401',
|
||||
chinaKey:'135f90b1bdafccab494a937eaccdedac',
|
||||
service:'getProjectChaoHaoStatisticsRPTService',
|
||||
projectId:'547d4de15da511ee9ca5506b4b2ac6ae'
|
||||
}
|
||||
}).then(d=>{
|
||||
console.log("---->",d)
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.material-manage {
|
||||
.screen-module {
|
||||
&.h66 {
|
||||
height: calc(66% - 20px);
|
||||
}
|
||||
&.h100 {
|
||||
height: calc(100% - 20px);
|
||||
}
|
||||
&.h33 {
|
||||
height: calc(33% - 20px);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -67,6 +67,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
userStore:null,
|
||||
currentPrjId: null,
|
||||
currentComId: null,
|
||||
vendorsCode: "",
|
||||
|
@ -170,6 +171,7 @@ export default {
|
|||
mgr: 0,
|
||||
worker: 0,
|
||||
},
|
||||
edu:0
|
||||
};
|
||||
tmps.forEach((d) => {
|
||||
let cnt = d.id * 1;
|
||||
|
|
|
@ -34,7 +34,7 @@ export default {
|
|||
this.currentComId = this.userStore.currentComId;
|
||||
this.vendorsCode = this.userStore.vendorsCode;
|
||||
if (this.vendorsCode == "jgw") {
|
||||
this.vendorsCode="uni"
|
||||
this.vendorsCode = "uni";
|
||||
}
|
||||
this.init();
|
||||
},
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
<div class="mach-config-index app-container">
|
||||
<el-card :header="title" style="width: 30%; min-width: 500px">
|
||||
<el-form :model="form" :rules="rules" label-width="120px" ref="form">
|
||||
<el-form-item label="服务地址" prop="url">
|
||||
<span v-if="mode == 'show'">{{ form.url }}</span>
|
||||
<el-input v-else v-model="form.url" placeholder="请输入服务地址"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户ID" prop="userId">
|
||||
<span v-if="mode == 'show'">{{ form.userId }}</span>
|
||||
<el-input v-else v-model="form.userId" placeholder="请输入用户ID"></el-input>
|
||||
|
@ -10,9 +14,9 @@
|
|||
<span v-if="mode == 'show'">{{ form.chinaKey }}</span>
|
||||
<el-input v-else v-model="form.chinaKey" placeholder="请输入配置key"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目ID" prop="prjId">
|
||||
<span v-if="mode == 'show'">{{ form.prjId }}</span>
|
||||
<el-input v-else v-model="form.prjId" placeholder="请输入项目ID"></el-input>
|
||||
<el-form-item label="项目ID" prop="projectId">
|
||||
<span v-if="mode == 'show'">{{ form.projectId }}</span>
|
||||
<el-input v-else v-model="form.projectId" placeholder="请输入项目ID"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
|
@ -40,13 +44,15 @@ export default {
|
|||
currentPrjId: null,
|
||||
currentComId: null,
|
||||
type: "",
|
||||
cfgData: null,
|
||||
cfgInfo: null,
|
||||
title: "",
|
||||
mode: "show",
|
||||
form: {
|
||||
url:"",
|
||||
userId: "",
|
||||
chinaKey: "",
|
||||
prjId: "",
|
||||
projectId: "",
|
||||
},
|
||||
rules: {
|
||||
userId: {
|
||||
|
@ -59,16 +65,21 @@ export default {
|
|||
message: "请输入配置key",
|
||||
trigger: "blur",
|
||||
},
|
||||
prjId: {
|
||||
projectId: {
|
||||
required: true,
|
||||
message: "请输入项目ID",
|
||||
trigger: "blur",
|
||||
},
|
||||
url: {
|
||||
required: true,
|
||||
message: "请输入服务地址",
|
||||
trigger: "blur",
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.type = this.$route.query.type || "mach";
|
||||
this.type = "mach";
|
||||
this.userStore = useUserStore();
|
||||
this.currentPrjId = this.userStore.currentPrjId;
|
||||
this.currentComId = this.userStore.currentComId;
|
||||
|
@ -84,7 +95,8 @@ export default {
|
|||
this.mode = "edit";
|
||||
this.form.userId = this.cfgInfo?.userId || "";
|
||||
this.form.chinaKey = this.cfgInfo?.chinaKey || "";
|
||||
this.form.prjId = this.cfgInfo?.prjId || "";
|
||||
this.form.projectId = this.cfgInfo?.projectId || "";
|
||||
this.form.url = this.cfgInfo?.url || "";
|
||||
},
|
||||
doSave() {
|
||||
this.$refs.form.validate().then((valid) => {
|
||||
|
@ -93,14 +105,12 @@ export default {
|
|||
comId: this.currentComId,
|
||||
projectId: this.currentPrjId,
|
||||
cfgType: this.type,
|
||||
userId: this.form.userId,
|
||||
chinaKey: this.form.chinaKey,
|
||||
prjId: this.form.prjId,
|
||||
paramData: JSON.stringify(this.form),
|
||||
remark: "",
|
||||
state: 0,
|
||||
};
|
||||
if (this.cfgInfo && this.cfgInfo.id) {
|
||||
data.id = this.cfgInfo.id;
|
||||
if (this.cfgData && this.cfgData.id) {
|
||||
data.id = this.cfgData.id;
|
||||
updateCfg(data).then((d) => {
|
||||
this.$message({
|
||||
message: "修改成功",
|
||||
|
@ -123,10 +133,14 @@ export default {
|
|||
doCancel(cb) {
|
||||
this.mode = "show";
|
||||
listCfg(this.currentPrjId, this.type).then((d) => {
|
||||
this.cfgInfo = d.data.length > 0 ? d.data[0] : null;
|
||||
this.cfgData = d.data.length > 0 ? d.data[0] : null;
|
||||
if (this.cfgData) {
|
||||
this.cfgInfo = this.$tryToJson(this.cfgData.paramData, null);
|
||||
}
|
||||
this.form.userId = this.cfgInfo?.userId || "未配置";
|
||||
this.form.chinaKey = this.cfgInfo?.chinaKey || "未配置";
|
||||
this.form.prjId = this.cfgInfo?.prjId || "未配置";
|
||||
this.form.projectId = this.cfgInfo?.projectId || "未配置";
|
||||
this.form.url = this.cfgInfo?.url || "未配置";
|
||||
cb && cb();
|
||||
});
|
||||
},
|
||||
|
|
|
@ -0,0 +1,166 @@
|
|||
<template>
|
||||
<div class="mach-config-index app-container">
|
||||
<el-card :header="title" style="width: 30%; min-width: 500px">
|
||||
<el-form :model="form" :rules="rules" label-width="120px" ref="form">
|
||||
<el-form-item label="服务地址" prop="url">
|
||||
<span v-if="mode == 'show'">{{ form.url }}</span>
|
||||
<el-input v-else v-model="form.url" placeholder="请输入服务地址"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="部门ID" prop="deptId">
|
||||
<span v-if="mode == 'show'">{{ form.deptId }}</span>
|
||||
<el-input v-else v-model="form.deptId" placeholder="请输入用户ID"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目ID" prop="projectId">
|
||||
<span v-if="mode == 'show'">{{ form.projectId }}</span>
|
||||
<el-input v-else v-model="form.projectId" placeholder="请输入项目ID"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="配置key" prop="app_key">
|
||||
<span v-if="mode == 'show'">{{ form.app_key }}</span>
|
||||
<el-input v-else v-model="form.app_key" placeholder="请输入配置key"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="配置密钥" prop="app_secret">
|
||||
<span v-if="mode == 'show'">{{ form.app_secret }}</span>
|
||||
<el-input v-else v-model="form.app_secret" placeholder="请输入配置密钥"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div v-hasPermi="['machmange:config:edit']">
|
||||
<div v-if="mode == 'show'">
|
||||
<el-button type="primary" @click="doEdit">修改</el-button>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-button type="primary" @click="doSave">保存</el-button>
|
||||
<el-button @click="doCancel()">取消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCfg, deleteCfg, updateCfg, addCfg } from "@/api/manage/machConfig";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userStore: null,
|
||||
currentPrjId: null,
|
||||
currentComId: null,
|
||||
type: "",
|
||||
cfgData: null,
|
||||
cfgInfo: null,
|
||||
title: "",
|
||||
mode: "show",
|
||||
form: {
|
||||
url:"",
|
||||
deptId: "",
|
||||
app_key: "",
|
||||
projectId: "",
|
||||
app_secret:""
|
||||
},
|
||||
rules: {
|
||||
url: {
|
||||
required: true,
|
||||
message: "请输入服务地址",
|
||||
trigger: "blur",
|
||||
},
|
||||
deptId: {
|
||||
required: true,
|
||||
message: "请输入用户ID",
|
||||
trigger: "blur",
|
||||
},
|
||||
app_key: {
|
||||
required: true,
|
||||
message: "请输入配置key",
|
||||
trigger: "blur",
|
||||
},
|
||||
app_secret: {
|
||||
required: true,
|
||||
message: "请输入配置密钥",
|
||||
trigger: "blur",
|
||||
},
|
||||
projectId: {
|
||||
required: true,
|
||||
message: "请输入项目ID",
|
||||
trigger: "blur",
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.type = "mater";
|
||||
this.userStore = useUserStore();
|
||||
this.currentPrjId = this.userStore.currentPrjId;
|
||||
this.currentComId = this.userStore.currentComId;
|
||||
this.title = this.type == "mach" ? "机械管理配置" : "材料管理配置";
|
||||
this.doCancel(() => {
|
||||
if (!this.cfgInfo) {
|
||||
this.doEdit();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doEdit() {
|
||||
this.mode = "edit";
|
||||
this.form.deptId = this.cfgInfo?.deptId || "";
|
||||
this.form.app_key = this.cfgInfo?.app_key || "";
|
||||
this.form.projectId = this.cfgInfo?.projectId || "";
|
||||
this.form.app_secret = this.cfgInfo?.app_secret || "";
|
||||
this.form.url = this.cfgInfo?.url || "";
|
||||
},
|
||||
doSave() {
|
||||
this.$refs.form.validate().then((valid) => {
|
||||
if (valid) {
|
||||
let data = {
|
||||
comId: this.currentComId,
|
||||
projectId: this.currentPrjId,
|
||||
cfgType: this.type,
|
||||
paramData: JSON.stringify(this.form),
|
||||
remark: "",
|
||||
state: 0,
|
||||
};
|
||||
if (this.cfgData && this.cfgData.id) {
|
||||
data.id = this.cfgData.id;
|
||||
updateCfg(data).then((d) => {
|
||||
this.$message({
|
||||
message: "修改成功",
|
||||
type: "success",
|
||||
});
|
||||
this.doCancel();
|
||||
});
|
||||
} else {
|
||||
addCfg(data).then((d) => {
|
||||
this.$message({
|
||||
message: "新增成功",
|
||||
type: "success",
|
||||
});
|
||||
this.doCancel();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
doCancel(cb) {
|
||||
this.mode = "show";
|
||||
listCfg(this.currentPrjId, this.type).then((d) => {
|
||||
this.cfgData = d.data.length > 0 ? d.data[0] : null;
|
||||
if (this.cfgData) {
|
||||
this.cfgInfo = this.$tryToJson(this.cfgData.paramData, null);
|
||||
}
|
||||
this.form.deptId = this.cfgInfo?.deptId || "未配置";
|
||||
this.form.app_key = this.cfgInfo?.app_key || "未配置";
|
||||
this.form.projectId = this.cfgInfo?.projectId || "未配置";
|
||||
this.form.app_secret = this.cfgInfo?.app_secret || "未配置";
|
||||
this.form.url = this.cfgInfo?.url || "未配置";
|
||||
cb && cb();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="mach-config-index"></style>
|
|
@ -45,7 +45,7 @@ export default {
|
|||
});
|
||||
return nodes;
|
||||
};
|
||||
this.dataSource = makeTree(tmps.filter((it) => it.pid == 0));
|
||||
this.dataSource = makeTree(tmps.filter((it) => it.pid == 0)).sort((a,b)=>a.navId*1-b.navId*1);
|
||||
this.$nextTick(()=>{
|
||||
let ids=this.treeData.filter(it=>it.enabled==1).map(it=>it.id);
|
||||
this.$refs.treeRef.setCheckedKeys(ids, false);
|
||||
|
|
Loading…
Reference in New Issue