Authored by 王涛

优化记录模板以及文档管理

@@ -44,7 +44,7 @@ @@ -44,7 +44,7 @@
44 <i class="iconfont icon-icon--download"></i> 44 <i class="iconfont icon-icon--download"></i>
45 下载 45 下载
46 </el-button> 46 </el-button>
47 - <el-button :size="$global.elementSize" @click="showFolder(true,true)" v-if="!canAddFolder"> 47 + <el-button :size="$global.elementSize" @click="showFolder(true,true)" v-if="canAddFolder">
48 <i class="iconfont icon-weidaqiadewenjianjia"></i> 48 <i class="iconfont icon-weidaqiadewenjianjia"></i>
49 新增文件夹 49 新增文件夹
50 </el-button> 50 </el-button>
@@ -79,14 +79,6 @@ @@ -79,14 +79,6 @@
79 </div> 79 </div>
80 <div v-if="activeBtn == 'view'" style="background-color: white" :style="{'height':(height -50) +'px','max-height':(height -50) + 'px','overflow':'auto'}"> 80 <div v-if="activeBtn == 'view'" style="background-color: white" :style="{'height':(height -50) +'px','max-height':(height -50) + 'px','overflow':'auto'}">
81 <div style="text-align: left;margin: 6px;border-bottom: solid 1px #F2F6FC;padding-bottom: 5px;"> 81 <div style="text-align: left;margin: 6px;border-bottom: solid 1px #F2F6FC;padding-bottom: 5px;">
82 - <!--  
83 - <span v-for="(item,index) in historyNode">  
84 - <el-link type="primary" @click="clickTopNav(item,index)" style="margin-left: 5px">  
85 - <i class="el-icon-arrow-right"></i>&nbsp;{{item[props.label]}}  
86 - </el-link>  
87 - </span>  
88 - -->  
89 -  
90 <el-tag v-for="(item,index) in historyNode" :size="$global.elementSize" :key="item.id" closable 82 <el-tag v-for="(item,index) in historyNode" :size="$global.elementSize" :key="item.id" closable
91 @close="tagHandleClose(index)" @click="clickTopNav(item,index)" 83 @close="tagHandleClose(index)" @click="clickTopNav(item,index)"
92 :type="item.id == currentNodeData.id ? 'success' :'info' " 84 :type="item.id == currentNodeData.id ? 'success' :'info' "
@@ -98,9 +90,6 @@ @@ -98,9 +90,6 @@
98 <div v-for="file in dataList" style="width: 120px;margin: 10px;position: relative"> 90 <div v-for="file in dataList" style="width: 120px;margin: 10px;position: relative">
99 <div style="position: absolute;right: 5px"> 91 <div style="position: absolute;right: 5px">
100 <el-checkbox v-model="file.checked" label="" :size="$global.elementSize"></el-checkbox> 92 <el-checkbox v-model="file.checked" label="" :size="$global.elementSize"></el-checkbox>
101 - <!--<el-link type="primary" :underline="false" @click="getFile(file)" style="margin-left: 5px">  
102 - <i class="iconfont icon-icon&#45;&#45;download"></i>  
103 - </el-link>-->  
104 </div> 93 </div>
105 <el-link type="primary" :underline="false" @click="getFile(file)"> 94 <el-link type="primary" :underline="false" @click="getFile(file)">
106 <i class="iconfont " 95 <i class="iconfont "
@@ -108,8 +97,9 @@ @@ -108,8 +97,9 @@
108 style="font-size: 50px;margin-right: 10px;"/> 97 style="font-size: 50px;margin-right: 10px;"/>
109 </el-link> 98 </el-link>
110 <br/> 99 <br/>
111 - <el-link type="info" :underline="false" @click="getFile(file)">  
112 - {{file.fileName}} 100 + <el-link type="info" :underline="false" @click="reNameFile(file,false)" >
  101 + <span v-if="!reNameFileFlg[file.id]">{{file.fileName}}</span>
  102 + <el-input :autofocus="true" v-if="reNameFileFlg[file.id]" placeholder="输入文件名" v-model="file.fileName" @blur="reNameFile(file,true)"></el-input>
113 </el-link> 103 </el-link>
114 </div> 104 </div>
115 <div v-if="dataList.length == 0" style=" text-align: center; width: 100%;"> 105 <div v-if="dataList.length == 0" style=" text-align: center; width: 100%;">
@@ -162,6 +152,6 @@ @@ -162,6 +152,6 @@
162 @hideDialog="showUserDialog"></cm-userright> 152 @hideDialog="showUserDialog"></cm-userright>
163 153
164 <cm-upload :showDialogVisible="showUploadDialogVisible" @callback="uploadCallBack" @hideDialog="showUploadFile" 154 <cm-upload :showDialogVisible="showUploadDialogVisible" @callback="uploadCallBack" @hideDialog="showUploadFile"
165 - :type="currentNodeData.docType" :docNo="currentNodeData.docNo" 155 + type="user" :docNo="currentNodeData.docNo"
166 :category="currentNodeData.id"></cm-upload> 156 :category="currentNodeData.id"></cm-upload>
167 </div> 157 </div>
@@ -36,6 +36,11 @@ export default { @@ -36,6 +36,11 @@ export default {
36 type: Boolean, 36 type: Boolean,
37 default: true 37 default: true
38 }, 38 },
  39 + // 是否是回收站
  40 + isRecycle: {
  41 + type: Boolean,
  42 + default: false
  43 + },
39 44
40 }, 45 },
41 data() { 46 data() {
@@ -190,8 +195,16 @@ export default { @@ -190,8 +195,16 @@ export default {
190 let keyWord = Vue.ref(''); 195 let keyWord = Vue.ref('');
191 196
192 197
  198 +
  199 +
193 // 左侧树 200 // 左侧树
194 let getTree = () => { 201 let getTree = () => {
  202 + // 查询条件
  203 +
  204 + let url = `/inspection-report/file/document/tree`;
  205 + if(props.isRecycle){
  206 + url = `/inspection-report/file/document/tree/recycle`;
  207 + }
195 proxy.$http.get("/inspection-report/file/document/tree", {}, function (res) { 208 proxy.$http.get("/inspection-report/file/document/tree", {}, function (res) {
196 if (res && res.data) { 209 if (res && res.data) {
197 treeData.value = res.data; 210 treeData.value = res.data;
@@ -218,8 +231,12 @@ export default { @@ -218,8 +231,12 @@ export default {
218 types: props.types.join(','), 231 types: props.types.join(','),
219 docIds:docIds 232 docIds:docIds
220 } 233 }
  234 + let url = `/inspection-report/file/document/list`;
  235 + if(props.isRecycle){
  236 + url = `/inspection-report/file/document/recycle`;
  237 + }
221 // 加载列表 238 // 加载列表
222 - proxy.$http.get(`/inspection-report/file/document/list`, params, function (res) { 239 + proxy.$http.get(url , params, function (res) {
223 if (res && res.data) { 240 if (res && res.data) {
224 dataList.value = res.data; 241 dataList.value = res.data;
225 } 242 }
@@ -504,7 +521,7 @@ export default { @@ -504,7 +521,7 @@ export default {
504 * @param index 521 * @param index
505 */ 522 */
506 let clickTopNav = (item,index) =>{ 523 let clickTopNav = (item,index) =>{
507 - let arr = historyNode.value; 524 + // let arr = historyNode.value;
508 // // 删除当前节点后面的路径 525 // // 删除当前节点后面的路径
509 // arr.filter(function (v,i) { 526 // arr.filter(function (v,i) {
510 // if(i > index){ 527 // if(i > index){
@@ -516,6 +533,42 @@ export default { @@ -516,6 +533,42 @@ export default {
516 getPage(item.id); 533 getPage(item.id);
517 } 534 }
518 535
  536 + // 文件更名
  537 + let reNameFileFlg = Vue.ref({});
  538 + let reNameFile = (item,flg) =>{
  539 + let docType = item.docType;
  540 +
  541 + if(!flg){
  542 + if(docType == 'user'){
  543 + reNameFileFlg.value[item.id] = true;
  544 + } else {
  545 + proxy.$global.showMsg("节点名称不能修改!","warning");
  546 + }
  547 + return;
  548 + }
  549 + if(docType == 'user'){
  550 + let type = item.type;
  551 + let url = `/inspection-report/file/rename/doc`;
  552 + if(type == 'folder'){
  553 + url = `/inspection-report/file/rename/user`;
  554 + }
  555 + // 执行改名
  556 + proxy.$http.get(url, {id:item.id,name:item.fileName}, function (res) {
  557 + if (res && res.success) {
  558 + proxy.$global.showMsg('修改成功!');
  559 + } else {
  560 + let msg = res.msg;
  561 + if(msg){
  562 + proxy.$global.showMsg(msg, 'warning');
  563 + }
  564 +
  565 + }
  566 + })
  567 + reNameFileFlg.value[item.id] = false;
  568 + }
  569 +
  570 + }
  571 +
519 572
520 /** 573 /**
521 * 挂载完 574 * 挂载完
@@ -581,7 +634,9 @@ export default { @@ -581,7 +634,9 @@ export default {
581 clickTopNav, 634 clickTopNav,
582 635
583 tagHandleClose, 636 tagHandleClose,
584 - isAdmin 637 + isAdmin,
  638 + reNameFile,
  639 + reNameFileFlg
585 640
586 } 641 }
587 } 642 }
1 -<div> 1 +<div >
2 <!-- 表格--> 2 <!-- 表格-->
3 <el-table :border="showBorder" v-loading="loading" :data="dataList" stripe header-row-class-name="tbl-header-class" :height="height" 3 <el-table :border="showBorder" v-loading="loading" :data="dataList" stripe header-row-class-name="tbl-header-class" :height="height"
4 style="width: 100%;margin: 0px 0px;"> 4 style="width: 100%;margin: 0px 0px;">
@@ -21,7 +21,6 @@ Promise.all([ @@ -21,7 +21,6 @@ Promise.all([
21 .use(vant.Lazyload) // 加载vant 21 .use(vant.Lazyload) // 加载vant
22 22
23 // 全局注册公共组件 23 // 全局注册公共组件
24 -  
25 // 下拉列表资源树 24 // 下拉列表资源树
26 .component('cm-res-type-tree-input', Vue.defineAsyncComponent(() => myImport('components/common/inputrestypetree/index'))) 25 .component('cm-res-type-tree-input', Vue.defineAsyncComponent(() => myImport('components/common/inputrestypetree/index')))
27 // 机房下拉 26 // 机房下拉
@@ -39,6 +38,25 @@ Promise.all([ @@ -39,6 +38,25 @@ Promise.all([
39 // 文档管理 38 // 文档管理
40 .component('cm-document',Vue.defineAsyncComponent(() => myImport('components/common/document/index'))); 39 .component('cm-document',Vue.defineAsyncComponent(() => myImport('components/common/document/index')));
41 40
  41 +
  42 +// // 自定义指令
  43 +// app.directive('permissions', {
  44 +// // 当被绑定的元素插入到 DOM 中时……
  45 +// mounted(el, binding, vnode) {
  46 +// debugger
  47 +// let p = sessionStorage.getItem('permissions')
  48 +// let val = binding.value;
  49 +// if (p && val) {
  50 +// let arr = p.split(',');
  51 +//
  52 +// if (arr.indexOf(val) == -1) {
  53 +// // 删除元素
  54 +// el.parentNode && el.parentNode.removeChild(el)
  55 +// }
  56 +// }
  57 +// }
  58 +// })
  59 +
42 app.config.globalProperties.$global = res[3].default 60 app.config.globalProperties.$global = res[3].default
43 app.config.globalProperties.$http = res[4].default 61 app.config.globalProperties.$http = res[4].default
44 app.mount('#app'); // 挂载Vue的app实例 62 app.mount('#app'); // 挂载Vue的app实例
@@ -6,10 +6,16 @@ let http = { @@ -6,10 +6,16 @@ let http = {
6 !obj.length; 6 !obj.length;
7 return isjson; 7 return isjson;
8 }, 8 },
9 - reqErr: function (status) {  
10 - if (status && status == '401') {  
11 - // 登录超时,刷新当前页面===>跳转到登录页面  
12 - window.location.reload(); 9 + reqErr: function (xhr) {
  10 + try{
  11 +
  12 + let isUnauthorized = xhr.statusText == 'Unauthorized'
  13 + if (isUnauthorized || (xhr && xhr.responseJSON && xhr.responseJSON.resp_code && xhr.responseJSON.resp_code == '401')) {
  14 + // 登录超时,刷新当前页面===>跳转到登录页面
  15 + // window.location.reload();
  16 + window.top.location.href = localStorage.getItem('loginUrl');
  17 + }
  18 + }catch (e){
13 } 19 }
14 }, 20 },
15 post: function (requestUrl, data, callback, errFunc,showLoadding) { 21 post: function (requestUrl, data, callback, errFunc,showLoadding) {
@@ -47,7 +53,7 @@ let http = { @@ -47,7 +53,7 @@ let http = {
47 errFunc(); 53 errFunc();
48 } 54 }
49 console.log("==>", requestUrl, xhr, textStatus) 55 console.log("==>", requestUrl, xhr, textStatus)
50 - http.reqErr(textStatus.status); 56 + http.reqErr(xhr);
51 }, 57 },
52 success: function (data, textStatus, jqXHR) { 58 success: function (data, textStatus, jqXHR) {
53 if (callback) { 59 if (callback) {
@@ -93,7 +99,7 @@ let http = { @@ -93,7 +99,7 @@ let http = {
93 loading.close(); 99 loading.close();
94 } 100 }
95 console.log("==>", requestUrl, xhr, textStatus) 101 console.log("==>", requestUrl, xhr, textStatus)
96 - http.reqErr(textStatus.status); 102 + http.reqErr(xhr);
97 103
98 if (errFunc) { 104 if (errFunc) {
99 errFunc(); 105 errFunc();
  1 +<title>文档管理回收</title>
  2 +<iframe src="/vue3/index.html#/documentRecycle" class="layadmin-iframe" style="height: 99.5%!important;"/>
1 -<div class="container tree-config" :style="{'height':height+'px','max-height':height+'px','overflow':'hidden','padding':'0px'}">  
2 - <el-row :gutter="5">  
3 - <el-col :span="4" >  
4 - <div class="card-item">  
5 - <div class="filter-view">  
6 - <el-input v-model="filterText" size="samll" placeholder="请输入关键字" />  
7 - </div>  
8 - <div :style="{'height':height+'px','max-height':(height - 54)+'px','overflow':'auto','padding':'0px'}">  
9 - <el-tree ref="tree" style="padding:6px;" :props="props" :data="treeData" node-key="id" default-expand-all :expand-on-click-node="false">  
10 - <template #default="{ node, data }">  
11 - <div class="tree-node">  
12 - <div class="tree-node-label">{{ node.label }}</div>  
13 - <div class="tree-node-tools">  
14 - <a @click="append(data)">  
15 - <i class="el-icon-plus"></i>  
16 - </a>  
17 - <a @click="remove(node, data)">  
18 - <i class="el-icon-delete"></i>  
19 - </a>  
20 - </div>  
21 - </div>  
22 - </template>  
23 - </el-tree>  
24 - </div>  
25 - </div>  
26 - </el-col>  
27 - <el-col :span="20" >  
28 - <div class="card-item">  
29 - <div style="padding: 3px 6px;">  
30 - <el-button type="primary" @click="showDialog">添加</el-button>  
31 - <span class="iconfont icon-wenjianjia"></span>  
32 - </div>  
33 - <el-table :data="tableData" style="width: 100%">  
34 - <el-table-column fixed prop="date" label="Date" width="150" />  
35 - <el-table-column prop="name" label="Name" width="120" />  
36 - <el-table-column prop="state" label="State" width="120" />  
37 - <el-table-column prop="city" label="City" width="120" />  
38 - <el-table-column prop="address" label="Address" width="600" />  
39 - <el-table-column prop="zip" label="Zip" width="120" />  
40 - <el-table-column fixed="right" label="Operations" width="120">  
41 - <template #default>  
42 - <el-button type="text" size="small" @click="handleClick">Detail</el-button>  
43 - <el-button type="text" size="small">Edit</el-button>  
44 - </template>  
45 - </el-table-column>  
46 - </el-table>  
47 - </div>  
48 - </el-col>  
49 - </el-row> 1 +<el-row :gutter="5" >
  2 + <el-col :span="3" >
  3 + <div class="cm-card" :style="{'min-height':height+'px','height':'100%'}">
  4 + <div style="text-align: left;padding-left: 10px;padding-top: 3px;font-weight: bold">
  5 + <el-link type="info" :underline="false"><i class="iconfont icon-liebiao"></i> 资源类型</el-link>
  6 + </div>
  7 + <el-tree :data="treeData" :default-expanded-keys="[1]" node-key="id" @node-click="handleConfigNodeClick"/>
  8 + </div>
  9 + </el-col>
  10 + <el-col :span="21" >
  11 + <div class="cm-card" :style="{'min-height':height+'px','height':'100%'}" >
50 12
51 - <el-dialog top="2vh" :title="dialog.title" v-model="dialogVisible" custom-class="config-dialog" width="80%" destroy-on-close>  
52 - <el-tabs v-model="dialog.activeName" @tab-click="handleClick">  
53 - <el-tab-pane label="基本信息" name="jbxx">  
54 - </el-tab-pane>  
55 - <el-tab-pane label="基本信息1" name="jbxx1">  
56 - </el-tab-pane>  
57 - <el-tab-pane label="基本信息2" name="jbxx2">  
58 - </el-tab-pane>  
59 - </el-tabs>  
60 - </el-dialog> 13 + <cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true"
  14 + :showBorder="true" :currentPage="currentPage" :loading="false"
  15 + :showPage="false" :height="(height - 20)">
  16 + <template #default="{row,prop,column}">
  17 + <span v-if="prop == 'resListId'" >{{currentNode.label}}</span>
  18 + <div v-else>
  19 + <div v-if="['showUsers'].indexOf(prop) != -1">
  20 + showUsers
  21 + </div>
  22 + <div v-else-if="['colSort','colWidth'].indexOf(prop) != -1">
  23 + <el-input @blur="changeProperty(row,prop,column)" type="number" size="small" placeholder="请填写"
  24 + v-model="row[prop]">
  25 + <!--<template #suffix>
  26 + <i class="el-icon-edit"/>
  27 + </template>-->
  28 + </el-input>
  29 + </div>
  30 + <div v-else-if="['colIsTd','isQuery','isFilter','status'].indexOf(prop) != -1">
  31 + <!-- 展示下拉选项 -->
  32 + <el-select placeholder="请选择" size="small" style="width: 100%"
  33 + @change="changeProperty(row,prop,column)" v-model="row[prop]" :multiple="false"
  34 + collapse-tags clearable filterable placeholder="请选择">
  35 + <el-option label="是" :value="0"> </el-option>
  36 + <el-option label="否" :value="1"> </el-option>
  37 + </el-select>
  38 + </div>
  39 + <div v-else-if="['colType'].indexOf(prop) != -1">
  40 + <el-select placeholder="选择类型" size="small" style="width: 100%"
  41 + @change="changeProperty(row,prop,column)" v-model="row.colType" :multiple="false"
  42 + collapse-tags clearable filterable placeholder="请选择">
  43 + <el-option v-for="(value,key) in colTypes" :key="index"
  44 + :label="value"
  45 + :value="key">
  46 + </el-option>
  47 + </el-select>
  48 + </div>
  49 + <div v-else-if="['colTypeQueryFields'].indexOf(prop) != -1">
  50 + colTypeQueryFields
  51 + </div>
61 52
62 - <el-dialog top="2vh" title="添加节点" v-model="addDialogVisible" custom-class="config-dialog" width="80%" destroy-on-close>  
63 - {{data}}  
64 - </el-dialog> 53 + <div v-else>
  54 + <el-input @blur="changeProperty(row,prop,column)" size="small" placeholder="请填写"
  55 + prefix-icon="el-icon-edit" v-model="row[prop]">
  56 + <!--<template #suffix>
  57 + <i class="el-icon-loading"/>
  58 + <i class="el-icon-edit"/>
  59 + </template>-->
  60 + </el-input>
  61 + </div>
65 62
66 -</div> 63 + </div>
  64 + </template>
  65 + </cm-table-page>
  66 + </div>
  67 + </el-col>
  68 +</el-row>
  1 +/**
  2 + * 配置页面编辑属性
  3 + * @returns {{editColProps: {}}}
  4 + */
  5 +let configPageEdit = () =>{
  6 + // 编辑属性
  7 + let editColProps = Vue.ref({});
  8 +
  9 + // 配置行编辑
  10 + let changeProperty = (row,prop,column) =>{
  11 +
  12 + }
  13 +
  14 +
  15 +
  16 + return {
  17 + editColProps,changeProperty
  18 + }
  19 +}
  20 +
1 export default { 21 export default {
2 - name: 'treeconfig', 22 + name: 'resConfigIndex',
3 template: '', 23 template: '',
4 - components: {}, 24 + components: {
  25 + 'property-edit': Vue.defineAsyncComponent(
  26 + () => myImport('components/page/assets/propertyedit/index')
  27 + ),
  28 + },
5 data() { 29 data() {
6 return { 30 return {
7 - props : {  
8 - label:'title',  
9 - children:'children' 31 + props: {
  32 + label: 'label',
  33 + children: 'children'
10 } 34 }
11 } 35 }
12 }, 36 },
13 setup() { 37 setup() {
14 - let height = Vue.ref(window.innerHeight - 130);  
15 - const filterText = Vue.ref('');  
16 const {proxy} = Vue.getCurrentInstance(); 38 const {proxy} = Vue.getCurrentInstance();
17 - const treeData = Vue.ref([]);  
18 - const tableData = Vue.ref([]);  
19 - let treeNodeData = Vue.ref({});  
20 -  
21 - const dialog = Vue.ref({  
22 - title: '',  
23 - activeName: ''  
24 - });  
25 - const dialogVisible = Vue.ref(false);  
26 - const addDialogVisible = Vue.ref(false);  
27 - // 添加树节点  
28 - let append = (data) => {  
29 - treeNodeData.value = data;  
30 - addDialogVisible.value = true;  
31 - // const newChild = {  
32 - // id: 1111,  
33 - // title: 'testtest',  
34 - // children: []  
35 - // }  
36 - // if (!data.children) {  
37 - // data.children = []  
38 - // }  
39 - // data.children.push(newChild)  
40 - // this.dataSource = [...this.dataSource]  
41 - }  
42 -  
43 - // 删除树节点  
44 - let remove = (node, data) => {  
45 - const parent = node.parent  
46 - const children = parent.data.children || parent.data  
47 - const index = children.findIndex((d) => d.id === data.id)  
48 - children.splice(index, 1)  
49 - this.dataSource = [...this.dataSource]  
50 - } 39 + let height = Vue.ref((window.innerHeight - 10) * 0.8);
  40 + let currentNode = Vue.ref({});
  41 + let treeData = Vue.ref([]);
51 42
52 - // 筛选  
53 - let filterNode = (value) => {  
54 - if (!value) return true  
55 43
56 - let arr = data.filter(function (v) {  
57 - if (v.label.indexOf(value) != -1) {  
58 - return v;  
59 - }  
60 - })  
61 - console.log(arr);  
62 - return arr;  
63 - }  
64 -  
65 -  
66 - // 弹框  
67 - let showDialog = () => {  
68 - dialogVisible.value = true;  
69 - } 44 + let dataList = Vue.ref([]);
  45 + let columns = Vue.ref([]);
  46 + let colTypes = Vue.ref({});
70 47
71 - // 调用接口  
72 // 获取左侧树结构 48 // 获取左侧树结构
73 let loadTree = () => { 49 let loadTree = () => {
74 - proxy.$http.get("/api-web/home/resType/getTree?notExist=machineroom&table=resources&exist=HOST_MINICOMPUTER_SERVER", {}, function (res) { 50 + proxy.$http.get("/api-web/v32/res/list/config/tree", {}, function (res) {
75 if (res && res.data) { 51 if (res && res.data) {
76 - treeData.value = res.data 52 + treeData.value = res.data
  53 + currentNode.value = res.data[0];
  54 +
  55 + getConfigData();
77 } 56 }
78 }); 57 });
79 } 58 }
80 59
81 - // 监听编辑状态  
82 - Vue.watch(() => filterText.value, (newValue, oldVlaue) => {  
83 - proxy.$refs.tree.filter(newValue)  
84 - }); 60 + let getConfigData = () => {
  61 + if (currentNode.value) {
  62 + // 查询参数
  63 + let params = {
  64 + treeNodeId: currentNode.value.id
  65 + }
  66 + proxy.$http.get(`/api-web/v32/res/list/config`, params, function (res) {
  67 + if (res && res.object) {
  68 + columns.value = res.object.columns;
  69 + dataList.value = res.object.datas;
  70 + colTypes.value = res.object.colTypes;
  71 + }
  72 + });
  73 + }
  74 + }
  75 +
  76 + let handleConfigNodeClick = (data) => {
  77 + if (data) {
  78 + currentNode.value = data;
  79 + getConfigData();
  80 + }
  81 + }
85 82
86 // 挂载完 83 // 挂载完
87 Vue.onMounted(() => { 84 Vue.onMounted(() => {
88 loadTree(); 85 loadTree();
89 - console.log('onMounted');  
90 - })  
91 - 86 + });
92 87
93 return { 88 return {
94 height, 89 height,
  90 + dataList,
  91 + columns,
  92 + colTypes,
95 treeData, 93 treeData,
96 - append,  
97 - remove,  
98 - filterText,  
99 - filterNode,  
100 - showDialog,  
101 - dialogVisible,  
102 - tableData,  
103 - dialog,  
104 - treeNodeData 94 + currentNode,
  95 + handleConfigNodeClick,
  96 + changeProperty
105 } 97 }
106 } 98 }
107 } 99 }
@@ -44,6 +44,11 @@ const routes = [{ @@ -44,6 +44,11 @@ const routes = [{
44 component: () => myImport('views/documentationManagement/index') 44 component: () => myImport('views/documentationManagement/index')
45 },{ 45 },{
46 46
  47 + path: '/documentRecycle',
  48 + name: 'documentRecycle',
  49 + component: () => myImport('views/documentationManagement/documentRecycle')
  50 + },{
  51 +
47 path: '/operationMaintenance', 52 path: '/operationMaintenance',
48 name: 'operationMaintenance', 53 name: 'operationMaintenance',
49 component: () => myImport('views/operationMaintenance/index') 54 component: () => myImport('views/operationMaintenance/index')
  1 +<div class="container">
  2 + <cm-document></cm-document>
  3 +</div>
  1 +export default {
  2 + name: 'documentationManagement',
  3 + template: '',
  4 + setup(props, {attrs, slots, emit}) {
  5 + const { proxy } = Vue.getCurrentInstance()
  6 +
  7 + Vue.onMounted(() => {
  8 +
  9 + })
  10 +
  11 + return {
  12 +
  13 + };
  14 + },
  15 +}
@@ -10,23 +10,27 @@ @@ -10,23 +10,27 @@
10 </el-col> 10 </el-col>
11 <el-col :span="21" > 11 <el-col :span="21" >
12 <div class="cm-card" :style="{'min-height':height+'px','height':'100%'}" > 12 <div class="cm-card" :style="{'min-height':height+'px','height':'100%'}" >
13 - <div style="height: 80px;text-align: left;width: 80%;margin-left: 10px;margin-top: 10px;">  
14 - <el-form :inline="true" :model="searchForm" class="demo-form-inline">  
15 - <el-form-item label="资源名称">  
16 - <el-input v-model="searchForm.resName" placeholder="请输入资源名称"></el-input>  
17 - </el-form-item> 13 + <div style="height: 50px;text-align: left;margin-left: 10px;margin-top: 10px;display: flex">
  14 + <div style="width: calc(100% - 100px)">
  15 + <el-form :inline="true" :model="searchForm" class="demo-form-inline">
  16 + <el-form-item label="资源名称">
  17 + <el-input v-model="searchForm.resName" placeholder="请输入资源名称"></el-input>
  18 + </el-form-item>
18 19
19 - <el-form-item>  
20 - <el-button type="primary" @click="onSubmit">查询</el-button>  
21 - </el-form-item>  
22 - </el-form>  
23 - </div>  
24 - <div style="padding: 3px 6px;text-align: right">  
25 - <el-button type="primary" @click="showConfigDialog(true)">配置</el-button> 20 + <el-form-item>
  21 + <el-button @click="onSubmit">查询</el-button>
  22 +
  23 + </el-form-item>
  24 + </el-form>
  25 + </div>
  26 + <div style="width: 100px">
  27 + <el-button type="primary" @click="showConfigDialog(true)">配置</el-button>
  28 + </div>
26 </div> 29 </div>
  30 +
27 <cm-table-page :columns="obj.columns" :dataList="obj.maps" @loaddata="getPage" :showIndex="true" 31 <cm-table-page :columns="obj.columns" :dataList="obj.maps" @loaddata="getPage" :showIndex="true"
28 :showBorder="true" :currentPage="currentPage" :total="total" :loading="false" 32 :showBorder="true" :currentPage="currentPage" :total="total" :loading="false"
29 - :showPage="true" :height="(height - 130)"> 33 + :showPage="true" :height="(height - 95)">
30 <template #default="{row,prop,column}"> 34 <template #default="{row,prop,column}">
31 <a href="javascript:void(0)" v-if="prop == 'resPositon' || prop == 'cabinetNo'" style="border-bottom: solid 1px blue;margin-bottom: 3px;height: 30px;font-size: 15px;" @click="cellClick(row,prop,column)">{{row[prop]}}</a> 35 <a href="javascript:void(0)" v-if="prop == 'resPositon' || prop == 'cabinetNo'" style="border-bottom: solid 1px blue;margin-bottom: 3px;height: 30px;font-size: 15px;" @click="cellClick(row,prop,column)">{{row[prop]}}</a>
32 <el-link v-else :underline="false" @click="item.click(scope.row)">{{row[prop]}}</el-link> 36 <el-link v-else :underline="false" @click="item.click(scope.row)">{{row[prop]}}</el-link>
@@ -48,17 +52,12 @@ @@ -48,17 +52,12 @@
48 {{cellDetail.row[cellDetail.prop]}}布局图 52 {{cellDetail.row[cellDetail.prop]}}布局图
49 </div> 53 </div>
50 </div> 54 </div>
51 - <!--<img v-if="cellDetail.prop == 'cabinetNo'" :src="cabinetNoSrc" @click="openCabinet(false)" style="width: 80%">  
52 - <img v-if="cellDetail.prop == 'resPositon'" src="/vue3/src/assets/images/res/img02.jpg" style="width: 80%">-->  
53 - <!--<div v-if="cellDetail.prop == 'cabinetNo'" :style="{'background-image':'url(/vue3/src/assets/images/res/img01.png)'}" > </div>  
54 - <div v-if="cellDetail.prop == 'resPositon'" :style="{'background-image':'url(/vue3/src/assets/images/res/img02.png)'}" > </div>-->  
55 -  
56 </template> 55 </template>
57 </cm-dialog> 56 </cm-dialog>
58 57
59 - <cm-dialog :title="dialogDetail.title" width="80%" :showDialogVisible="showConfig" :showFooter="false" @hidedialog="showConfigDialog" :showOkBtn="false" cancelText="关闭"> 58 + <cm-dialog :title="configObj.title" width="80%" :showDialogVisible="showConfig" :showFooter="false" @hidedialog="showConfigDialog" :showOkBtn="false" cancelText="关闭">
60 <template v-slot> 59 <template v-slot>
61 - 60 + <res-config/>
62 </template> 61 </template>
63 </cm-dialog> 62 </cm-dialog>
64 </div> 63 </div>
1 -// 获取状态 1 +// 资源配置
2 const configPage = () => { 2 const configPage = () => {
3 // 展示配置弹框 3 // 展示配置弹框
4 let dialogFlg = Vue.ref(false); 4 let dialogFlg = Vue.ref(false);
5 - let dialogDetail = Vue.ref({ 5 + let configPage = Vue.ref({
6 title: '资源属性配置', 6 title: '资源属性配置',
7 }); 7 });
8 8
  9 +
9 let showConfigDialog = (flg) => { 10 let showConfigDialog = (flg) => {
10 dialogFlg.value = flg; 11 dialogFlg.value = flg;
11 } 12 }
12 13
  14 +
  15 +
13 return { 16 return {
14 showConfig: dialogFlg, 17 showConfig: dialogFlg,
15 - showConfigDialog,  
16 - dialogDetail  
17 - 18 + configObj:configPage,
  19 + showConfigDialog
18 } 20 }
19 } 21 }
  22 +
  23 +
20 export default { 24 export default {
21 name: 'resIndex', 25 name: 'resIndex',
22 template: '', 26 template: '',
23 components: { 27 components: {
24 - 'tree-config': Vue.defineAsyncComponent( 28 + 'res-config': Vue.defineAsyncComponent(
25 () => myImport('components/page/res/treeconfig/index') 29 () => myImport('components/page/res/treeconfig/index')
26 ), 30 ),
27 }, 31 },
@@ -73,7 +77,7 @@ export default { @@ -73,7 +77,7 @@ export default {
73 let params = { 77 let params = {
74 page: 1, 78 page: 1,
75 limit: 10, 79 limit: 10,
76 - treeNodId: currentNode.value.id, 80 + treeNodeId: currentNode.value.id,
77 query: {} 81 query: {}
78 } 82 }
79 proxy.$http.get(`/api-web/v32/res/list`, params, function (res) { 83 proxy.$http.get(`/api-web/v32/res/list`, params, function (res) {
@@ -111,9 +115,11 @@ export default { @@ -111,9 +115,11 @@ export default {
111 } else { 115 } else {
112 cabinetNoSrc.value = "/vue3/src/assets/images/res/img03.jpg" 116 cabinetNoSrc.value = "/vue3/src/assets/images/res/img03.jpg"
113 } 117 }
114 -  
115 } 118 }
116 119
  120 + // 配置页面
  121 + const {showConfig, configObj, showConfigDialog} = configPage()
  122 +
117 // 挂载完 123 // 挂载完
118 Vue.onMounted(() => { 124 Vue.onMounted(() => {
119 loadTree(); 125 loadTree();
@@ -122,8 +128,6 @@ export default { @@ -122,8 +128,6 @@ export default {
122 }) 128 })
123 129
124 130
125 - // 配置页面  
126 - const {showConfig, showConfigDialog, dialogDetail} = configPage()  
127 return { 131 return {
128 132
129 currentNode, 133 currentNode,
@@ -143,7 +147,7 @@ export default { @@ -143,7 +147,7 @@ export default {
143 total, 147 total,
144 148
145 // 配置页面 149 // 配置页面
146 - showConfig, showConfigDialog, dialogDetail, 150 + showConfig, configObj, showConfigDialog
147 } 151 }
148 } 152 }
149 } 153 }