Authored by 王涛

浙江大屏

@@ -29,6 +29,14 @@ @@ -29,6 +29,14 @@
29 </dependencies> 29 </dependencies>
30 30
31 <build> 31 <build>
  32 + <resources>
  33 + <resource>
  34 + <directory>src/main/resources</directory>
  35 + <includes>
  36 + <include>**/**</include>
  37 + </includes>
  38 + </resource>
  39 + </resources>
32 <plugins> 40 <plugins>
33 <plugin> 41 <plugin>
34 <groupId>org.springframework.boot</groupId> 42 <groupId>org.springframework.boot</groupId>
@@ -25,6 +25,14 @@ @@ -25,6 +25,14 @@
25 25
26 <build> 26 <build>
27 <finalName>zjweb</finalName> 27 <finalName>zjweb</finalName>
  28 + <resources>
  29 + <resource>
  30 + <directory>src/main/resources</directory>
  31 + <includes>
  32 + <include>**/**</include>
  33 + </includes>
  34 + </resource>
  35 + </resources>
28 <plugins> 36 <plugins>
29 <plugin> 37 <plugin>
30 <groupId>org.springframework.boot</groupId> 38 <groupId>org.springframework.boot</groupId>
@@ -12,7 +12,7 @@ server: @@ -12,7 +12,7 @@ server:
12 key-store-password: Hg0801.. 12 key-store-password: Hg0801..
13 key-password: Hg0801.. 13 key-password: Hg0801..
14 url: 14 url:
15 - gateway: http://127.0.0.1:8080 15 + gateway: http://192.168.0.41:8080
16 inspection_web: http://127.0.0.1:8082 16 inspection_web: http://127.0.0.1:8082
17 assetsweb: http://127.0.0.1:8082 17 assetsweb: http://127.0.0.1:8082
18 mxgraph_editor: http://127.0.0.1:8085 18 mxgraph_editor: http://127.0.0.1:8085
@@ -32,6 +32,11 @@ const routes = [{ @@ -32,6 +32,11 @@ const routes = [{
32 path: '/res/list', 32 path: '/res/list',
33 name: 'resList', 33 name: 'resList',
34 component: () => myImport('views/res/list/index') 34 component: () => myImport('views/res/list/index')
  35 + },
  36 + {
  37 + path: '/zj/dp',
  38 + name: 'resList',
  39 + component: () => myImport('views/dp/index')
35 } 40 }
36 ]; 41 ];
37 42
@@ -25,6 +25,14 @@ @@ -25,6 +25,14 @@
25 25
26 <build> 26 <build>
27 <finalName>tjweb</finalName> 27 <finalName>tjweb</finalName>
  28 + <resources>
  29 + <resource>
  30 + <directory>src/main/resources</directory>
  31 + <includes>
  32 + <include>**/**</include>
  33 + </includes>
  34 + </resource>
  35 + </resources>
28 <plugins> 36 <plugins>
29 <plugin> 37 <plugin>
30 <groupId>org.springframework.boot</groupId> 38 <groupId>org.springframework.boot</groupId>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  4 + <modelVersion>4.0.0</modelVersion>
  5 + <parent>
  6 + <groupId>com.honggroup</groupId>
  7 + <artifactId>hg-monitor-web</artifactId>
  8 + <version>0.0.1-SNAPSHOT</version>
  9 + </parent>
  10 + <groupId>com.honggroup</groupId>
  11 + <artifactId>hg-monitor-web-zj</artifactId>
  12 + <version>0.0.1-SNAPSHOT</version>
  13 + <name>hg-monitor-web-zj</name>
  14 + <description>浙江个性化版本</description>
  15 + <properties>
  16 + <java.version>1.8</java.version>
  17 + </properties>
  18 + <dependencies>
  19 + <dependency>
  20 + <groupId>com.honggroup</groupId>
  21 + <artifactId>hg-monitor-web-new</artifactId>
  22 + <version>0.0.1-SNAPSHOT</version>
  23 + </dependency>
  24 + </dependencies>
  25 +
  26 + <build>
  27 + <finalName>zjweb</finalName>
  28 + <resources>
  29 + <resource>
  30 + <directory>src/main/resources</directory>
  31 + <includes>
  32 + <include>**/**</include>
  33 + </includes>
  34 + </resource>
  35 + </resources>
  36 + <plugins>
  37 + <plugin>
  38 + <groupId>org.springframework.boot</groupId>
  39 + <artifactId>spring-boot-maven-plugin</artifactId>
  40 + </plugin>
  41 + </plugins>
  42 + </build>
  43 +
  44 +</project>
  1 +
  2 +spring:
  3 + application:
  4 + name: zjweb
  5 +server:
  6 + port: 8088
  7 + ssl:
  8 + enabled: false
  9 + key-alias: tomcat_https
  10 + key-store: classpath:keystore/tomcat_https.keystore
  11 + key-store-type: JKS
  12 + key-store-password: Hg0801..
  13 + key-password: Hg0801..
  14 +url:
  15 + gateway: http://192.168.0.41:8080
  16 + inspection_web: http://127.0.0.1:8082
  17 + assetsweb: http://127.0.0.1:8082
  18 + mxgraph_editor: http://127.0.0.1:8085
  19 + tingyun: http://127.0.0.1:8088
  20 + bigScreen: http://127.0.0.1:8081
  21 + #流程系统路径,当ssl.enabled=true时,http要改为https,并修改流程nginx的conf文件
  22 + workflow: http://192.168.0.248:8002
  23 + # 积木报表工具
  24 + jimuReport: http://192.168.0.41:8085
  25 +config:
  26 + layer:
  27 + load:
  28 + icon: hg
  29 + audio:
  30 + mp3: 14039
  31 + tingyun:
  32 + api_key: aZipZbC18BhpG5GrjtiFAtThL1I0OUfn
  33 + secret_key: nbxay44wx8c3x4n5wcxe63mp87a72xed
  1 +<title>浙江大屏</title>
  2 +<iframe src="/vue3/index.html#/zj/dp" class="layadmin-iframe"/>
  1 +<div class="assets-configmanager">
  2 + <el-form :inline="true" :model="formInline" class="demo-form-inline" style="text-align: left;padding-left: 6px;">
  3 + <el-form-item label="" >
  4 + <el-input :disabled="initFlag" placeholder="输入关键字" v-model="pageInfo.keyWords" prefix-icon="el-icon-search">
  5 + </el-input>
  6 + </el-form-item>
  7 + <el-form-item label="" :disabled="initFlga">
  8 + <res-type-tree multiple clearable collapseTags @callback="getResType" />
  9 + </el-form-item>
  10 +
  11 + <el-form-item label="">
  12 + <machine-room @callback="getMachineRoom"></machine-room>
  13 + </el-form-item>
  14 +
  15 + <el-form-item>
  16 + <el-button :disabled="initFlag" type="primary" @click="onBtnSearch()">查询</el-button>
  17 + </el-form-item>
  18 + </el-form>
  19 + <!-- <div style="text-align: right" v-if="loadHead">
  20 + <el-popover placement="bottom" trigger="click">
  21 + <template #reference>
  22 + <el-button icon="el-icon-set-up" plain hairline size="small"></el-button>
  23 + </template>
  24 + <div slot="content" style="width: 100px;">
  25 + <div style="display: flex;flex-direction: column">
  26 + {{checkList}}
  27 + <el-checkbox-group v-model="checkList">
  28 + <el-checkbox :label="item.propName" borderv-for="item in columns"
  29 + style="margin: 3px;width: 100px;"></el-checkbox>
  30 + </el-checkbox-group>
  31 + </div>
  32 + </div>
  33 + </el-popover>
  34 + </div> -->
  35 + <el-table :max-height="height" v-loading="loading" :data="tableList" border style="width: 100%;" header-row-class-name="tbl-header-class"
  36 + :empty-text="emptyText" :stripe="true">
  37 + <el-table-column fixed type="index" v-if="columns.length > 0" :index="(index) => {return index + 1}" label="序号" width="60" align="center"> </el-table-column>
  38 + <el-table-column v-for="item in columns" :prop="item.propKey" :label="item.propName"
  39 + :width="widths[item.propKey] ? widths[item.propKey] : '120'">
  40 + <template #default="scope" v-if="item.propKey =='resName'">
  41 + <el-link type="primary" @click="openDetailPage(scope.row)">{{scope.row.resName}}</el-link>
  42 + </template>
  43 + </el-table-column>
  44 + </el-table>
  45 + <div style="text-align: center">
  46 + <el-pagination @size-change="handleSizeChange"
  47 + @prev-click="prePage"
  48 + @next-click="nextPage"
  49 + @current-change="handleCurrentChange"
  50 + :current-page="pageInfo.page" :page-sizes="[50,100, 150, 200]" :page-size="pageInfo.limit"
  51 + layout="total, sizes, prev, pager, next, jumper" :total="pageInfo.total" />
  52 + </div>
  53 +
  54 +
  55 + <el-dialog top="2vh" :title="row.title" v-model="centerDialogVisible" custom-class="config-dialog" width="80%" destroy-on-close>
  56 + <el-tabs v-model="activeName" @tab-click="handleClick">
  57 + <el-tab-pane label="基本信息" name="jbxx">
  58 + <div class="config-tools">
  59 + <el-button-group>
  60 + <el-button size="mini" icon="el-icon-edit-outline" @click="editConfig('jbxx')"></el-button>
  61 + <el-button size="mini" v-if="edits['jbxx'] && edits['jbxx'] === true" icon="el-icon-check" @click="saveConfig('jbxx')"></el-button>
  62 + <el-button size="mini" v-if="edits['jbxx'] && edits['jbxx'] === true" icon="el-icon-close" @click="cancelConfig('jbxx')"></el-button>
  63 + </el-button-group>
  64 + </div>
  65 +
  66 + <div class="config-view">
  67 + <div style="display: flex;flex-direction: row;width: 100%;">
  68 + <div class="config-header-title">属性</div>
  69 + <div class="config-header-content">内容</div>
  70 + <div class="config-header-title">属性</div>
  71 + <div class="config-header-content">内容</div>
  72 + </div>
  73 + <div v-if="row.detail.jbxx != undefined" v-for="(item,index) in row.detail.jbxx"
  74 + style="display: flex;flex-direction: row;width: 50%;">
  75 + <div class="config-content-title">
  76 + {{item.propName}} &nbsp;
  77 + <i v-if="editKey[item.propKey] && editKey[item.propKey].edit === true" class="el-icon-edit" style="color: #409eff;" />
  78 + </div>
  79 + <div class="config-content-content">
  80 + <property-edit :detail="item" @callback="callback"
  81 + :operates="edits['jbxx']"></property-edit>
  82 + </div>
  83 + </div>
  84 + </div>
  85 + </el-tab-pane>
  86 + <el-tab-pane v-if="row.detail.name != undefined" v-for="(item,index) in row.detail.name"
  87 + :label="item.propName" :name="item.parentPropKey">
  88 + <div class="config-tools">
  89 + <el-button-group>
  90 + <el-button size="mini" @click="addTabDetail(item.parentPropKey)" icon="el-icon-plus"></el-button>
  91 + <el-button size="mini" @click="editConfig(item.parentPropKey)" icon="el-icon-edit-outline"></el-button>
  92 + <el-button size="mini" @click="saveTabConfig(item.parentPropKey)" v-if="edits[item.parentPropKey] && edits[item.parentPropKey] === true" icon="el-icon-check"></el-button>
  93 + <el-button size="mini" @click="cancelConfig(item.parentPropKey)" v-if="tabDelete[item.parentPropKey] && tabDelete[item.parentPropKey] === true" icon="el-icon-close"></el-button>
  94 + </el-button-group>
  95 + </div>
  96 + <div class="config-view">
  97 + <div style="display: flex;flex-direction: row;width: 100%;">
  98 + <div class="config-header-title"
  99 + v-if="row[item.parentPropKey] != undefined && row[item.parentPropKey].name != undefined "
  100 + :style="'width:calc(' + 1/row[item.parentPropKey].name.length*100 +'% - ' + 40/row[item.parentPropKey].name.length + 'px)'"
  101 + v-for="(propName,index) in row[item.parentPropKey].name" >
  102 + {{propName}}
  103 + </div>
  104 + <div class="config-header-title" style="width: 40px">操作</div>
  105 + </div>
  106 + <div style="display: flex;flex-direction: row;width: 100%;"
  107 + v-if="row[item.parentPropKey] != undefined && row[item.parentPropKey].data != undefined "
  108 + v-for="(propList,index) in row[item.parentPropKey].data">
  109 + <div class="config-content-content"
  110 + :style="'width:calc(' + 1/row[item.parentPropKey].name.length*100 +'% - ' + 40/row[item.parentPropKey].name.length + 'px)'"
  111 + v-for="(propInfo,index2) in propList">
  112 + <property-edit :detail="propInfo" @callback="callback"
  113 + :operates="edits[item.parentPropKey]"></property-edit>
  114 + <!--<div v-if="index2 == (propList.length -1) && propInfo.addItem && propInfo.addItem == 1"
  115 + style="position: absolute;width: 20px;right: 15px;" >
  116 + <el-button size="mini" circle icon="el-icon-delete" @click="deleConfigItem(propList,index,item.parentPropKey)"></el-button>
  117 + </div>-->
  118 + </div>
  119 + <div class="config-content-content" style="width: 40px;">
  120 + <el-button size="mini" type="text" icon="el-icon-delete"
  121 + v-if="propList[0] && propList[0].addItem && propList[0].addItem == 1"
  122 + @click="deleConfigItem(propList,index,item.parentPropKey)"></el-button>
  123 + </div>
  124 + </div>
  125 + </div>
  126 + </el-tab-pane>
  127 +
  128 + </el-tabs>
  129 + </el-dialog>
  130 +</div>
  1 +export default {
  2 + name: 'configmanager',
  3 + template: '',
  4 + components: {
  5 + 'property-edit': Vue.defineAsyncComponent(
  6 + () => myImport('components/page/assets/propertyedit/index')
  7 + ),
  8 + },
  9 + setup() {
  10 +
  11 + const { proxy } = Vue.getCurrentInstance()
  12 +
  13 + let columns = Vue.ref([]);
  14 + let tableList = Vue.ref([]);
  15 + let emptyText = Vue.ref('数据加载中...');
  16 + let resTypeArr = Vue.ref([]);
  17 + let machineRoom = Vue.ref('');
  18 + let centerDialogVisible = Vue.ref(false);
  19 + let loadHead = Vue.ref(false);
  20 + let initFlag = Vue.ref(false);
  21 +
  22 + let height = Vue.ref(window.innerHeight - 130);
  23 +
  24 +
  25 + // 分页信息
  26 + const pageInfo = Vue.reactive({
  27 + total: 0,
  28 + limit: 50,
  29 + page: 1,
  30 + keyWords:''
  31 + })
  32 + // 编辑信息
  33 + const row = Vue.ref({})
  34 + let tabDelete = Vue.ref({});
  35 +
  36 + // 属性列表属性宽度
  37 + let widths = Vue.ref({
  38 + resName: '350',
  39 + admin: "150",
  40 + ip: "120",
  41 + maintenanceBegin: "180",
  42 + maintenanceEnd: "180",
  43 + resourceSN: "200",
  44 + cabinetPosition: "120",
  45 + parentResName:'300',
  46 + ULocation: "200"
  47 + });
  48 +
  49 + // 筛选列选中的 TODO
  50 + let checkList = Vue.ref({})
  51 + // 活跃页签
  52 + let activeName = Vue.ref('jbxx');
  53 + let edits = Vue.ref({})
  54 + let editKey = Vue.ref({})
  55 +
  56 +
  57 +
  58 + // 搜索
  59 + let onSearch = () => {
  60 + if(initFlag.value){
  61 + return;
  62 + }
  63 + initFlag.value = true;
  64 + // // 加载列表
  65 + // proxy.$http.get("/api-web/home/getUserProperties", {
  66 + // resTypes: resTypeArr.value
  67 + // }, function (res) {
  68 + // if (res && res.data) {
  69 + // columns.value = res.data;
  70 + // emptyText.value = '数据加载中...'
  71 + // loadHead.value = true;
  72 + // }
  73 + // });
  74 + //
  75 + // // 加载数据
  76 + // var params = {
  77 + // page: pageInfo.page,
  78 + // limit: pageInfo.limit,
  79 + // resName: pageInfo.keyWords,
  80 + // sortKey: '',
  81 + // resType: resTypeArr.value.join(','),
  82 + // resPositon: machineRoom.value,
  83 + // addr: '',
  84 + // maintenanceTimeEnd: '',
  85 + // maintenanceTimeStart: '',
  86 + // resCategory: 'assets'
  87 + // };
  88 + // proxy.$http.get("/api-web/home/assets/page/all", params, function (res) {
  89 + // if (res && res.data) {
  90 + // tableList.value = res.data;
  91 + // emptyText.value = "加载完成";
  92 + // pageInfo.total = res.count;
  93 + // } else {
  94 + // emptyText.value = "暂无数据";
  95 + // }
  96 + // initFlag.value = false;
  97 + // })
  98 + // 加载数据
  99 + var params = {
  100 + page: pageInfo.page,
  101 + limit: pageInfo.limit,
  102 + resName: pageInfo.keyWords,
  103 + sortKey: '',
  104 + resType: resTypeArr.value.join(','),
  105 + resPositon: machineRoom.value,
  106 + addr: '',
  107 + maintenanceTimeEnd: '',
  108 + maintenanceTimeStart: '',
  109 + resCategory: 'assets'
  110 + };
  111 + proxy.$http.get("/api-web/assets/configmanager/list", params, function (res) {
  112 + if (res && res.data) {
  113 + columns.value = res.map.header;
  114 + tableList.value = res.data;
  115 + emptyText.value = "加载完成";
  116 + pageInfo.total = res.count;
  117 + } else {
  118 + emptyText.value = "暂无数据";
  119 + tableList.value = [];
  120 + proxy.$global.showMsg('暂无数据!');
  121 + }
  122 + initFlag.value = false;
  123 + },function (){
  124 + proxy.$global.showMsg('没有查询到记录!');
  125 + initFlag.value = false;
  126 + });
  127 + }
  128 +
  129 + // 点击按钮搜索
  130 + let onBtnSearch = () =>{
  131 + pageInfo.page = 1;
  132 + onSearch();
  133 + }
  134 +
  135 + let getResType = (arr) => {
  136 + console.log(arr);
  137 + var types = arr.map(function (v) {
  138 + return v.id;
  139 + });
  140 + resTypeArr.value = types;
  141 +
  142 + onSearch();
  143 + }
  144 +
  145 + let getMachineRoom = (code) => {
  146 + console.log(code);
  147 + machineRoom.value = code;
  148 +
  149 + onSearch();
  150 + }
  151 +
  152 + // 每页展示多少条
  153 + let handleSizeChange = (val) => {
  154 + console.log(`每页 ${val} 条`)
  155 + pageInfo.limit = val;
  156 + onSearch();
  157 + }
  158 +
  159 + // 切换页码
  160 + let handleCurrentChange = (val) => {
  161 + console.log(`当前页: ${val}`)
  162 + pageInfo.page = val;
  163 + onSearch();
  164 + }
  165 +
  166 + // 切换页码
  167 + let prePage = (val) => {
  168 + console.log(`当前页: ${val}`)
  169 + pageInfo.page = val - 1;
  170 + onSearch();
  171 + }
  172 +
  173 + // 切换页码
  174 + let nextPage = (val) => {
  175 + console.log(`当前页: ${val}`)
  176 + pageInfo.page = val + 1;
  177 + onSearch();
  178 + }
  179 +
  180 + // 打开详情页配置
  181 + let openDetailPage = (rowDetail) => {
  182 +
  183 + edits.value['jbxx'] = false;
  184 +
  185 + if(row.value.detail && row.value.detail.name){
  186 + row.value.detail.name.forEach(function (v) {
  187 + edits.value[v] = false;
  188 + })
  189 + }
  190 +
  191 + let resId = rowDetail.resId;
  192 +
  193 + // 默认基本信息
  194 + activeName.value = 'jbxx';
  195 + row.value['title'] = rowDetail.resName + '_' + rowDetail.ip;
  196 + row.value['resId'] = resId;
  197 +
  198 + let id = encodeURIComponent(resId);
  199 +
  200 + // 获取配置信息
  201 + proxy.$http.get(`/api-web/assets/configmanager/resource/assets?resId=${id}`, {}, function (res) {
  202 + if (res && res.map) {
  203 + row.value['detail'] = res.map;
  204 +
  205 + // 清空其他页签得数据
  206 + if(res.map.name){
  207 + res.map.name.forEach(function(tab) {
  208 + delete row.value[tab.parentPropKey];
  209 + })
  210 + }
  211 + centerDialogVisible.value = true;
  212 + }
  213 + })
  214 + }
  215 +
  216 + // 加载其他页签数据
  217 + let handleClick = (tab, event) => {
  218 + let tabName = tab.props.name;
  219 + let resId = row.value['resId'];
  220 +
  221 + // 已加载
  222 + if (row.value[tabName]) {
  223 + return;
  224 + }
  225 + let id = encodeURIComponent(resId);
  226 + // 查询其他页签信息
  227 + proxy.$http.get(`/api-web/assets/configmanager/tab/detail?resId=${id}&parentKey=${tabName}`, {}, function (
  228 + res) {
  229 + if (res && res.map) {
  230 + edits.value[tabName] = false;
  231 + row.value[tabName] = res.map;
  232 + }
  233 + })
  234 + }
  235 +
  236 + // 二维表格添加
  237 + let addTabDetail = (tabName) => {
  238 + tabDelete.value[tabName] = true;
  239 + // // 设置取消状态
  240 + // tabDelete.value[tabName] = false;
  241 + // 设置编辑状态
  242 + edits.value[tabName] = false;
  243 + let val = row.value[tabName];
  244 + if(val && val.map && val.data){
  245 + let rowData = val.map;
  246 +
  247 + let keys = Object.keys(rowData);
  248 + let propGroup = (new Date()).getTime();
  249 +
  250 + let arr = [];
  251 + keys.forEach(function (k) {
  252 + var newProp = Object.create({});
  253 + Object.assign(newProp,rowData[k]);
  254 + newProp.propGroup = propGroup;
  255 + newProp.addItem = 1;
  256 + arr.push(newProp);
  257 + });
  258 +
  259 + val.data.push(arr);
  260 + }
  261 +
  262 + console.log(val);
  263 + }
  264 +
  265 + // 点击编辑按钮
  266 + let editConfig = (tabName) => {
  267 + edits.value[tabName] = true;
  268 + }
  269 +
  270 + // 点击取消
  271 + let cancelConfig = (tabName) => {
  272 + edits.value[tabName] = false;
  273 +
  274 + // 还原数据
  275 + let detail = row.value.detail[tabName];
  276 + if(detail){
  277 + // 基本信息
  278 + detail.forEach(function (v) {
  279 + var e = editKey.value[v.propKey];
  280 + if(e){
  281 + detail.propValue = e.oldValue;
  282 + detail.propValueText = e.propValueText;
  283 + e.edit = false;
  284 + }
  285 + })
  286 + }
  287 + // 二维列表信息
  288 + detail = row.value[tabName];
  289 + if(detail && detail.data){
  290 + tabDelete.value[tabName] = false;
  291 + let newArr = [];
  292 + detail.data.forEach(function (v,i) {
  293 + let addItem = detail.data[i][0].addItem;
  294 + if(addItem && addItem == 1){
  295 + //detail.data.splice(i, 1);
  296 + } else {
  297 + if(v && v.length > 0){
  298 + v.forEach(function(configItem){
  299 + var e = editKey.value[configItem.propKey];
  300 + if(e){
  301 + configItem.propValue = e.oldValue;
  302 + configItem.propValueText = e.propValueText;
  303 + e.edit = false;
  304 + }
  305 + })
  306 +
  307 + newArr.push(v);
  308 + }
  309 + }
  310 + });
  311 + detail.data = newArr;
  312 + }
  313 + }
  314 +
  315 + // 点击保存
  316 + let saveConfig = (tabName) => {
  317 + let resId = row.value['resId'];
  318 + let arr = [];
  319 + let detail = row.value.detail[tabName];
  320 + if(detail){
  321 + detail.forEach(function (v) {
  322 + arr.push({
  323 + resId:resId,
  324 + key:v.propKey,
  325 + val:v.propValue,
  326 + type:v.propType,
  327 + parentKey:v.parentPropKey,
  328 + parentGroup:v.propGroup,
  329 + sort:v.sort
  330 + })
  331 + });
  332 + proxy.$http.post(`/api-web/assets/configmanager/saveConfig`, arr, function (res) {
  333 + proxy.$global.showMsg('保存成功!');
  334 + editKey.value = {};
  335 + centerDialogVisible.value = false;
  336 + onSearch();
  337 + })
  338 + }
  339 + }
  340 +
  341 + // 保存二维属性
  342 + let saveTabConfig = (tabName) => {
  343 + let resId = row.value['resId'];
  344 + let arr = [];
  345 + let detail = row.value[tabName];
  346 + if(detail && detail.data){
  347 + detail.data.forEach(function (v) {
  348 + if(v && v.length > 0){
  349 + v.forEach(function(configItem){
  350 + arr.push({
  351 + resId:resId,
  352 + key:configItem.propKey,
  353 + val:configItem.propValue,
  354 + type:configItem.propType,
  355 + parentKey:configItem.parentPropKey,
  356 + parentGroup:configItem.propGroup,
  357 + sort:configItem.sort
  358 + })
  359 + })
  360 + }
  361 +
  362 + });
  363 + proxy.$http.post(`/api-web/assets/configmanager/saveConfig`, arr, function (res) {
  364 + proxy.$global.showMsg('保存成功!');
  365 + editKey.value = {};
  366 + centerDialogVisible.value = false;
  367 + onSearch();
  368 + })
  369 + }
  370 + }
  371 +
  372 + // 二维删除新增得选项
  373 + let deleConfigItem = (list,index,tabName) =>{
  374 + let detail = row.value[tabName];
  375 + if(detail && detail.data){
  376 + detail.data.splice(index,1);
  377 + }
  378 + }
  379 +
  380 + let callback = ( key, propValue,oldValue,propValueText) => {
  381 + let resId = row.value['resId'];
  382 + console.log("回调", resId, key, propValue,oldValue)
  383 + if(propValue == null || propValue == '' || propValue == oldValue){
  384 + return;
  385 + }
  386 +
  387 + editKey.value[key] = {
  388 + edit:true,
  389 + val:propValue,
  390 + oldValue: oldValue,
  391 + propValueText:propValueText == undefined ? oldValue : propValueText
  392 + };
  393 + }
  394 +
  395 + // 挂载完
  396 + Vue.onMounted(() => {
  397 + onSearch();
  398 + console.log('onMounted');
  399 + })
  400 +
  401 + return {
  402 + loadHead,
  403 + columns,
  404 + tableList,
  405 + pageInfo,
  406 + emptyText,
  407 + resTypeArr,
  408 + machineRoom,
  409 + widths,
  410 + onSearch,
  411 + getResType,
  412 + getMachineRoom,
  413 + openDetailPage,
  414 + centerDialogVisible,
  415 + row,
  416 + checkList,
  417 + activeName,
  418 + handleClick,
  419 + edits,
  420 + editConfig,
  421 + cancelConfig,
  422 + saveConfig,
  423 + callback,
  424 + editKey,
  425 + addTabDetail,
  426 + deleConfigItem,
  427 + saveTabConfig,
  428 + tabDelete,
  429 + handleSizeChange,
  430 + initFlag,
  431 + handleCurrentChange,
  432 + height,
  433 + onBtnSearch
  434 + }
  435 + }
  436 +}
@@ -19,6 +19,7 @@ @@ -19,6 +19,7 @@
19 <module>hg-monitor-web-base</module> 19 <module>hg-monitor-web-base</module>
20 <module>hg-monitor-web-new</module> 20 <module>hg-monitor-web-new</module>
21 <module>hg-monitor-web-tj</module> 21 <module>hg-monitor-web-tj</module>
  22 + <module>hg-monitor-web-zj</module>
22 </modules> 23 </modules>
23 <properties> 24 <properties>
24 <java.version>1.8</java.version> 25 <java.version>1.8</java.version>
@@ -49,7 +50,7 @@ @@ -49,7 +50,7 @@
49 <build> 50 <build>
50 <resources> 51 <resources>
51 <resource> 52 <resource>
52 - <directory>src/main/java</directory> 53 + <directory>src/main/resources</directory>
53 <includes> 54 <includes>
54 <include>**/**</include> 55 <include>**/**</include>
55 </includes> 56 </includes>