Authored by wangtao

文档管理,同步功能

业务删除不能删除父节点
... ... @@ -808,7 +808,11 @@ layui.define(['table', 'form', 'admin', 'layer', 'laytpl', 'common', 'view', 'se
layer.msg('删除成功!', {icon: 1, time: 3000});
loadBusTypeTable();
} else {
layer.msg('删除失败!', {icon: 2, time: 3000});
var msg = "删除失败!";
if(response.msg){
msg = response.msg;
}
layer.msg(msg, {icon: 2, time: 3000});
}
});
});
... ...
... ... @@ -19,7 +19,7 @@
{{node.label }}
</div>
<div :style="{'width':isAdmin()?'70px':'0px'}" v-if="isAdmin()">
<a @click.stop="moveUpWidth(1)" style="margin-right: 10px;cursor: move;" v-if="data.id == 'ywxt'">
<a @click.stop="mergeBus" style="margin-right: 10px;" v-if="data.id == 'ywxt'">
<i class="iconfont icon-daoru-03"></i>
</a>
<a @click.stop="editType(data)" style="margin-right: 10px;" v-if="!data.root">
... ...
... ... @@ -1040,11 +1040,23 @@ export default {
}
/**
* 鼠标放开
* 同步业务树结构
* @param e
*/
const mergeBus = (e) => {
proxy.$global.confirm("同步业务树按照配置信息同步节点(合并、已删除的请在回收站恢复、回收站删除的节点将重新创建),您确认同步吗?", function () {
proxy.$http.get(`/inspection-report/file/build/busTree`, {}, function (res) {
if (res && res.success) {
proxy.$global.showMsg('同步成功!');
getTree();
} else {
let msg = res.msg;
if (msg) {
proxy.$global.showMsg(msg, 'warning');
}
}
})
});
}
return {
... ...
... ... @@ -841,7 +841,11 @@ layui.define(['table', 'form', 'admin', 'layer', 'laytpl', 'common', 'view', 'se
layer.msg('删除成功!', {icon: 1, time: 3000});
loadBusTypeTable();
} else {
layer.msg('删除失败!', {icon: 2, time: 3000});
var msg = "删除失败!";
if(response.msg){
msg = response.msg;
}
layer.msg(msg, {icon: 2, time: 3000});
}
});
});
... ...