Authored by 王涛

代码优化

Showing 32 changed files with 232 additions and 96 deletions
  1 +-- 菜单管理编辑后无法保存,数据库字段"moduleid"长度太短,导致SQL报错
  2 +ALTER TABLE sys_menu MODIFY COLUMN moduleid VARCHAR(100) COMMENT '模块id';
  1 +文档管理表结构修改
  2 +V1015_2_增加文档管理表字段.sql
  3 +
  4 +新版资源列表 (依赖11个视图)
  5 +V1015_3_v32资源视图树结构表结构.sql
  6 +V1015_4_v32资源视图表结构.sql
@@ -55,6 +55,12 @@ @@ -55,6 +55,12 @@
55 <ul class="icon_lists dib-box"> 55 <ul class="icon_lists dib-box">
56 56
57 <li class="dib"> 57 <li class="dib">
  58 + <span class="icon iconfont">&#xe752;</span>
  59 + <div class="name">搜索</div>
  60 + <div class="code-name">&amp;#xe752;</div>
  61 + </li>
  62 +
  63 + <li class="dib">
58 <span class="icon iconfont">&#xe610;</span> 64 <span class="icon iconfont">&#xe610;</span>
59 <div class="name">目标库</div> 65 <div class="name">目标库</div>
60 <div class="code-name">&amp;#xe610;</div> 66 <div class="code-name">&amp;#xe610;</div>
@@ -492,9 +498,9 @@ @@ -492,9 +498,9 @@
492 <pre><code class="language-css" 498 <pre><code class="language-css"
493 >@font-face { 499 >@font-face {
494 font-family: 'iconfont'; 500 font-family: 'iconfont';
495 - src: url('iconfont.woff2?t=1633773106250') format('woff2'),  
496 - url('iconfont.woff?t=1633773106250') format('woff'),  
497 - url('iconfont.ttf?t=1633773106250') format('truetype'); 501 + src: url('iconfont.woff2?t=1634540750988') format('woff2'),
  502 + url('iconfont.woff?t=1634540750988') format('woff'),
  503 + url('iconfont.ttf?t=1634540750988') format('truetype');
498 } 504 }
499 </code></pre> 505 </code></pre>
500 <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3> 506 <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -521,6 +527,15 @@ @@ -521,6 +527,15 @@
521 <ul class="icon_lists dib-box"> 527 <ul class="icon_lists dib-box">
522 528
523 <li class="dib"> 529 <li class="dib">
  530 + <span class="icon iconfont icon-sousuo"></span>
  531 + <div class="name">
  532 + 搜索
  533 + </div>
  534 + <div class="code-name">.icon-sousuo
  535 + </div>
  536 + </li>
  537 +
  538 + <li class="dib">
524 <span class="icon iconfont icon-icon--mubiaoku"></span> 539 <span class="icon iconfont icon-icon--mubiaoku"></span>
525 <div class="name"> 540 <div class="name">
526 目标库 541 目标库
@@ -1179,6 +1194,14 @@ @@ -1179,6 +1194,14 @@
1179 1194
1180 <li class="dib"> 1195 <li class="dib">
1181 <svg class="icon svg-icon" aria-hidden="true"> 1196 <svg class="icon svg-icon" aria-hidden="true">
  1197 + <use xlink:href="#icon-sousuo"></use>
  1198 + </svg>
  1199 + <div class="name">搜索</div>
  1200 + <div class="code-name">#icon-sousuo</div>
  1201 + </li>
  1202 +
  1203 + <li class="dib">
  1204 + <svg class="icon svg-icon" aria-hidden="true">
1182 <use xlink:href="#icon-icon--mubiaoku"></use> 1205 <use xlink:href="#icon-icon--mubiaoku"></use>
1183 </svg> 1206 </svg>
1184 <div class="name">目标库</div> 1207 <div class="name">目标库</div>
1 @font-face { 1 @font-face {
2 font-family: "iconfont"; /* Project id 2843738 */ 2 font-family: "iconfont"; /* Project id 2843738 */
3 - src: url('iconfont.woff2?t=1633773106250') format('woff2'),  
4 - url('iconfont.woff?t=1633773106250') format('woff'),  
5 - url('iconfont.ttf?t=1633773106250') format('truetype'); 3 + src: url('iconfont.woff2?t=1634540750988') format('woff2'),
  4 + url('iconfont.woff?t=1634540750988') format('woff'),
  5 + url('iconfont.ttf?t=1634540750988') format('truetype');
6 } 6 }
7 7
8 .iconfont { 8 .iconfont {
@@ -13,6 +13,10 @@ @@ -13,6 +13,10 @@
13 -moz-osx-font-smoothing: grayscale; 13 -moz-osx-font-smoothing: grayscale;
14 } 14 }
15 15
  16 +.icon-sousuo:before {
  17 + content: "\e752";
  18 +}
  19 +
16 .icon-icon--mubiaoku:before { 20 .icon-icon--mubiaoku:before {
17 content: "\e610"; 21 content: "\e610";
18 } 22 }
@@ -6,6 +6,13 @@ @@ -6,6 +6,13 @@
6 "description": "", 6 "description": "",
7 "glyphs": [ 7 "glyphs": [
8 { 8 {
  9 + "icon_id": "577365",
  10 + "name": "搜索",
  11 + "font_class": "sousuo",
  12 + "unicode": "e752",
  13 + "unicode_decimal": 59218
  14 + },
  15 + {
9 "icon_id": "6501157", 16 "icon_id": "6501157",
10 "name": "目标库", 17 "name": "目标库",
11 "font_class": "icon--mubiaoku", 18 "font_class": "icon--mubiaoku",
@@ -34,7 +34,8 @@ @@ -34,7 +34,8 @@
34 <div style="width: calc(100% - 150px);padding-left: 6px;text-align: left;"> 34 <div style="width: calc(100% - 150px);padding-left: 6px;text-align: left;">
35 <el-input v-model="keyWord" placeholder="请输入关键字" :size="$global.elementSize" 35 <el-input v-model="keyWord" placeholder="请输入关键字" :size="$global.elementSize"
36 style="width: 220px;margin-right:10px" clearable/> 36 style="width: 220px;margin-right:10px" clearable/>
37 - <el-button icon="el-icon-search" :size="$global.elementSize" @click="searchFile">搜索</el-button> 37 + <el-button icon="el-icon-search" :size="$global.elementSize" @click="searchFile">
  38 + <i class="iconfont icon-sousuo"></i>搜索</el-button>
38 <el-button :size="$global.elementSize" @click="showUserDialog(true)" v-if="!isView"> 39 <el-button :size="$global.elementSize" @click="showUserDialog(true)" v-if="!isView">
39 <i class="iconfont icon-icon--quanxian"></i> 40 <i class="iconfont icon-icon--quanxian"></i>
40 授权 41 授权
@@ -77,7 +78,7 @@ @@ -77,7 +78,7 @@
77 :showPage="false" :height="height - 54"></cm-table-page> 78 :showPage="false" :height="height - 54"></cm-table-page>
78 </div> 79 </div>
79 <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'}">
80 - <div style="text-align: left;margin: 6px;border-bottom: solid 1px #F2F6FC;padding-bottom: 5px;" v-if="!isView"> 81 + <div style="text-align: left;margin: 6px;border-bottom: solid 1px #F2F6FC;padding-bottom: 5px;">
81 <!-- 82 <!--
82 <span v-for="(item,index) in historyNode"> 83 <span v-for="(item,index) in historyNode">
83 <el-link type="primary" @click="clickTopNav(item,index)" style="margin-left: 5px"> 84 <el-link type="primary" @click="clickTopNav(item,index)" style="margin-left: 5px">
@@ -120,7 +121,7 @@ @@ -120,7 +121,7 @@
120 </el-col> 121 </el-col>
121 </el-row> 122 </el-row>
122 123
123 - <cm-dialog :title="'新建“' + currentNodeData.name + '“子文件夹'" width="500px" :showDialogVisible="addDialogVisible" :showFooter="false"> 124 + <cm-dialog :title="addDialogTitle" width="500px" :showDialogVisible="addDialogVisible" :showFooter="false">
124 <template v-slot> 125 <template v-slot>
125 <el-form 126 <el-form
126 label-width="120px" 127 label-width="120px"
@@ -23,6 +23,10 @@ export default { @@ -23,6 +23,10 @@ export default {
23 type: String, 23 type: String,
24 default: '' 24 default: ''
25 }, 25 },
  26 + viewTypeName: {
  27 + type: String,
  28 + default: ''
  29 + },
26 fileIds: { 30 fileIds: {
27 type: Array, 31 type: Array,
28 default: [] 32 default: []
@@ -183,18 +187,15 @@ export default { @@ -183,18 +187,15 @@ export default {
183 187
184 // 左侧树 188 // 左侧树
185 let getTree = () => { 189 let getTree = () => {
186 - // 加载列表  
187 - proxy.$http.get("/inspection-report/doc/type/tree", {types: props.types.join(',')}, function (res) { 190 + proxy.$http.get("/inspection-report/file/document/tree", {}, function (res) {
188 if (res && res.data) { 191 if (res && res.data) {
189 treeData.value = res.data; 192 treeData.value = res.data;
190 let first = res.data[0]; 193 let first = res.data[0];
191 - //currentNodeData.value = first;  
192 194
193 let arr = []; 195 let arr = [];
194 arr.push(first.id); 196 arr.push(first.id);
195 defaultExpandedKeys.value = arr; 197 defaultExpandedKeys.value = arr;
196 198
197 - //historyNode.value.push(first);  
198 addHistoryNode(first); 199 addHistoryNode(first);
199 200
200 // 加载第一个节点数据 201 // 加载第一个节点数据
@@ -206,6 +207,9 @@ export default { @@ -206,6 +207,9 @@ export default {
206 // 获取表格树 207 // 获取表格树
207 let getPage = (id) => { 208 let getPage = (id) => {
208 let docIds = props.fileIds.length == 0 ? '' : props.fileIds.join(',') 209 let docIds = props.fileIds.length == 0 ? '' : props.fileIds.join(',')
  210 + if(docIds == ''){
  211 + return;
  212 + }
209 let params = { 213 let params = {
210 id: id, 214 id: id,
211 name: keyWord.value, 215 name: keyWord.value,
@@ -294,8 +298,7 @@ export default { @@ -294,8 +298,7 @@ export default {
294 proxy.$global.showMsg('放入回收站成功!'); 298 proxy.$global.showMsg('放入回收站成功!');
295 } 299 }
296 300
297 -  
298 - reload(false); 301 + reload(true);
299 } 302 }
300 }) 303 })
301 304
@@ -308,6 +311,7 @@ export default { @@ -308,6 +311,7 @@ export default {
308 * @param type 文件夹或者文档 311 * @param type 文件夹或者文档
309 */ 312 */
310 let addDialogVisible = Vue.ref(false); 313 let addDialogVisible = Vue.ref(false);
  314 + let addDialogTitle = Vue.ref('');
311 let docForm = Vue.ref({ 315 let docForm = Vue.ref({
312 name: '', 316 name: '',
313 docNo: '', 317 docNo: '',
@@ -323,6 +327,11 @@ export default { @@ -323,6 +327,11 @@ export default {
323 }; 327 };
324 isUserFolder.value = isUser; 328 isUserFolder.value = isUser;
325 addDialogVisible.value = flg; 329 addDialogVisible.value = flg;
  330 + let title =`新建树节点“${currentNodeData.value.name}“子文件夹`;
  331 + if(isUser){
  332 + title =`新建自定义文件夹`;
  333 + }
  334 + addDialogTitle.value = title
326 } 335 }
327 336
328 /** 337 /**
@@ -346,10 +355,10 @@ export default { @@ -346,10 +355,10 @@ export default {
346 proxy.$global.showMsg("新建成功!"); 355 proxy.$global.showMsg("新建成功!");
347 } 356 }
348 }) 357 })
349 -  
350 // 属性tree 358 // 属性tree
351 - reload(true);  
352 - showFolder(false,isUserFolder.value); 359 + let isUser = !isUserFolder.value;
  360 + reload(isUser);
  361 + showFolder(false,isUser);
353 } else { 362 } else {
354 console.log('error submit!!') 363 console.log('error submit!!')
355 return false 364 return false
@@ -462,11 +471,6 @@ export default { @@ -462,11 +471,6 @@ export default {
462 471
463 let info = []; 472 let info = [];
464 arr.map(function (v) { 473 arr.map(function (v) {
465 - // info.push({  
466 - // id:v.id,  
467 - // type:v.type  
468 - // })  
469 -  
470 info.push(`${v.id}__${v.type}`); 474 info.push(`${v.id}__${v.type}`);
471 }) 475 })
472 476
@@ -479,24 +483,6 @@ export default { @@ -479,24 +483,6 @@ export default {
479 } 483 }
480 484
481 /** 485 /**
482 - * TODO  
483 - * @param item  
484 - * @param index  
485 - */  
486 - let clickTopNav = (item,index) =>{  
487 - let arr = historyNode.value;  
488 - // // 删除当前节点后面的路径  
489 - // arr.filter(function (v,i) {  
490 - // if(i > index){  
491 - // arr.splice(i,1);  
492 - // }  
493 - // })  
494 -  
495 - addHistoryNode(item);  
496 - getPage(item.id);  
497 - }  
498 -  
499 - /**  
500 * 点击标签关闭 486 * 点击标签关闭
501 * @param index 487 * @param index
502 */ 488 */
@@ -522,11 +508,13 @@ export default { @@ -522,11 +508,13 @@ export default {
522 left: 0, 508 left: 0,
523 right: 24 509 right: 24
524 } 510 }
525 - currentNodeData.value = { 511 + let item = {
526 docType: props.viewTypeId, 512 docType: props.viewTypeId,
527 docNo: props.viewTypeId, 513 docNo: props.viewTypeId,
  514 + name: props.viewTypeName,
528 id: props.viewTypeId 515 id: props.viewTypeId
529 } 516 }
  517 + addHistoryNode(item);
530 getPage(props.viewTypeId); 518 getPage(props.viewTypeId);
531 } 519 }
532 }) 520 })
@@ -560,6 +548,7 @@ export default { @@ -560,6 +548,7 @@ export default {
560 548
561 addDialogVisible, 549 addDialogVisible,
562 showFolder, 550 showFolder,
  551 + addDialogTitle,
563 552
564 showUserDialogVisible, 553 showUserDialogVisible,
565 userFileRight, 554 userFileRight,
@@ -568,7 +557,7 @@ export default { @@ -568,7 +557,7 @@ export default {
568 557
569 showUploadDialogVisible, 558 showUploadDialogVisible,
570 historyNode, 559 historyNode,
571 - clickTopNav, 560 +
572 tagHandleClose, 561 tagHandleClose,
573 isAdmin 562 isAdmin
574 563
@@ -40,12 +40,12 @@ export default { @@ -40,12 +40,12 @@ export default {
40 // 分页页码设置 40 // 分页页码设置
41 pageSizes: { 41 pageSizes: {
42 type: Array, 42 type: Array,
43 - default: [50,100, 200, 300, 400] 43 + default: [10,50,100, 200, 300, 400]
44 }, 44 },
45 // 默认展示 45 // 默认展示
46 pageSize: { 46 pageSize: {
47 type: Number, 47 type: Number,
48 - default: 50 48 + default: 10
49 }, 49 },
50 // 总数 50 // 总数
51 total: { 51 total: {
@@ -55,7 +55,7 @@ export default { @@ -55,7 +55,7 @@ export default {
55 // 展示组件 55 // 展示组件
56 layout: { 56 layout: {
57 type: String, 57 type: String,
58 - default: "total, sizes, prev, pager, next, jumper" 58 + default: "total, prev,pager,next, sizes, jumper"
59 }, 59 },
60 // 列 60 // 列
61 columns: { 61 columns: {
@@ -90,7 +90,6 @@ export default { @@ -90,7 +90,6 @@ export default {
90 90
91 let callback = () =>{ 91 let callback = () =>{
92 emit('loaddata',props) 92 emit('loaddata',props)
93 - console.log("sssssssssssssssssssssss")  
94 } 93 }
95 94
96 // 每页展示多少条 95 // 每页展示多少条
@@ -130,6 +129,7 @@ export default { @@ -130,6 +129,7 @@ export default {
130 129
131 // 挂载完 130 // 挂载完
132 Vue.onMounted(() => { 131 Vue.onMounted(() => {
  132 + //callback();
133 }) 133 })
134 134
135 return { 135 return {
@@ -148,8 +148,8 @@ global.getBase64 = (file) =>{ @@ -148,8 +148,8 @@ global.getBase64 = (file) =>{
148 148
149 149
150 150
151 -// 组件默认大小  
152 -global.elementSize = 'small';  
153 - 151 +// 组件默认大小 medium / small / mini
  152 +global.elementSize = '';
  153 +global.height = window.innerHeight - 20;
154 154
155 export default global 155 export default global
1 -文档管理表结构修改  
2 -V1015_3_alter.sql  
3 -  
4 -新版资源列表 (依赖11个视图)  
5 -V1015_4_b_res_list_tree_v32.sql  
6 -V1015__4_b_res_list_config_v32.sql  
1 -<cm-document v-if="initFlg" :isView="true" :viewTypeId="docType" :types="[docType]" :fileIds="docIds" @callback="saveOpsLog"></cm-document> 1 +<cm-document v-if="initFlg" :isView="true"
  2 + :viewTypeId="docType"
  3 + :viewTypeName="docTypeName"
  4 + :types="[docType]"
  5 + :fileIds="docIds"
  6 + @callback="saveOpsLog"></cm-document>
  7 +
@@ -26,6 +26,11 @@ export default { @@ -26,6 +26,11 @@ export default {
26 type: String, 26 type: String,
27 default: '' 27 default: ''
28 }, 28 },
  29 + // 文件类型
  30 + docTypeName: {
  31 + type: String,
  32 + default: ''
  33 + },
29 }, 34 },
30 setup(props, {attrs, slots, emit}) { 35 setup(props, {attrs, slots, emit}) {
31 36
@@ -4,6 +4,6 @@ @@ -4,6 +4,6 @@
4 <el-divider content-position="left">项目评价汇总</el-divider> 4 <el-divider content-position="left">项目评价汇总</el-divider>
5 <cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true" 5 <cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true"
6 :showBorder="true" :currentPage="currentPage" :total="total" :loading="false" 6 :showBorder="true" :currentPage="currentPage" :total="total" :loading="false"
7 - :showPage="true" :height="(height - 54)/3"></cm-table-page> 7 + :showPage="true" :height="height"></cm-table-page>
8 </div> 8 </div>
9 </div> 9 </div>
@@ -5,9 +5,25 @@ export default { @@ -5,9 +5,25 @@ export default {
5 data() { 5 data() {
6 return {} 6 return {}
7 }, 7 },
8 - setup() {  
9 - let height = Vue.ref(window.innerHeight - 130);  
10 - 8 + props:{
  9 + treeNode: {
  10 + type: Object,
  11 + default: {}
  12 + },
  13 + parentNode: {
  14 + type: Object,
  15 + default: {}
  16 + },
  17 + projectId: {
  18 + type: String,
  19 + default: ''
  20 + },
  21 + height: {
  22 + type: Number,
  23 + default: 0
  24 + },
  25 + },
  26 + setup(props, {attrs, slots, emit}) {
11 const {proxy} = Vue.getCurrentInstance(); 27 const {proxy} = Vue.getCurrentInstance();
12 28
13 29
@@ -97,12 +113,21 @@ export default { @@ -97,12 +113,21 @@ export default {
97 let total = Vue.ref(0); 113 let total = Vue.ref(0);
98 114
99 // 获取表格数据 115 // 获取表格数据
100 - let getPage = () => {  
101 - proxy.$http.post("/api-web/bOpsScore/scoreCollect", { 116 + let getPage = (obj) => {
  117 +
  118 + if(!props.treeNode.map || !props.treeNode.map.nodeType){
  119 + return;
  120 + }
  121 + let params = {
102 "page":1, 122 "page":1,
103 "limit":10, 123 "limit":10,
104 - "projectId":"1"  
105 - }, function (res) { 124 + "projectId": props.treeNode.map.nodeType.projectId
  125 + }
  126 + if(obj){
  127 + params.page = obj.currentPage;
  128 + params.limit = obj.pageSize;
  129 + }
  130 + proxy.$http.post("/api-web/bOpsScore/scoreCollect", params, function (res) {
106 if (res && res.data) { 131 if (res && res.data) {
107 dataList.value = res.data; 132 dataList.value = res.data;
108 total.value = res.count; 133 total.value = res.count;
@@ -113,11 +138,19 @@ export default { @@ -113,11 +138,19 @@ export default {
113 // 挂载完 138 // 挂载完
114 Vue.onMounted(() => { 139 Vue.onMounted(() => {
115 getPage(); 140 getPage();
  141 +
  142 + if(props.height && props.height == 0){
  143 + props.height = window.innerHeight - 130
  144 + }
116 }) 145 })
117 146
  147 + // 监听编辑状态
  148 + Vue.watch(() => props.treeNode, (newValue, oldVlaue) => {
  149 + getPage();
  150 + });
  151 +
118 return { 152 return {
119 columns, 153 columns,
120 - height,  
121 dataList, 154 dataList,
122 currentPage, 155 currentPage,
123 total, 156 total,
1 <div> 1 <div>
2 <!-- 人员信息总汇--> 2 <!-- 人员信息总汇-->
3 <project-ry :docType="docType" 3 <project-ry :docType="docType"
4 - :treeNode="treeNode" :parentNode="parentNode" :projectId="projectId"/> 4 + :treeNode="treeNode" :parentNode="parentNode" :projectId="projectId" :height="(height-50)/3"/>
5 </div> 5 </div>
6 <div> 6 <div>
7 <!-- 项目评价总汇--> 7 <!-- 项目评价总汇-->
8 <project-pj :docType="docType" 8 <project-pj :docType="docType"
9 - :treeNode="treeNode" :parentNode="parentNode" :projectId="projectId"/> 9 + :treeNode="treeNode" :parentNode="parentNode" :projectId="projectId" :height="(height-50)/3"/>
10 </div> 10 </div>
11 <div> 11 <div>
12 <!-- 项目资料总汇--> 12 <!-- 项目资料总汇-->
13 <project-zl :docType="docType" 13 <project-zl :docType="docType"
14 - :treeNode="treeNode" :parentNode="parentNode" :projectId="projectId"/>  
15 -</div> 14 + :treeNode="treeNode" :parentNode="parentNode" :projectId="projectId" :height="(height-50)/3"/>
16 </div> 15 </div>
@@ -34,7 +34,7 @@ export default { @@ -34,7 +34,7 @@ export default {
34 default: '' 34 default: ''
35 } 35 }
36 }, 36 },
37 - setup() { 37 + setup(props, {attrs, slots, emit}) {
38 let height = Vue.ref(window.innerHeight - 130); 38 let height = Vue.ref(window.innerHeight - 130);
39 const {proxy} = Vue.getCurrentInstance(); 39 const {proxy} = Vue.getCurrentInstance();
40 40
@@ -46,7 +46,7 @@ export default { @@ -46,7 +46,7 @@ export default {
46 46
47 47
48 return { 48 return {
49 - 49 + height
50 } 50 }
51 } 51 }
52 } 52 }
@@ -4,6 +4,6 @@ @@ -4,6 +4,6 @@
4 <el-divider content-position="left">人员信息汇总</el-divider> 4 <el-divider content-position="left">人员信息汇总</el-divider>
5 <cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true" 5 <cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true"
6 :showBorder="true" :currentPage="currentPage" :total="total" :loading="false" 6 :showBorder="true" :currentPage="currentPage" :total="total" :loading="false"
7 - :showPage="true" :height="(height - 54)/3"></cm-table-page> 7 + :showPage="true" :height="height"></cm-table-page>
8 </div> 8 </div>
9 </div> 9 </div>
@@ -19,10 +19,14 @@ export default { @@ -19,10 +19,14 @@ export default {
19 projectId: { 19 projectId: {
20 type: String, 20 type: String,
21 default: '' 21 default: ''
22 - } 22 + },
  23 + height: {
  24 + type: Number,
  25 + default: 0
  26 + },
23 }, 27 },
24 setup(props, {attrs, slots, emit}) { 28 setup(props, {attrs, slots, emit}) {
25 - let height = Vue.ref(window.innerHeight - 130); 29 +
26 const {proxy} = Vue.getCurrentInstance(); 30 const {proxy} = Vue.getCurrentInstance();
27 31
28 32
@@ -30,7 +34,25 @@ export default { @@ -30,7 +34,25 @@ export default {
30 prop: 'nickname', 34 prop: 'nickname',
31 label: '运维人员姓名', 35 label: '运维人员姓名',
32 sortable: true, 36 sortable: true,
33 - align: 'left', 37 + }, {
  38 + prop: 'phone',
  39 + label: '联系电话',
  40 + sortable: true,
  41 + render: function (row) {
  42 + let arr = [];
  43 + if(row.phone){
  44 + arr.push(row.phone);
  45 + }
  46 +
  47 + if(row.tel){
  48 + arr.push(row.tel);
  49 + }
  50 + return arr.join(' / ')
  51 + }
  52 + },{
  53 + prop: 'email',
  54 + label: '电子邮箱',
  55 + sortable: true,
34 }, { 56 }, {
35 prop: 'state', 57 prop: 'state',
36 label: '在职状态', 58 label: '在职状态',
@@ -88,12 +110,21 @@ export default { @@ -88,12 +110,21 @@ export default {
88 let total = Vue.ref(0); 110 let total = Vue.ref(0);
89 111
90 // 获取表格数据 112 // 获取表格数据
91 - let getPage = () => {  
92 - proxy.$http.post("/api-web/bOpsPerson/personCollect", { 113 + let getPage = (obj) => {
  114 + if(!props.treeNode.map || !props.treeNode.map.nodeType){
  115 + return;
  116 + }
  117 +
  118 + let params = {
93 "page":1, 119 "page":1,
94 "limit":10, 120 "limit":10,
95 "projectId": props.treeNode.map.nodeType.projectId 121 "projectId": props.treeNode.map.nodeType.projectId
96 - }, function (res) { 122 + }
  123 + if(obj){
  124 + params.page = obj.currentPage;
  125 + params.limit = obj.pageSize;
  126 + }
  127 + proxy.$http.post("/api-web/bOpsPerson/personCollect", params, function (res) {
97 if (res && res.data) { 128 if (res && res.data) {
98 dataList.value = res.data 129 dataList.value = res.data
99 total.value = res.count; 130 total.value = res.count;
@@ -106,7 +137,11 @@ export default { @@ -106,7 +137,11 @@ export default {
106 137
107 // 挂载完 138 // 挂载完
108 Vue.onMounted(() => { 139 Vue.onMounted(() => {
109 - getPage(); 140 + //getPage();
  141 +
  142 + if(props.height && props.height == 0){
  143 + props.height = window.innerHeight - 130
  144 + }
110 }) 145 })
111 146
112 // 监听编辑状态 147 // 监听编辑状态
@@ -117,7 +152,6 @@ export default { @@ -117,7 +152,6 @@ export default {
117 152
118 return { 153 return {
119 columns, 154 columns,
120 - height,  
121 dataList, 155 dataList,
122 currentPage, 156 currentPage,
123 total, 157 total,
@@ -4,6 +4,6 @@ @@ -4,6 +4,6 @@
4 <el-divider content-position="left">项目资料汇总</el-divider> 4 <el-divider content-position="left">项目资料汇总</el-divider>
5 <cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true" 5 <cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true"
6 :showBorder="true" :currentPage="currentPage" :total="total" :loading="false" 6 :showBorder="true" :currentPage="currentPage" :total="total" :loading="false"
7 - :showPage="false" :height="(height - 54)/3"></cm-table-page> 7 + :showPage="false" :height="height"></cm-table-page>
8 </div> 8 </div>
9 </div> 9 </div>
@@ -5,9 +5,25 @@ export default { @@ -5,9 +5,25 @@ export default {
5 data() { 5 data() {
6 return {} 6 return {}
7 }, 7 },
8 - setup() {  
9 - let height = Vue.ref(window.innerHeight - 130);  
10 - 8 + props:{
  9 + treeNode: {
  10 + type: Object,
  11 + default: {}
  12 + },
  13 + parentNode: {
  14 + type: Object,
  15 + default: {}
  16 + },
  17 + projectId: {
  18 + type: String,
  19 + default: ''
  20 + },
  21 + height: {
  22 + type: Number,
  23 + default: 0
  24 + },
  25 + },
  26 + setup(props, {attrs, slots, emit}) {
11 const {proxy} = Vue.getCurrentInstance(); 27 const {proxy} = Vue.getCurrentInstance();
12 28
13 29
@@ -54,7 +70,12 @@ export default { @@ -54,7 +70,12 @@ export default {
54 70
55 // 获取表格数据 71 // 获取表格数据
56 let getPage = () => { 72 let getPage = () => {
57 - proxy.$http.get("/api-web/bOpsFile/fileCollect?projectId=1", {}, function (res) { 73 + let projectId = props.treeNode.map.nodeType.projectId
  74 + if(!projectId){
  75 + return;
  76 + }
  77 +
  78 + proxy.$http.get(`/api-web/bOpsFile/fileCollect?projectId=${projectId}`, {}, function (res) {
58 if (res && res.data) { 79 if (res && res.data) {
59 dataList.value = res.data 80 dataList.value = res.data
60 total.value = res.count; 81 total.value = res.count;
@@ -64,13 +85,19 @@ export default { @@ -64,13 +85,19 @@ export default {
64 85
65 // 挂载完 86 // 挂载完
66 Vue.onMounted(() => { 87 Vue.onMounted(() => {
67 - getPage(); 88 + if(props.height && props.height == 0){
  89 + props.height = window.innerHeight - 130
  90 + }
68 }) 91 })
69 92
  93 + // 监听编辑状态
  94 + Vue.watch(() => props.treeNode, (newValue, oldVlaue) => {
  95 + getPage();
  96 + });
  97 +
70 98
71 return { 99 return {
72 columns, 100 columns,
73 - height,  
74 dataList, 101 dataList,
75 currentPage, 102 currentPage,
76 total, 103 total,
1 -<div class="container" :style="{'height':height+'px','max-height':height+'px','overflow':'auto'}">  
2 - <!-- 乙方运营-->  
3 - <el-row :gutter="5">  
4 - <el-col :span="4">  
5 - <div :style="{'min-height':height+'px','height':'100%','overflow':'auto'}" style="background-color: white;border-radius: 3px"> 1 +<div class="container" :style="{'height':height+'px','max-height':height+'px'}">
  2 + <el-row :gutter="5" >
  3 + <el-col :span="4" >
  4 + <div class="cm-card" :style="{'min-height':height+'px','max-height':height+'px','height':'100%','overflow-y':'auto','overflow-x':'hidden'}">
6 <el-tree :data="dataSource" :default-expanded-keys="[1]" :props="defaultProps" > 5 <el-tree :data="dataSource" :default-expanded-keys="[1]" :props="defaultProps" >
7 <template #default="{ node, data }"> 6 <template #default="{ node, data }">
8 <div style=" width: 100%;"> 7 <div style=" width: 100%;">
@@ -15,11 +14,14 @@ @@ -15,11 +14,14 @@
15 </div> 14 </div>
16 </el-col> 15 </el-col>
17 <el-col :span="20" > 16 <el-col :span="20" >
18 - <div :style="{'min-height':height+'px','height':'100%','overflow':'auto'}" style="background-color: white;border-radius: 3px"> 17 + <div class="cm-card" :style="{'min-height':height+'px','height':'100%','padding-left':'5px'}" >
19 <component v-bind:is="componentName" 18 <component v-bind:is="componentName"
20 :docType="docType" 19 :docType="docType"
  20 + :docTypeName="docTypeName"
  21 + :height="height - 100"
21 :treeNode="treeNode" :parentNode="parentNode" :projectId="projectId"></component> 22 :treeNode="treeNode" :parentNode="parentNode" :projectId="projectId"></component>
22 </div> 23 </div>
23 </el-col> 24 </el-col>
24 </el-row> 25 </el-row>
25 </div> 26 </div>
  27 +
@@ -49,6 +49,7 @@ export default { @@ -49,6 +49,7 @@ export default {
49 let parentNode = Vue.ref({}); 49 let parentNode = Vue.ref({});
50 let projectId = Vue.ref(''); 50 let projectId = Vue.ref('');
51 let docType = Vue.ref(''); 51 let docType = Vue.ref('');
  52 + let docTypeName = Vue.ref('');
52 53
53 54
54 // 搜索 55 // 搜索
@@ -84,9 +85,11 @@ export default { @@ -84,9 +85,11 @@ export default {
84 } 85 }
85 86
86 let handleNodeClick = (data) => { 87 let handleNodeClick = (data) => {
  88 +
87 let comName = data.map.nodeType.view.code; 89 let comName = data.map.nodeType.view.code;
88 if (comName == 'DOCUMENT') { 90 if (comName == 'DOCUMENT') {
89 docType.value = data.map.nodeType.code; 91 docType.value = data.map.nodeType.code;
  92 + docTypeName.value = data.label;
90 } 93 }
91 getParent(dataSource.value, data.parentId); 94 getParent(dataSource.value, data.parentId);
92 projectId.value = data.map.nodeType.projectId; 95 projectId.value = data.map.nodeType.projectId;
@@ -105,7 +108,8 @@ export default { @@ -105,7 +108,8 @@ export default {
105 dataSource, 108 dataSource,
106 handleNodeClick, 109 handleNodeClick,
107 componentName, 110 componentName,
108 - docType 111 + docType,
  112 + docTypeName
109 }; 113 };
110 }, 114 },
111 } 115 }
1 <div class="container" :style="{'height':height+'px','max-height':height+'px'}"> 1 <div class="container" :style="{'height':height+'px','max-height':height+'px'}">
2 <el-row :gutter="5" > 2 <el-row :gutter="5" >
3 <el-col :span="4" > 3 <el-col :span="4" >
4 - <div class="cm-card" :style="{'min-height':height+'px','height':'100%'}"> 4 + <div class="cm-card" :style="{'min-height':height+'px','max-height':height+'px','height':'100%'}">
5 <el-tree :data="treeData" :default-expanded-keys="[1]" @node-click="handleNodeClick"/> 5 <el-tree :data="treeData" :default-expanded-keys="[1]" @node-click="handleNodeClick"/>
6 </div> 6 </div>
7 </el-col> 7 </el-col>