From 06edadf81782febd0da523fcb99aab55a0f3c635 Mon Sep 17 00:00:00 2001 From: limingyu <limingyu203@163.com> Date: Fri, 19 Apr 2024 08:41:55 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E5=8D=B1=E9=99=A9=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E5=8A=A8=E7=81=AB=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8=E4=B8=80?= =?UTF-8?q?=E5=85=AC=E5=8F=B8=E5=8A=A8=E7=81=AB=E5=92=8C=E4=B8=80=E5=85=AC?= =?UTF-8?q?=E5=8F=B8app=E5=8A=A8=E7=81=AB=E4=BD=9C=E4=B8=9A=E5=90=8C?= =?UTF-8?q?=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hotwork_list/components/detail_cfd.vue | 73 ++++++++++++----- .../hotwork_list/components/list_cfd.vue | 9 ++- src/views/map/dialog/hotworkFirst.vue | 78 ++++++++++++++----- src/views/map/dialog/index.vue | 2 +- 4 files changed, 121 insertions(+), 41 deletions(-) diff --git a/src/views/dangerousWork/hotwork/components/hotwork/hotwork_list/components/detail_cfd.vue b/src/views/dangerousWork/hotwork/components/hotwork/hotwork_list/components/detail_cfd.vue index ec737bb..e40c67d 100644 --- a/src/views/dangerousWork/hotwork/components/hotwork/hotwork_list/components/detail_cfd.vue +++ b/src/views/dangerousWork/hotwork/components/hotwork/hotwork_list/components/detail_cfd.vue @@ -35,6 +35,12 @@ <td class="bbg">动火人及证书编号</td> <td colspan="3">{{ pd.WORK_USER }}</td> </tr> + <tr> + <td class="bbg">动火操作人图片</td> + <td colspan="3"> + <img v-viewer v-for="(item,index) in pd.dongHuoCaoZuoRenPic" :src="pd.dongHuoCaoZuoRenPic[index]" :key="index" alt="" width="100" height="100"> + </td> + </tr> <tr> <td class="bbg">作业单位</td> <td>{{ pd.CONFIRM_DEPARTMENT_NAME }}</td> @@ -52,7 +58,7 @@ <tr :key="index"> <td class="bbg">分析结果/%</td> <td>{{ item.ANALYZE_RESULT }}</td> - <td class="bbg">分析人</td> + <td class="bbg">气体分析单位负责人</td> <td>{{ item.ANALYZE_USER }}</td> </tr> </template> @@ -97,28 +103,30 @@ {{ item.CONFIRM_NAME }} </td> </tr> - <tr v-if="pd.CONFIRM_USER_MEASURES || pd.LEADER_USER_MEASURES || pd.AUDIT_USER_MEASURES || pd.APPROVE_USER_MEASURES || pd.MONITOR_USER_MEASURES"> + <tr + v-if="pd.SAFETY_USER_MEASURES || pd.CONFIRM_OTHER_CONTENT || pd.BELONGING_USER_MEASURES || pd.GUARDIAN_USER_MEASURES || pd.LEADER_USER_MEASURES|| pd.AUDIT_USER_MEASURES || pd.APPROVE_USER_MEASURES || pd.MONITOR_USER_MEASURES"> <td>{{ measuresList.length + 1 }}</td> <td colspan="3"> - <div v-if="pd.CONFIRM_USER_MEASURES" style="display: flex;justify-content: space-between;"> - <span>其他安全措施:{{ pd.CONFIRM_USER_MEASURES }}</span> - <span>编制人:{{ pd.CONFIRM_USER_NAME }}</span> + <div v-if="pd.SAFETY_USER_MEASURES" style="display: flex;justify-content: space-between;"> + <span>安全措施确认人:{{ pd.SAFETY_USER_MEASURES }}</span> + </div> + <div v-if="pd.CONFIRM_OTHER_CONTENT" style="display: flex;justify-content: space-between;margin-top: 10px;"> + <span>作业负责人:{{ pd.CONFIRM_OTHER_CONTENT }}</span> + </div> + <div v-if="pd.BELONGING_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;"> + <span>项目责任负责人:{{ pd.BELONGING_USER_MEASURES }}</span> </div> <div v-if="pd.LEADER_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;"> - <span>其他安全措施:{{ pd.LEADER_USER_MEASURES }}</span> - <span>编制人:{{ pd.LEADER_USER_NAME }}</span> + <span>属地监管单位:{{ pd.LEADER_USER_MEASURES }}</span> </div> <div v-if="pd.AUDIT_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;"> - <span>其他安全措施:{{ pd.AUDIT_USER_MEASURES }}</span> - <span>编制人:{{ pd.AUDIT_USER_NAME }}</span> + <span>安全管理部门:{{ pd.AUDIT_USER_MEASURES }}</span> </div> <div v-if="pd.APPROVE_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;"> - <span>其他安全措施:{{ pd.APPROVE_USER_MEASURES }}</span> - <span>编制人:{{ pd.APPROVE_USER_NAME }}</span> + <span>动火审批人:{{ pd.APPROVE_USER_MEASURES }}</span> </div> <div v-if="pd.MONITOR_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;"> - <span>其他安全措施:{{ pd.MONITOR_USER_MEASURES }}</span> - <span>编制人:{{ pd.MONITOR_USER_NAME }}</span> + <span>动火前验票:{{ pd.MONITOR_USER_MEASURES }}</span> </div> </td> </tr> @@ -128,10 +136,10 @@ <tr> <td class="bbg">安全交底人</td> <td colspan="10"> - <div v-if="pd.CONFESS_USER_SIGNER_PATH" style="text-align: right"> + <div v-for="item in confessList" :key="item.USER_ID" style="text-align: right"> <span>签字:</span> - <img v-viewer :src="config.fileUrl + pd.CONFESS_USER_SIGNER_PATH" alt="" width="100" height="100"> - <span>{{ pd.CONFESS_USER_SIGNER_TIME }}</span> + <img v-viewer :src="config.fileUrl + item.APPROVAL_SIGNATURE" alt="" width="100" height="100"> + <span>{{ item.APPROVAL_SIGNATURE_TIME }}</span> </div> </td> </tr> @@ -155,6 +163,16 @@ </div> </td> </tr> + <tr> + <td class="bbg">安全措施确认人</td> + <td colspan="3"> + <div v-if="pd.SAFETY_SIGNATURE" style="text-align: right"> + <span>签字:</span> + <img v-viewer :src="config.fileUrl + pd.SAFETY_SIGNATURE" alt="" width="100" height="100"> + <span>{{ pd.SAFETY_SIGNATURE_TIME }}</span> + </div> + </td> + </tr> <tr v-if="pd.CONFIRM_USER_SIGNER_PATH"> <td colspan="6"> <div>作业负责人意见:{{ pd.CONFIRM_CONTENT }}</div> @@ -165,6 +183,16 @@ </div> </td> </tr> + <tr v-if="pd.BELONGING_SIGNATURE"> + <td colspan="6"> + <div>项目主管部门负责人意见:{{ pd.BELONGING_OPINIONS }}</div> + <div style="text-align: right"> + <span>签字:</span> + <img v-viewer :src="config.fileUrl + pd.BELONGING_SIGNATURE" alt="" width="100" height="100"> + <span>{{ pd.BELONGING_SIGNATURE_TIME }}</span> + </div> + </td> + </tr> <tr v-if="pd.LEADER_USER_SIGNER_PATH"> <td colspan="6"> <div>所在单位意见:{{ pd.LEADER_CONTENT }}</div> @@ -197,7 +225,7 @@ </tr> <tr v-if="pd.MONITOR_USER_SIGNER_PATH"> <td colspan="6"> - <div>动火前,岗位当班班长验票情况:{{ pd.MONITOR_CONTENT }}</div> + <div>动火前验票负责人:{{ pd.MONITOR_CONTENT }}</div> <div style="text-align: right"> <span>签字:</span> <img v-viewer :src="config.fileUrl + pd.MONITOR_USER_SIGNER_PATH" alt="" width="100" height="100"> @@ -238,7 +266,8 @@ export default { gasList: [], imgList: [], imgList1: [], - otherProtectiveMeasures: [] + otherProtectiveMeasures: [], + confessList: [] } }, created() { @@ -278,6 +307,7 @@ export default { this.pd = data.pd // 参数map this.imgList = data.imgList this.imgList1 = data.imgList1 + this.confessList = data.pd.confessList // 安全交底人 for (let i = 0; i < data.measuresList.length; i++) { // 将字符串转成数组 const PROTECTIVE_MEASURES = data.measuresList[i].PROTECTIVE_MEASURES.split('') @@ -313,6 +343,13 @@ export default { this.pd.APPROVE_USER_MEASURES = this.pd.OTHER_PROTECTIVE_MEASURES.split(';_;')[3] this.pd.MONITOR_USER_MEASURES = this.pd.OTHER_PROTECTIVE_MEASURES.split(';_;')[4] } + const dongHuoCaoZuoRenPic = data.imgList2 + if (dongHuoCaoZuoRenPic && dongHuoCaoZuoRenPic.length > 0) { + this.pd.dongHuoCaoZuoRenPic = [] + for (let i = 0; i < dongHuoCaoZuoRenPic.length; i++) { + this.pd.dongHuoCaoZuoRenPic.push(this.config.fileUrl + dongHuoCaoZuoRenPic[i].FILEPATH) + } + } }).catch((e) => { this.listLoading = false }) diff --git a/src/views/dangerousWork/hotwork/components/hotwork/hotwork_list/components/list_cfd.vue b/src/views/dangerousWork/hotwork/components/hotwork/hotwork_list/components/list_cfd.vue index 1612a84..a138821 100644 --- a/src/views/dangerousWork/hotwork/components/hotwork/hotwork_list/components/list_cfd.vue +++ b/src/views/dangerousWork/hotwork/components/hotwork/hotwork_list/components/list_cfd.vue @@ -52,12 +52,14 @@ <template slot-scope="{row}"> <span v-if="row.APPLY_STATUS==0">动火作业待提交</span> <span v-else-if="row.APPLY_STATUS==1">作业负责人待审核</span> - <span v-else-if="row.APPLY_STATUS==2">所在单位待审核</span> + <span v-else-if="row.APPLY_STATUS==1.5">项目负责人待审核</span> + <span v-else-if="row.APPLY_STATUS==2">属地监管单位待审核</span> <span v-else-if="row.APPLY_STATUS==4">安全管理部门待审核</span> <span v-else-if="row.APPLY_STATUS==5">动火审批人待审核</span> <span v-else-if="row.APPLY_STATUS==6">班长待验票</span> <span v-else-if="row.APPLY_STATUS==7">待验收</span> <span v-else-if="row.APPLY_STATUS==8">验收归档</span> + <span v-else-if="row.APPLY_STATUS==-1.5">项目负责人审核打回</span> <span v-else-if="row.APPLY_STATUS==-2">作业负责人审核打回</span> <span v-else-if="row.APPLY_STATUS==-4">所在单位审核打回</span> <span v-else-if="row.APPLY_STATUS==-5">安全管理部门审核打回</span> @@ -72,12 +74,14 @@ <template slot-scope="{row}"> <span v-if="row.APPLY_STATUS==0">{{ row.CONFIRM_USER_NAME }}</span> <span v-else-if="row.APPLY_STATUS==1">{{ row.CONFIRM_USER_NAME }}</span> + <span v-else-if="row.APPLY_STATUS==1.5">{{ row.BELONGING_USER_NAME }}</span> <span v-else-if="row.APPLY_STATUS==2">{{ row.LEADER_USER_NAME }}</span> <span v-else-if="row.APPLY_STATUS==4">{{ row.AUDIT_USER_NAME }}</span> <span v-else-if="row.APPLY_STATUS==5">{{ row.APPROVE_USER_NAME }}</span> <span v-else-if="row.APPLY_STATUS==6">{{ row.MONITOR_USER_NAME }}</span> <span v-else-if="row.APPLY_STATUS==7">{{ row.ACCEPT_USER_NAME }}</span> <span v-else-if="row.APPLY_STATUS==8">{{ row.ACCEPT_USER_NAME }}</span> + <span v-else-if="row.APPLY_STATUS==-1.5">{{ row.BELONGING_USER_NAME }}</span> <span v-else-if="row.APPLY_STATUS==-2">{{ row.CONFIRM_USER_NAME }}</span> <span v-else-if="row.APPLY_STATUS==-4">{{ row.LEADER_USER_NAME }}</span> <span v-else-if="row.APPLY_STATUS==-5">{{ row.AUDIT_USER_NAME }}</span> @@ -144,8 +148,7 @@ export default { statusList: [ { ID: '0', NAME: '特级' }, { ID: '1', NAME: '一级' }, - { ID: '2', NAME: '二级' }, - { ID: '4', NAME: '三级' } + { ID: '2', NAME: '二级' } ], STATUS: '', DEPTIDS: '' diff --git a/src/views/map/dialog/hotworkFirst.vue b/src/views/map/dialog/hotworkFirst.vue index ebb34b7..25d58b3 100644 --- a/src/views/map/dialog/hotworkFirst.vue +++ b/src/views/map/dialog/hotworkFirst.vue @@ -27,6 +27,12 @@ <td class="bbg-transparent">动火人及证书编号</td> <td colspan="3">{{ pd.WORK_USER }}</td> </tr> + <tr> + <td class="bbg-transparent">动火操作人图片</td> + <td colspan="3"> + <img v-viewer v-for="(item,index) in pd.dongHuoCaoZuoRenPic" :src="pd.dongHuoCaoZuoRenPic[index]" :key="index" alt="" width="100" height="100"> + </td> + </tr> <tr> <td class="bbg-transparent">作业单位</td> <td>{{ pd.CONFIRM_DEPARTMENT_NAME }}</td> @@ -44,7 +50,7 @@ <tr :key="index"> <td class="bbg-transparent">分析结果/%</td> <td>{{ item.ANALYZE_RESULT }}</td> - <td class="bbg-transparent">分析人</td> + <td class="bbg-transparent">气体单位负责人</td> <td>{{ item.ANALYZE_USER }}</td> </tr> </template> @@ -89,28 +95,33 @@ {{ item.CONFIRM_NAME }} </td> </tr> - <tr v-if="pd.CONFIRM_USER_MEASURES || pd.LEADER_USER_MEASURES || pd.AUDIT_USER_MEASURES || pd.APPROVE_USER_MEASURES || pd.MONITOR_USER_MEASURES"> + <tr v-if="pd.SAFETY_USER_MEASURES || pd.CONFIRM_OTHER_CONTENT || pd.BELONGING_USER_MEASURES || pd.GUARDIAN_USER_MEASURES || pd.LEADER_USER_MEASURES + || pd.AUDIT_USER_MEASURES || pd.APPROVE_USER_MEASURES || pd.MONITOR_USER_MEASURES"> <td>{{ measuresList.length + 1 }}</td> <td colspan="3"> - <div v-if="pd.CONFIRM_USER_MEASURES" style="display: flex;justify-content: space-between;"> - <span>其他安全措施:{{ pd.CONFIRM_USER_MEASURES }}</span> - <span>编制人:{{ pd.CONFIRM_USER_NAME }}</span> + <div v-if="pd.SAFETY_USER_MEASURES" style="display: flex;justify-content: space-between;"> + <span>安全措施确认人:{{ pd.SAFETY_USER_MEASURES }}</span> </div> + <div v-if="pd.CONFIRM_OTHER_CONTENT" style="display: flex;justify-content: space-between;margin-top: 10px;"> + <span>作业负责人:{{ pd.CONFIRM_OTHER_CONTENT }}</span> + </div> + <div v-if="pd.BELONGING_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;"> + <span>项目责任负责人:{{ pd.BELONGING_USER_MEASURES }}</span> + </div> + <!-- <div v-if="pd.GUARDIAN_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;">--> + <!-- <span>属地监管单位:{{ pd.GUARDIAN_USER_MEASURES }}</span>--> + <!-- </div>--> <div v-if="pd.LEADER_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;"> - <span>其他安全措施:{{ pd.LEADER_USER_MEASURES }}</span> - <span>编制人:{{ pd.LEADER_USER_NAME }}</span> + <span>属地监管单位:{{ pd.LEADER_USER_MEASURES }}</span> </div> <div v-if="pd.AUDIT_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;"> - <span>其他安全措施:{{ pd.AUDIT_USER_MEASURES }}</span> - <span>编制人:{{ pd.AUDIT_USER_NAME }}</span> + <span>安全管理部门:{{ pd.AUDIT_USER_MEASURES }}</span> </div> <div v-if="pd.APPROVE_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;"> - <span>其他安全措施:{{ pd.APPROVE_USER_MEASURES }}</span> - <span>编制人:{{ pd.APPROVE_USER_NAME }}</span> + <span>动火审批人:{{ pd.APPROVE_USER_MEASURES }}</span> </div> <div v-if="pd.MONITOR_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;"> - <span>其他安全措施:{{ pd.MONITOR_USER_MEASURES }}</span> - <span>编制人:{{ pd.MONITOR_USER_NAME }}</span> + <span>动火前验票:{{ pd.MONITOR_USER_MEASURES }}</span> </div> </td> </tr> @@ -120,10 +131,10 @@ <tr> <td class="bbg-transparent">安全交底人</td> <td colspan="10"> - <div v-if="pd.CONFESS_USER_SIGNER_PATH" style="text-align: right"> + <div v-for="item in confessList" :key="item.USER_ID" style="text-align: right"> <span>签字:</span> - <img v-viewer :src="config.fileUrl + pd.CONFESS_USER_SIGNER_PATH" alt="" width="100" height="100"> - <span>{{ pd.CONFESS_USER_SIGNER_TIME }}</span> + <img v-viewer :src="config.fileUrl + item.APPROVAL_SIGNATURE" alt="" width="100" height="100"> + <span>{{ item.APPROVAL_SIGNATURE_TIME }}</span> </div> </td> </tr> @@ -147,6 +158,16 @@ </div> </td> </tr> + <tr> + <td class="bbg-transparent">安全措施确认人</td> + <td colspan="3"> + <div v-if="pd.SAFETY_SIGNATURE" style="text-align: right"> + <span>签字:</span> + <img v-viewer :src="config.fileUrl + pd.SAFETY_SIGNATURE" alt="" width="100" height="100"> + <span>{{ pd.SAFETY_SIGNATURE_TIME }}</span> + </div> + </td> + </tr> <tr v-if="pd.CONFIRM_USER_SIGNER_PATH"> <td colspan="6"> <div>作业负责人意见:{{ pd.CONFIRM_CONTENT }}</div> @@ -157,9 +178,19 @@ </div> </td> </tr> + <tr v-if="pd.BELONGING_SIGNATURE"> + <td colspan="6"> + <div>项目主管部门负责人意见:{{ pd.BELONGING_OPINIONS }}</div> + <div style="text-align: right"> + <span>签字:</span> + <img v-viewer :src="config.fileUrl + pd.BELONGING_SIGNATURE" alt="" width="100" height="100"> + <span>{{ pd.BELONGING_SIGNATURE_TIME }}</span> + </div> + </td> + </tr> <tr v-if="pd.LEADER_USER_SIGNER_PATH"> <td colspan="6"> - <div>所在单位意见:{{ pd.LEADER_CONTENT }}</div> + <div>属地监管单位意见:{{ pd.LEADER_CONTENT }}</div> <div style="text-align: right"> <span>签字:</span> <img v-viewer :src="config.fileUrl + pd.LEADER_USER_SIGNER_PATH" alt="" width="100" height="100"> @@ -189,7 +220,7 @@ </tr> <tr v-if="pd.MONITOR_USER_SIGNER_PATH"> <td colspan="6"> - <div>动火前,岗位当班班长验票情况:{{ pd.MONITOR_CONTENT }}</div> + <div>动火前验票负责人:{{ pd.MONITOR_CONTENT }}</div> <div style="text-align: right"> <span>签字:</span> <img v-viewer :src="config.fileUrl + pd.MONITOR_USER_SIGNER_PATH" alt="" width="100" height="100"> @@ -241,7 +272,8 @@ export default { gasList: [], imgList: [], imgList1: [], - otherProtectiveMeasures: [] + otherProtectiveMeasures: [], + confessList: [] } }, created() { @@ -283,6 +315,7 @@ export default { this.pd = data.pd // 参数map this.imgList = data.imgList this.imgList1 = data.imgList1 + this.confessList = data.pd.confessList // 安全交底人 for (let i = 0; i < data.measuresList.length; i++) { // 将字符串转成数组 const PROTECTIVE_MEASURES = data.measuresList[i].PROTECTIVE_MEASURES.split('') @@ -318,6 +351,13 @@ export default { this.pd.APPROVE_USER_MEASURES = this.pd.OTHER_PROTECTIVE_MEASURES.split(';_;')[3] this.pd.MONITOR_USER_MEASURES = this.pd.OTHER_PROTECTIVE_MEASURES.split(';_;')[4] } + let dongHuoCaoZuoRenPic = data.imgList2 + if (dongHuoCaoZuoRenPic && dongHuoCaoZuoRenPic.length > 0) { + this.pd.dongHuoCaoZuoRenPic = [] + for (let i = 0; i < dongHuoCaoZuoRenPic.length; i++) { + this.pd.dongHuoCaoZuoRenPic.push(this.config.fileUrl + dongHuoCaoZuoRenPic[i].FILEPATH) + } + } }).catch((e) => { this.listLoading = false }) diff --git a/src/views/map/dialog/index.vue b/src/views/map/dialog/index.vue index 855fd0e..c2dc46e 100644 --- a/src/views/map/dialog/index.vue +++ b/src/views/map/dialog/index.vue @@ -27,7 +27,7 @@ <hotworkFirst v-if="type === 'HOTWORK' && corpInfoId === '035958e685cf4850bc40151c5e0617a6' " :id="id" :type="type" :gangkou="gangkou"/> <!--秦港一公司 动火作业 详细页面 end--> <!--其他公司 动火作业 详细页面 start--> - <hotwork v-if="type === 'HOTWORK' || type === 'HOTWORK00005' && corpInfoId !== '635917e77af8461691d5da5507b56347' && corpInfoId !== '035958e685cf4850bc40151c5e0617a6'" :id="id" :type="type" :gangkou="gangkou"/> + <hotwork v-if="(type === 'HOTWORK' || type === 'HOTWORK00005') && corpInfoId !== '635917e77af8461691d5da5507b56347' && corpInfoId !== '035958e685cf4850bc40151c5e0617a6'" :id="id" :type="type" :gangkou="gangkou"/> <!--其他公司 动火作业 详细页面 end--> <!--其他七项作业共用一个详细页面 start--> <confinedspace v-if="type === 'CONFINEDSPACE' || type === 'CONFINEDSPACE00005' && corpInfoId !== '635917e77af8461691d5da5507b56347'" :id="id" :type="type" :gangkou="gangkou"/> From 5e0f50acc1b0d6ba40887b8b2b197238761fb4ec Mon Sep 17 00:00:00 2001 From: limingyu <limingyu203@163.com> Date: Mon, 22 Apr 2024 17:46:13 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E4=B8=80=E5=85=AC=E5=8F=B8=E7=9B=91?= =?UTF-8?q?=E7=AE=A1=E7=AB=AF=E4=B8=8D=E6=98=BE=E7=A4=BA=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E4=BA=A4=E5=BA=95=E4=BA=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hotwork/hotwork_list/components/detail_cfd.vue | 6 +++++- src/views/map/dialog/hotworkFirst.vue | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/views/dangerousWork/hotwork/components/hotwork/hotwork_list/components/detail_cfd.vue b/src/views/dangerousWork/hotwork/components/hotwork/hotwork_list/components/detail_cfd.vue index e40c67d..1516918 100644 --- a/src/views/dangerousWork/hotwork/components/hotwork/hotwork_list/components/detail_cfd.vue +++ b/src/views/dangerousWork/hotwork/components/hotwork/hotwork_list/components/detail_cfd.vue @@ -307,7 +307,11 @@ export default { this.pd = data.pd // 参数map this.imgList = data.imgList this.imgList1 = data.imgList1 - this.confessList = data.pd.confessList // 安全交底人 + data.pd.confessList.forEach(item => { + if (item.APPROVAL_SIGNATURE_TIME !== undefined && item.APPROVAL_SIGNATURE_TIME.trim() !== '') { + this.confessList.push(item) + } + }) for (let i = 0; i < data.measuresList.length; i++) { // 将字符串转成数组 const PROTECTIVE_MEASURES = data.measuresList[i].PROTECTIVE_MEASURES.split('') diff --git a/src/views/map/dialog/hotworkFirst.vue b/src/views/map/dialog/hotworkFirst.vue index 25d58b3..7678907 100644 --- a/src/views/map/dialog/hotworkFirst.vue +++ b/src/views/map/dialog/hotworkFirst.vue @@ -315,7 +315,11 @@ export default { this.pd = data.pd // 参数map this.imgList = data.imgList this.imgList1 = data.imgList1 - this.confessList = data.pd.confessList // 安全交底人 + data.pd.confessList.forEach(item => { + if (item.APPROVAL_SIGNATURE_TIME !== undefined && item.APPROVAL_SIGNATURE_TIME.trim() !== '') { + this.confessList.push(item) + } + }) for (let i = 0; i < data.measuresList.length; i++) { // 将字符串转成数组 const PROTECTIVE_MEASURES = data.measuresList[i].PROTECTIVE_MEASURES.split('') From 906c10d1f2b5d87e3e3b60f0f276c025359a8446 Mon Sep 17 00:00:00 2001 From: liujun <liujun@zcloudchina.com> Date: Thu, 25 Apr 2024 14:50:40 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E8=BF=9E=E7=BB=AD=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E5=90=8E=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BAbug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/xgf/flow_audit/userInfo.vue | 70 ++++++++++++++++----------- 1 file changed, 41 insertions(+), 29 deletions(-) diff --git a/src/views/xgf/flow_audit/userInfo.vue b/src/views/xgf/flow_audit/userInfo.vue index 4953934..4f00b7b 100644 --- a/src/views/xgf/flow_audit/userInfo.vue +++ b/src/views/xgf/flow_audit/userInfo.vue @@ -19,7 +19,7 @@ <span v-if="imgUrl != ''"> <div class="img-flex"> <viewer> - <img :src="imgUrl" width="40" height="40" style="object-fit: cover;"> + <el-image :src="imgUrl" :preview-src-list="[imgUrl]" style="object-fit: cover; width: 40px; height: 40px" z-index="8000" /> </viewer> </div> </span> @@ -47,13 +47,13 @@ <span> <div class="img-flex"> <viewer> - <img + <el-image v-for="item in userCardIDPhotoFile" :src="config.fileUrl + item.FILEPATH" :key="item.IMGFILES_ID" - width="40" - height="40" - style="object-fit: cover;"> + :preview-src-list="[config.fileUrl + item.FILEPATH]" + z-index="8000" + style="object-fit: cover; width: 40px; height: 40px"/> </viewer> </div> </span> @@ -137,13 +137,13 @@ <td v-if="userDetailForm.ISPAY === '1'"> <span> <viewer> - <img + <el-image v-for="item in insuranceFileList" :src="config.fileUrl + item.FILEPATH" :key="item.IMGFILES_ID" - width="40" - height="40" - style="object-fit: cover;"> + :preview-src-list="[config.fileUrl + item.FILEPATH]" + z-index="8000" + style="object-fit: cover; width: 40px; height: 40px"/> </viewer> </span> </td> @@ -159,13 +159,13 @@ <td v-if="userDetailForm.IS_SIGN_LABOR === '1'" colspan="3"> <span> <viewer> - <img + <el-image v-for="item in contractFileList" :src="config.fileUrl + item.FILEPATH" :key="item.IMGFILES_ID" - width="40" - height="40" - style="object-fit: cover;"> + :preview-src-list="[config.fileUrl + item.FILEPATH]" + z-index="8000" + style="object-fit: cover; width: 40px; height: 40px"/> </viewer> </span> </td> @@ -178,13 +178,13 @@ <span> <div class="img-flex"> <viewer> - <img + <el-image v-for="item in photosOfLevel" :src="config.fileUrl + item.FILEPATH" :key="item.IMGFILES_ID" - width="40" - height="40" - style="object-fit: cover;"> + :preview-src-list="[config.fileUrl + item.FILEPATH]" + z-index="8000" + style="object-fit: cover; width: 40px; height: 40px"/> </viewer> </div> </span> @@ -258,9 +258,9 @@ <table v-for="(item,index) in specialUsersList" :key="index" class="table-ui" style="margin-bottom: 20px;"> <tr> <th style="width: 150px">证书名称</th> - <td style="width: 200px">{{ item.CERTIFICATE }}</td> + <td style="width: 150px">{{ item.CERTIFICATE }}</td> <th style="width: 150px">作业类别</th> - <td style="width: 200px">{{ item.SPECIAL_TYPE_NAME }}</td> + <td style="width: 180px">{{ item.SPECIAL_TYPE_NAME }}</td> <th style="width: 150px">操作项目</th> <td>{{ item.OPERATION_TYPE_NAME }}</td> <th style="width: 100px">证书照片</th> @@ -268,17 +268,16 @@ <span> <div class="img-flex"> <viewer> - <img + <el-image :src="config.fileUrl + item.FILEPATH" - width="40" - height="40" - style="object-fit: cover;"> - <img + :preview-src-list="[config.fileUrl + item.FILEPATH]" + z-index="8000" + style="object-fit: cover; width: 40px; height: 40px"/> + <el-image v-if="item.FILEPATH_BACK" - :src="config.fileUrl + item.FILEPATH_BACK" - width="40" - height="40" - style="object-fit: cover;"> + :preview-src-list="[config.fileUrl + item.FILEPATH_BACK]" + z-index="8000" + style="object-fit: cover; width: 40px; height: 40px"/> </viewer> </div> </span> @@ -413,7 +412,7 @@ </el-scrollbar> </div> <span slot="footer" class="dialog-footer"> - <el-button @click="visible = false">取 消</el-button> + <el-button @click="close">取 消</el-button> </span> </el-dialog> </div> @@ -511,6 +510,19 @@ export default { }, download(item) { useDownloadFile(item) + }, + close() { + this.visible = false + this.userDetailForm = {} + this.userCardIDPhotoFile = [] // 身份证照片 + this.trainRecordList = [] + this.photosOfLevel = [] // 三级教育照片 + this.specialUsersList = {} + this.insuranceFileList = [] // 保险文件 + this.contractFileList = [] + this.socialPhotoFile = [] + this.gongshangbaoxianFile = [] + this.applyList = [] } } } From 3fadbc6c6794c6edfbf978345efad1a73f3a364f Mon Sep 17 00:00:00 2001 From: liujun <liujun@zcloudchina.com> Date: Fri, 26 Apr 2024 14:45:14 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E7=9B=91=E7=AE=A1=E7=AB=AF=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=96=B9=E4=BA=BA=E5=91=98=E6=96=B0=E5=A2=9E=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=9D=A1=E4=BB=B6-=E4=BC=81=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xgf/allPeopleList/components/list.vue | 27 +++++++++++++++-- src/views/xgf/peopleList/components/list.vue | 29 +++++++++++++++++-- 2 files changed, 52 insertions(+), 4 deletions(-) diff --git a/src/views/xgf/allPeopleList/components/list.vue b/src/views/xgf/allPeopleList/components/list.vue index 38d8768..4f4de6e 100644 --- a/src/views/xgf/allPeopleList/components/list.vue +++ b/src/views/xgf/allPeopleList/components/list.vue @@ -31,6 +31,18 @@ </el-button> </el-form-item> </el-col> + <el-col :span="6"> + <el-form-item label="归属企业"> + <el-select v-model="BELONG_TO_CORP" filterable placeholder="请选择" style="width: 100%" > + <el-option + v-for="item in companyList" + :key="item.BELONG_TO_CORP" + :label="item.BELONG_TO_CORP_NAME" + :value="item.BELONG_TO_CORP"/> + </el-select> + </el-form-item> + </el-col> + </el-row> </el-form> <el-table @@ -126,7 +138,9 @@ export default { studyStatusList: [], checkStatusList: [], STUDY_STATUS: '', - CHECK_STATUS: '' + CHECK_STATUS: '', + BELONG_TO_CORP: '', + companyList: [] } }, created() { @@ -159,6 +173,7 @@ export default { this.STATUS = '' this.CHECK_STATUS = '' this.STUDY_STATUS = '' + this.BELONG_TO_CORP = '' this.getQuery() }, getList() { @@ -168,7 +183,8 @@ export default { { KEYWORDS: this.KEYWORDS, CHECK_STATUS: this.CHECK_STATUS, - STUDY_STATUS: this.STUDY_STATUS + STUDY_STATUS: this.STUDY_STATUS, + BELONG_TO_CORP: this.BELONG_TO_CORP } ).then((data) => { this.listLoading = false @@ -270,6 +286,13 @@ export default { }).catch((e) => { this.listLoading = false }) + requestFN( + '/xgf/user/getAllCorpInfo', {} + ).then((data) => { + this.companyList = data.list + }).catch((e) => { + this.loading = false + }) } } } diff --git a/src/views/xgf/peopleList/components/list.vue b/src/views/xgf/peopleList/components/list.vue index 669d7a8..d8a0450 100644 --- a/src/views/xgf/peopleList/components/list.vue +++ b/src/views/xgf/peopleList/components/list.vue @@ -31,6 +31,17 @@ </el-button> </el-form-item> </el-col> + <el-col :span="6"> + <el-form-item label="归属企业"> + <el-select v-model="BELONG_TO_CORP" filterable placeholder="请选择" style="width: 100%" > + <el-option + v-for="item in companyList" + :key="item.BELONG_TO_CORP" + :label="item.BELONG_TO_CORP_NAME" + :value="item.BELONG_TO_CORP"/> + </el-select> + </el-form-item> + </el-col> </el-row> </el-form> <el-table @@ -126,7 +137,9 @@ export default { studyStatusList: [], checkStatusList: [], STUDY_STATUS: '', - CHECK_STATUS: '' + CHECK_STATUS: '', + BELONG_TO_CORP: '', + companyList: [] } }, created() { @@ -157,6 +170,9 @@ export default { goKeyReset() { this.KEYWORDS = '' this.STATUS = '' + this.CHECK_STATUS = '' + this.BELONG_TO_CORP = '' + this.STUDY_STATUS = '' this.getQuery() }, getList() { @@ -167,7 +183,8 @@ export default { KEYWORDS: this.KEYWORDS, Step: '1', CHECK_STATUS: this.CHECK_STATUS, - STUDY_STATUS: this.STUDY_STATUS + STUDY_STATUS: this.STUDY_STATUS, + BELONG_TO_CORP: this.BELONG_TO_CORP } ).then((data) => { this.listLoading = false @@ -269,6 +286,14 @@ export default { }).catch((e) => { this.listLoading = false }) + + requestFN( + '/xgf/user/getAllCorpInfo', {} + ).then((data) => { + this.companyList = data.list + }).catch((e) => { + this.loading = false + }) } } } From ce586aaf31e85befefb10a4b341b7361e31cde72 Mon Sep 17 00:00:00 2001 From: liujun <liujun@zcloudchina.com> Date: Sun, 28 Apr 2024 14:54:52 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E9=9A=94=E7=A6=BB=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../safetyOperationRegulations/components/list.vue | 3 ++- .../safetyProductionManagementSystem/components/list.vue | 3 ++- .../safetyProductionResponsibilitySystem/components/list.vue | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/views/threeSystems/safetyOperationRegulations/components/list.vue b/src/views/threeSystems/safetyOperationRegulations/components/list.vue index 599e088..74fba10 100644 --- a/src/views/threeSystems/safetyOperationRegulations/components/list.vue +++ b/src/views/threeSystems/safetyOperationRegulations/components/list.vue @@ -306,7 +306,8 @@ export default { labels: JSON.stringify(this.form.labels), STATUS: this.form.STATUS, ASSOCIATION: '0', - CORPINFO_ID: '0' + CORPINFO_ID: '0', + MIGRATION_FLAG: '1' } ).then((data) => { this.listLoading = false diff --git a/src/views/threeSystems/safetyProductionManagementSystem/components/list.vue b/src/views/threeSystems/safetyProductionManagementSystem/components/list.vue index ea99bd5..573a026 100644 --- a/src/views/threeSystems/safetyProductionManagementSystem/components/list.vue +++ b/src/views/threeSystems/safetyProductionManagementSystem/components/list.vue @@ -242,7 +242,8 @@ export default { labels: JSON.stringify(this.form.labels), STATUS: this.form.STATUS, ASSOCIATION: '1', - CORPINFO_ID: '0' + CORPINFO_ID: '0', + MIGRATION_FLAG: '1' } ).then((data) => { this.listLoading = false diff --git a/src/views/threeSystems/safetyProductionResponsibilitySystem/components/list.vue b/src/views/threeSystems/safetyProductionResponsibilitySystem/components/list.vue index 6e375ec..6c2712d 100644 --- a/src/views/threeSystems/safetyProductionResponsibilitySystem/components/list.vue +++ b/src/views/threeSystems/safetyProductionResponsibilitySystem/components/list.vue @@ -280,7 +280,8 @@ export default { labels: JSON.stringify(this.form.labels), STATUS: this.form.STATUS, ASSOCIATION: '2', - CORPINFO_ID: '0' + CORPINFO_ID: '0', + MIGRATION_FLAG: '1' } ).then((data) => { this.listLoading = false From a3413eb6e5b068547409476c0bce6427d08120ca Mon Sep 17 00:00:00 2001 From: liujun <liujun@zcloudchina.com> Date: Sun, 28 Apr 2024 16:07:55 +0800 Subject: [PATCH 06/10] =?UTF-8?q?1=E3=80=81=E7=9B=B8=E5=85=B3=E6=96=B9?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=90=8D=E7=A7=B0=E9=94=99=E8=AF=AF=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=202=E3=80=81=E7=9B=B8=E5=85=B3=E6=96=B9=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=B9=B3=E5=8F=B0=E8=B5=84=E6=BA=90=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{uploadFile => upload-file}/index.vue | 0 src/components/uploadExcel/index.vue | 2 +- src/views/Label/components/editLabel.vue | 2 +- src/views/Label/components/editSonLabel.vue | 2 +- src/views/Label/components/selectLable.vue | 2 +- .../components/editTextLibrary.vue | 2 +- .../components/updateFile.vue | 2 +- .../components/editTextLibrary.vue | 2 +- .../components/updateFile.vue | 2 +- .../components/editTextLibrary.vue | 2 +- .../components/updateFile.vue | 2 +- .../components/editTextLibrary.vue | 2 +- .../components/updateFile.vue | 2 +- .../soLibrary/components/condition.vue | 188 ++++++ .../soLibrary/components/dashboard.vue | 38 ++ .../soLibrary/components/editTextLibrary.vue | 392 ++++++++++++ .../soLibrary/components/list.vue | 561 +++++++++++++++++ .../soLibrary/components/listEm.vue | 504 ++++++++++++++++ .../soLibrary/components/textLibraryInfo.vue | 146 +++++ .../soLibrary/components/updateLog.vue | 55 ++ .../soLibrary/components/updateSpeFile.vue | 77 +++ src/views/threeSystems/soLibrary/index.vue | 19 + .../spmLibrary/components/condition.vue | 188 ++++++ .../spmLibrary/components/dashboard.vue | 38 ++ .../spmLibrary/components/editTextLibrary.vue | 390 ++++++++++++ .../spmLibrary/components/list.vue | 562 ++++++++++++++++++ .../spmLibrary/components/listEm.vue | 503 ++++++++++++++++ .../spmLibrary/components/textLibraryInfo.vue | 146 +++++ .../spmLibrary/components/updateLog.vue | 55 ++ .../spmLibrary/components/updateSpeFile.vue | 77 +++ src/views/threeSystems/spmLibrary/index.vue | 19 + .../sprLibrary/components/condition.vue | 188 ++++++ .../sprLibrary/components/dashboard.vue | 38 ++ .../sprLibrary/components/editTextLibrary.vue | 390 ++++++++++++ .../sprLibrary/components/list.vue | 562 ++++++++++++++++++ .../sprLibrary/components/listEm.vue | 503 ++++++++++++++++ .../sprLibrary/components/textLibraryInfo.vue | 146 +++++ .../sprLibrary/components/updateLog.vue | 55 ++ .../sprLibrary/components/updateSpeFile.vue | 77 +++ src/views/threeSystems/sprLibrary/index.vue | 19 + 40 files changed, 5948 insertions(+), 12 deletions(-) rename src/components/{uploadFile => upload-file}/index.vue (100%) create mode 100644 src/views/threeSystems/soLibrary/components/condition.vue create mode 100644 src/views/threeSystems/soLibrary/components/dashboard.vue create mode 100644 src/views/threeSystems/soLibrary/components/editTextLibrary.vue create mode 100644 src/views/threeSystems/soLibrary/components/list.vue create mode 100644 src/views/threeSystems/soLibrary/components/listEm.vue create mode 100644 src/views/threeSystems/soLibrary/components/textLibraryInfo.vue create mode 100644 src/views/threeSystems/soLibrary/components/updateLog.vue create mode 100644 src/views/threeSystems/soLibrary/components/updateSpeFile.vue create mode 100644 src/views/threeSystems/soLibrary/index.vue create mode 100644 src/views/threeSystems/spmLibrary/components/condition.vue create mode 100644 src/views/threeSystems/spmLibrary/components/dashboard.vue create mode 100644 src/views/threeSystems/spmLibrary/components/editTextLibrary.vue create mode 100644 src/views/threeSystems/spmLibrary/components/list.vue create mode 100644 src/views/threeSystems/spmLibrary/components/listEm.vue create mode 100644 src/views/threeSystems/spmLibrary/components/textLibraryInfo.vue create mode 100644 src/views/threeSystems/spmLibrary/components/updateLog.vue create mode 100644 src/views/threeSystems/spmLibrary/components/updateSpeFile.vue create mode 100644 src/views/threeSystems/spmLibrary/index.vue create mode 100644 src/views/threeSystems/sprLibrary/components/condition.vue create mode 100644 src/views/threeSystems/sprLibrary/components/dashboard.vue create mode 100644 src/views/threeSystems/sprLibrary/components/editTextLibrary.vue create mode 100644 src/views/threeSystems/sprLibrary/components/list.vue create mode 100644 src/views/threeSystems/sprLibrary/components/listEm.vue create mode 100644 src/views/threeSystems/sprLibrary/components/textLibraryInfo.vue create mode 100644 src/views/threeSystems/sprLibrary/components/updateLog.vue create mode 100644 src/views/threeSystems/sprLibrary/components/updateSpeFile.vue create mode 100644 src/views/threeSystems/sprLibrary/index.vue diff --git a/src/components/uploadFile/index.vue b/src/components/upload-file/index.vue similarity index 100% rename from src/components/uploadFile/index.vue rename to src/components/upload-file/index.vue diff --git a/src/components/uploadExcel/index.vue b/src/components/uploadExcel/index.vue index 8c89d69..43b38cf 100644 --- a/src/components/uploadExcel/index.vue +++ b/src/components/uploadExcel/index.vue @@ -17,7 +17,7 @@ <script> import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包 import waves from '@/directive/waves' // waves directive -import uploadFile from '../uploadFile/index.vue' +import uploadFile from '../upload-file/index.vue' export default { components: { Pagination, uploadFile }, diff --git a/src/views/Label/components/editLabel.vue b/src/views/Label/components/editLabel.vue index 28da606..22ee67f 100644 --- a/src/views/Label/components/editLabel.vue +++ b/src/views/Label/components/editLabel.vue @@ -64,7 +64,7 @@ <script> import Pagination from '@/components/Pagination' import waves from '@/directive/waves' -import uploadFile from '../../../components/uploadFile' +import uploadFile from '../../../components/upload-file' import { requestFN } from '@/utils/request' import editSonLabel from './editSonLabel' diff --git a/src/views/Label/components/editSonLabel.vue b/src/views/Label/components/editSonLabel.vue index 8dd3c2b..4636901 100644 --- a/src/views/Label/components/editSonLabel.vue +++ b/src/views/Label/components/editSonLabel.vue @@ -27,7 +27,7 @@ <script> import Pagination from '@/components/Pagination' import waves from '@/directive/waves' -import uploadFile from '../../../components/uploadFile' +import uploadFile from '../../../components/upload-file' export default { components: { uploadFile, Pagination }, diff --git a/src/views/Label/components/selectLable.vue b/src/views/Label/components/selectLable.vue index febcb8e..793604f 100644 --- a/src/views/Label/components/selectLable.vue +++ b/src/views/Label/components/selectLable.vue @@ -56,7 +56,7 @@ <script> import Pagination from '@/components/Pagination' import waves from '@/directive/waves' -import uploadFile from '../../../components/uploadFile' +import uploadFile from '../../../components/upload-file' import { requestFN } from '@/utils/request' import editSonLabel from './editSonLabel' diff --git a/src/views/threeSystems/emergencyPlanManagement/components/editTextLibrary.vue b/src/views/threeSystems/emergencyPlanManagement/components/editTextLibrary.vue index 0e832c0..8b7a881 100644 --- a/src/views/threeSystems/emergencyPlanManagement/components/editTextLibrary.vue +++ b/src/views/threeSystems/emergencyPlanManagement/components/editTextLibrary.vue @@ -45,7 +45,7 @@ import { requestFN } from '@/utils/request' import editLabel from '../../../Label/components/editLabel.vue' import selectType from '../../../util/selectType.vue' import multipleChoice from '../../../util/multipleChoice.vue' -import uploadFile from '../../../../components/uploadFile/index.vue' +import uploadFile from '../../../../components/upload-file/index.vue' import TextEditing from '../../../util/textEditing.vue' export default { diff --git a/src/views/threeSystems/emergencyPlanManagement/components/updateFile.vue b/src/views/threeSystems/emergencyPlanManagement/components/updateFile.vue index ece604f..63cfb6f 100644 --- a/src/views/threeSystems/emergencyPlanManagement/components/updateFile.vue +++ b/src/views/threeSystems/emergencyPlanManagement/components/updateFile.vue @@ -15,7 +15,7 @@ import Pagination from '@/components/Pagination' import waves from '@/directive/waves' import { upload } from '@/utils/upload' -import uploadFile from '../../../../components/uploadFile/index.vue' +import uploadFile from '../../../../components/upload-file/index.vue' export default { components: { Pagination, uploadFile }, diff --git a/src/views/threeSystems/safetyOperationRegulations/components/editTextLibrary.vue b/src/views/threeSystems/safetyOperationRegulations/components/editTextLibrary.vue index a2f4635..22a38ef 100644 --- a/src/views/threeSystems/safetyOperationRegulations/components/editTextLibrary.vue +++ b/src/views/threeSystems/safetyOperationRegulations/components/editTextLibrary.vue @@ -79,7 +79,7 @@ import editLabel from '../../../Label/components/editLabel.vue' import selectLabel from '../../../Label/components/selectLable.vue' import selectType from '../../../util/selectType.vue' import multipleChoice from '../../../util/multipleChoice.vue' -import uploadFile from '../../../../components/uploadFile/index.vue' +import uploadFile from '../../../../components/upload-file/index.vue' import TextEditing from '../../../util/textEditing.vue' export default { diff --git a/src/views/threeSystems/safetyOperationRegulations/components/updateFile.vue b/src/views/threeSystems/safetyOperationRegulations/components/updateFile.vue index ece604f..63cfb6f 100644 --- a/src/views/threeSystems/safetyOperationRegulations/components/updateFile.vue +++ b/src/views/threeSystems/safetyOperationRegulations/components/updateFile.vue @@ -15,7 +15,7 @@ import Pagination from '@/components/Pagination' import waves from '@/directive/waves' import { upload } from '@/utils/upload' -import uploadFile from '../../../../components/uploadFile/index.vue' +import uploadFile from '../../../../components/upload-file/index.vue' export default { components: { Pagination, uploadFile }, diff --git a/src/views/threeSystems/safetyProductionManagementSystem/components/editTextLibrary.vue b/src/views/threeSystems/safetyProductionManagementSystem/components/editTextLibrary.vue index 1263e2c..3bdf4b2 100644 --- a/src/views/threeSystems/safetyProductionManagementSystem/components/editTextLibrary.vue +++ b/src/views/threeSystems/safetyProductionManagementSystem/components/editTextLibrary.vue @@ -59,7 +59,7 @@ import editLabel from '../../../Label/components/editLabel.vue' import selectLabel from '../../../Label/components/selectLable.vue' import selectType from '../../../util/selectType.vue' import multipleChoice from '../../../util/multipleChoice.vue' -import uploadFile from '../../../../components/uploadFile/index.vue' +import uploadFile from '../../../../components/upload-file/index.vue' import TextEditing from '../../../util/textEditing.vue' export default { diff --git a/src/views/threeSystems/safetyProductionManagementSystem/components/updateFile.vue b/src/views/threeSystems/safetyProductionManagementSystem/components/updateFile.vue index ece604f..63cfb6f 100644 --- a/src/views/threeSystems/safetyProductionManagementSystem/components/updateFile.vue +++ b/src/views/threeSystems/safetyProductionManagementSystem/components/updateFile.vue @@ -15,7 +15,7 @@ import Pagination from '@/components/Pagination' import waves from '@/directive/waves' import { upload } from '@/utils/upload' -import uploadFile from '../../../../components/uploadFile/index.vue' +import uploadFile from '../../../../components/upload-file/index.vue' export default { components: { Pagination, uploadFile }, diff --git a/src/views/threeSystems/safetyProductionResponsibilitySystem/components/editTextLibrary.vue b/src/views/threeSystems/safetyProductionResponsibilitySystem/components/editTextLibrary.vue index 9030247..7a40a16 100644 --- a/src/views/threeSystems/safetyProductionResponsibilitySystem/components/editTextLibrary.vue +++ b/src/views/threeSystems/safetyProductionResponsibilitySystem/components/editTextLibrary.vue @@ -59,7 +59,7 @@ import editLabel from '../../../Label/components/editLabel.vue' import selectLabel from '../../../Label/components/selectLable.vue' import selectType from '../../../util/selectType.vue' import multipleChoice from '../../../util/multipleChoice.vue' -import uploadFile from '../../../../components/uploadFile/index.vue' +import uploadFile from '../../../../components/upload-file/index.vue' import TextEditing from '../../../util/textEditing.vue' export default { diff --git a/src/views/threeSystems/safetyProductionResponsibilitySystem/components/updateFile.vue b/src/views/threeSystems/safetyProductionResponsibilitySystem/components/updateFile.vue index ece604f..63cfb6f 100644 --- a/src/views/threeSystems/safetyProductionResponsibilitySystem/components/updateFile.vue +++ b/src/views/threeSystems/safetyProductionResponsibilitySystem/components/updateFile.vue @@ -15,7 +15,7 @@ import Pagination from '@/components/Pagination' import waves from '@/directive/waves' import { upload } from '@/utils/upload' -import uploadFile from '../../../../components/uploadFile/index.vue' +import uploadFile from '../../../../components/upload-file/index.vue' export default { components: { Pagination, uploadFile }, diff --git a/src/views/threeSystems/soLibrary/components/condition.vue b/src/views/threeSystems/soLibrary/components/condition.vue new file mode 100644 index 0000000..c9af125 --- /dev/null +++ b/src/views/threeSystems/soLibrary/components/condition.vue @@ -0,0 +1,188 @@ +<template> + <el-drawer + v-if="visible" + ref="drawer" + :visible.sync="visible" + :before-close="close" + title="搜索条件" + size="50%"> + <div style="margin-left: 30px"> + <el-form ref="form" label-width="200px"> + <el-form-item label="规程属性:" prop="CATEGORY_LIST"> + <multiple-choice :dynamic-tags.sync="form.CATEGORY_LIST" :labels="categoryList" :row-key="key.categoryKey" :row-name="key.categoryName" title="选择"/> + </el-form-item> + <el-form-item label="类型:" prop="TYPES"> + <multiple-choice :dynamic-tags.sync="form.TYPES" :labels="typeList" :row-key="key.typeKey" :row-name="key.typeName" title="选择"/> + </el-form-item> + <el-form-item label="国民经济行业类型:" prop="SPECIFICATION_TYPES"> + <multiple-choice :dynamic-tags.sync="form.SPECIFICATION_TYPES" :labels="industryTypeList" :row-key="key.specificationTypeKey" :row-name="key.specificationTypeName" lazy title="选择"/> + </el-form-item> + <el-form-item label="标签:" prop="LABELS"> + <multiple-choice :dynamic-tags.sync="form.LABELS" :row-key="key.labelsKey" :row-name="key.labelsName" title="选择"/> + </el-form-item> + <el-form-item v-if="false" label="企业:"> + <el-select + v-model="form.CORPINFO_ID" + :remote-method="searchCorp" + :loading="selectLoading" + filterable + remote + reserve-keyword + placeholder="请输入关键词"> + <el-option + v-for="item in corp_list" + :key="item.CORPINFO_ID" + :label="item.CORP_NAME" + :value="item.CORPINFO_ID"/> + </el-select> + </el-form-item> + </el-form> + <div> + <el-button @click="closePanel">取 消</el-button> + <el-button :loading="loading" type="primary" @click="submit">{{ loading ? '提交中 ...' : '确 定' }}</el-button> + </div> + </div> + </el-drawer> +</template> +<script> +import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包 +import waves from '@/directive/waves' // waves directive +import { videoPlayer } from 'vue-video-player' +import 'video.js/dist/video-js.css' +import multipleChoice from '../../../util/multipleChoice.vue' +import { requestFN } from '@/utils/request' +export default { + components: { multipleChoice, Pagination, videoPlayer }, + directives: { waves }, + props: { + haveCorpFlag: { + type: Boolean, + default: false + } + }, + data() { + return { + visible: false, + loading: false, + key: { + typeKey: 'DICTIONARIES_ID', + typeName: 'NAME', + specificationTypeKey: 'DICTIONARIES_ID', + specificationTypeName: 'NAME', + categoryKey: 'DICTIONARIES_ID', + categoryName: 'NAME', + labelsKey: 'BUS_LABEL_FACTORY_ID', + labelsName: 'NAME' + }, + typeList: [], + industryTypeList: [], + categoryList: [], + form: { + CATEGORY_LIST: [''], + TYPES: [''], + SPECIFICATION_TYPES: [''], + LABELS: [''], + CORPINFO_ID: '' + }, + corp_list: [], + selectLoading: false + } + }, + watch: { + filterText(val) { + this.$refs.tree.filter(val) + } + }, + created() { + this.getDic() + }, + methods: { + init(tags) { + this.visible = true + }, + close(done) { + this.$confirm('确认关闭?') + .then(_ => { + this.form = { + CATEGORY_LIST: [''], + TYPES: [''], + SPECIFICATION_TYPES: [''], + LABELS: [''] + } + done() + }) + .catch(e => {}) + }, + closePanel() { + this.visible = false + this.form = { + CATEGORY_LIST: [''], + TYPES: [''], + SPECIFICATION_TYPES: [''], + LABELS: [''] + } + }, + submit() { + this.$emit('getResult', this.form) + this.visible = false + }, + getDic() { + // 安全操作规程类型 + requestFN( + 'dictionaries/getLevels', { DICTIONARIES_ID: 'ca4e4a7597f8485d8be323bd6876c40b' } + ).then((data) => { + this.typeList = data.list + }).catch((e) => { + this.loading = false + }) + // 操作规程行业类型 + requestFN( + 'dictionaries/getLevels', { DICTIONARIES_ID: 'f2598ba72e864eadabf0ca4b664d26b9' } + ).then((data) => { + this.industryTypeList = data.list + }).catch((e) => { + this.loading = false + }) + // 行业类别 + requestFN( + 'dictionaries/getLevels', { DICTIONARIES_ID: '99543742b79b473480617191f7ac256e' } + ).then((data) => { + this.categoryList = data.list + }).catch((e) => { + this.loading = false + }) + }, + clear() { + this.form = { + CATEGORY_LIST: [''], + TYPES: [''], + SPECIFICATION_TYPES: [''], + LABELS: [''], + TTRIBUTE_LIST: [''], + CORPINFO_ID: '' + } + }, + searchCorp(query) { + if (query !== '') { + this.selectLoading = true + requestFN( + 'corpinfo/list', { KEYWORDS: query } + ).then((data) => { + this.corp_list = data.varList + this.selectLoading = false + }).catch((e) => { + console.log(e) + this.selectLoading = false + }) + } + } + } +} + +</script> + +<style scoped> +.information >>> .el-scrollbar__wrap { + overflow-x: hidden; +} +</style> diff --git a/src/views/threeSystems/soLibrary/components/dashboard.vue b/src/views/threeSystems/soLibrary/components/dashboard.vue new file mode 100644 index 0000000..56486f2 --- /dev/null +++ b/src/views/threeSystems/soLibrary/components/dashboard.vue @@ -0,0 +1,38 @@ +<template> + <div class="app-container"> + <el-tabs type="border-card" @tab-click="changTab"> + <el-tab-pane label="安全操作规程平台资源库"> + <list/> + </el-tab-pane> + </el-tabs> + </div> +</template> +<style> +.el-table .warning-row { + background: oldlace; +} +</style> +<script> +import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包 +import waves from '@/directive/waves' +import List from './list.vue' +import ListEm from './listEm.vue' +export default { + components: { List, Pagination, ListEm }, + directives: { waves }, + data() { + return { + vectory: 'listEm' + } + }, + created() { + }, + methods: { + changTab(title) { + console.log(title.label) + if (title.label === '安全操作规程平台资源库') { this.vectory = 'list' } + if (title.label === '安全操作规程') { this.vectory = 'listEm' } + } + } +} +</script> diff --git a/src/views/threeSystems/soLibrary/components/editTextLibrary.vue b/src/views/threeSystems/soLibrary/components/editTextLibrary.vue new file mode 100644 index 0000000..6faae97 --- /dev/null +++ b/src/views/threeSystems/soLibrary/components/editTextLibrary.vue @@ -0,0 +1,392 @@ +<template> + <el-dialog v-loading="loading" v-if="dialogVisible" :visible.sync="dialogVisible" :title="title" destroy-on-close @close="clear" > + <el-form ref="form" :model="form" :rules="rules" label-width="180px"> + <el-form-item v-if="false" label="规程属性:" prop="CATEGORY_LIST"> + <multiple-choice :dynamic-tags.sync="form.CATEGORY_LIST" :labels="categoryList" :row-key="key.categoryKey" :row-name="key.categoryName" :limit="1" @getChooseOne="getChooseOne"/> + </el-form-item> + <el-form-item label="安全操作规程名称:" prop="REMARKS"> + <el-input v-model="form.REMARKS" style="width: 100%"/> + </el-form-item> + <el-form-item label="类型:" prop="TYPES"> + <multiple-choice :dynamic-tags.sync="form.TYPES" :labels="typeList" :row-key="key.typeKey" :row-name="key.typeName"/> + </el-form-item> + <el-form-item v-if="false" label="国民经济行业类型:" prop="SPECIFICATION_TYPES"> + <multiple-choice :dynamic-tags.sync="form.SPECIFICATION_TYPES" :labels="industryTypeList" :row-key="key.specificationTypeKey" :row-name="key.specificationTypeName" lazy/> + </el-form-item> + <el-form-item v-if="false" label="状态:" prop="STATUS"> + <el-select v-model="form.STATUS" placeholder="请选择" style="width: 100%;"> + <el-option label="停用" value="0"/> + <el-option label="启用" value="1"/> + </el-select> + </el-form-item> + <el-form-item v-if="!isEdit" label="文件:" prop="FILE"> + <upload-file :file-list.sync="form.FILE" :limit="1" :file-size="200" append-to-body accept=".pdf"/> + </el-form-item> + <el-form-item v-if="!isEdit" label="添加文件内容:"> + <el-button size="small" type="primary" @click="openTextEdit()">添加文件内容</el-button> + </el-form-item> + <el-form-item v-if="isEdit" label="添加文件内容:"> + <el-button size="small" type="primary" @click="openTextEdit({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID},true)">查看</el-button> + <el-button size="small" type="primary" @click="openTextEdit({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID},false)">编辑内容</el-button> + <el-button size="small" type="primary" @click="exportWord({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID})">导出word</el-button> + </el-form-item> + <el-form-item label="标签:" prop="labels"> + <multiple-choice :dynamic-tags.sync="form.labels" :row-key="key.labelsKey" :row-name="key.labelsName" can-add/> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button @click="goBack">取 消</el-button> + <el-button type="primary" @click="save">确 定</el-button> + </div> + <edit-label ref="editLabel" append-to-body/> + <select-label ref="selectLabel" append-to-body @getResult="getChooseTage"/> + <select-type ref="selectType" :limit="1" append-to-body @getResult="getType"/> + <text-editing ref="textEditing" :disabled="textDisabled" append-to-body title="文本编辑器" @getResult="getText"/> + </el-dialog> +</template> +<script> +import Pagination from '@/components/Pagination' +import waves from '@/directive/waves' +import { upload } from '@/utils/upload' +import { requestFN } from '@/utils/request' +import editLabel from '../../../Label/components/editLabel.vue' +import selectLabel from '../../../Label/components/selectLable.vue' +import selectType from '../../../util/selectType.vue' +import multipleChoice from '../../../util/multipleChoice.vue' +import UploadFile from '../../../../components/upload-file/index.vue' +import TextEditing from '../../../util/textEditing.vue' + +export default { + components: { TextEditing, Pagination, editLabel, selectLabel, selectType, multipleChoice, UploadFile }, + directives: { waves }, + props: { + title: { + type: String, + default: '' + } + }, + data() { + return { + dialogVisible: false, + form: { + REMARKS: '', + FILE: [], + labels: [''], + TYPE: '', + TYPES: [''], + SPECIFICATION_TYPES: [''], + CATEGORY_LIST: [''], + STATUS: '', + ASSOCIATION: '0', + types: [], + specification_types: [], + category_list: [], + TEXT_INFO: '' + }, + key: { + typeKey: 'DICTIONARIES_ID', + typeName: 'NAME', + specificationTypeKey: 'DICTIONARIES_ID', + specificationTypeName: 'NAME', + categoryKey: 'DICTIONARIES_ID', + categoryName: 'NAME', + labelsKey: 'BUS_LABEL_FACTORY_ID', + labelsName: 'NAME' + }, + rules: { + REMARKS: [{ required: true, message: '请输安全操作规程', trigger: 'change' }], + STATUS: [{ required: true, message: '请选择状态', trigger: 'change' }], + FILE: [{ required: true, message: '请选择文件', trigger: 'blur' }], + TYPES: [{ + required: true, + validator: (rules, value, callback) => { + if (!value || value.length === 0 || value[0] === '') { + return callback(new Error('类型必选')) + } + return callback() + }, + trigger: 'blur' + }], + SPECIFICATION_TYPES: [{ + required: true, + validator: (rules, value, callback) => { + if (!value || value.length === 0 || value[0] === '') { + return callback(new Error('操作规程行业类型必选')) + } + return callback() + }, + trigger: 'blur' + }], + CATEGORY_LIST: [{ + required: true, + validator: (rules, value, callback) => { + if (!value || value.length === 0 || value[0] === '') { + return callback(new Error('规程属性必选')) + } + return callback() + }, + trigger: 'blur' + }] + }, + + loading: false, + e: {}, + isEdit: false, + typeList: [], + industryTypeList: [], + categoryList: [], + + remoteControl: { + keyOne: true + }, + textDisabled: false + } + }, + methods: { + init(e) { + this.dialogVisible = true + this.e = e ? e.e : {} + this.isEdit = e ? e.isEdit : false + this.getDic() + if (e) { + this.loading = true + requestFN( + '/textLibrary/goEdit', + { BUS_TEXT_LIBRARY_ID: this.e.BUS_TEXT_LIBRARY_ID } + ).then((data) => { + this.loading = false + this.form = data.data + this.form.FILE = [] + this.form.types = [] + this.form.specification_types = [] + this.form.category_list = [] + + if (!this.form.TYPES || this.form.TYPES.length === 0) this.form.TYPES = [''] + if (!this.form.SPECIFICATION_TYPES || this.form.SPECIFICATION_TYPES.length === 0) this.form.SPECIFICATION_TYPES = [''] + if (!this.form.CATEGORY_LIST || this.form.CATEGORY_LIST.length === 0) this.form.CATEGORY_LIST = [''] + if (!this.form.labels || this.form.labels.length === 0) this.form.labels = [''] + + this.remoteControl.keyOne = !(this.form.CATEGORY_LIST[0].CATEGORY_ID === '8051d985a2bc406a83ea9360b64182b2') + }).catch((e) => { + this.$message.error(e) + this.loading = false + }) + } else { + this.isEdit = false + } + }, + save() { + if (this.checkForm()) { + return + } + this.$refs.form.validate((valid) => { + if (valid) { + const loading = this.$loading({ + lock: true, + text: '上传中...', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) + const formData = new FormData() + if (this.form.TEXT_INFO) this.form.TEXT_INFO = this.form.TEXT_INFO.replaceAll('<img', '<img style="max-width:100%"') + Object.keys(this.form).map(key => { + formData.append(key, this.form[key]) + }) + if (!this.isEdit) { + if (!this.form.FILE || this.form.FILE.length <= 0) { + this.$message.error('请上传文件') + loading.close() + return + } + } + for (let i = 0; i < this.form.FILE.length; i++) { + if (this.form.FILE[i].raw) { + formData.append('FILE', this.form.FILE[i].raw) + } + } + formData.append('labels', JSON.stringify(this.form.labels)) + for (let i = 0; i < this.form.TYPES.length; i++) { + if (this.form.TYPES[i]) { + this.form.types.push({ + CATEGORY: 'TYPES', + CATEGORY_ID: this.form.TYPES[i].DICTIONARIES_ID, + CATEGORY_NAME: this.form.TYPES[i].NAME + }) + } + } + formData.append('TYPES', JSON.stringify(this.form.types)) + for (let i = 0; i < this.form.SPECIFICATION_TYPES.length; i++) { + if (this.form.SPECIFICATION_TYPES[i]) { + this.form.specification_types.push({ + CATEGORY: 'SPECIFICATION_TYPES', + CATEGORY_ID: this.form.SPECIFICATION_TYPES[i].DICTIONARIES_ID, + CATEGORY_NAME: this.form.SPECIFICATION_TYPES[i].NAME + }) + } + } + formData.append('SPECIFICATION_TYPES', JSON.stringify(this.form.specification_types)) + if (!this.form.category_list) this.form.category_list = [] + this.form.category_list.push({ + CATEGORY: 'CATEGORY_LIST', + CATEGORY_ID: '31c2e389f2284ac48d54e85d56528092', + CATEGORY_NAME: '行业专属类' + }) + formData.append('CATEGORY_LIST', JSON.stringify(this.form.category_list)) + upload( + '/textLibrary/init', + formData + ).then((data) => { + loading.close() + this.dialogVisible = false + this.$emit('logical-end', { result: 'OK' }) + this.$message.success('保存成功') + }).catch((e) => { + loading.close() + console.log(e) + }) + this.clear() + } else { + return false + } + }) + }, + checkForm() { + if (this.form.labels.length > 15) { + this.$message.error('关联标签数不能超过15个') + return true + } + }, + goBack() { + this.dialogVisible = false + this.clear() + this.$emit('goBack', this.e) + }, + getChooseTage(e) { + if (e.TYPE === '0') { + const list = e.e + for (const listKey in list) { + const index = this.form.labels.findIndex(item => { + item.BUS_LABEL_FACTORY_ID === list[listKey].BUS_LABEL_FACTORY_ID + }) + if (index < 0) { + const label = JSON.parse(JSON.stringify(list[listKey])) + label.label = label.NAME + label.value = JSON.stringify(list[listKey]) + const index = this.form.labels.findIndex(item => item.value === label.value) + if (index < 0) { + this.form.labels.push(label) + } + } + } + } else { + if (e.e.length > 1) { + this.$message.error('只能选择一个类型') + return + } + this.form.TYPE_NAME = e.e[0].NAME + this.form.TYPE = e.e[0].BUS_LABEL_FACTORY_ID + this.$forceUpdate() + } + }, + getType(e) { + this.form.TYPE = e.info[0].DICTIONARIES_ID + this.form.TYPE_NAME = e.info[0].NAME + }, + clear() { + this.dialogVisible = false + console.log('clear') + this.isEdit = false + this.form = { + REMARKS: '', + FILE: [], + labels: [''], + TYPE: '', + TYPES: [''], + SPECIFICATION_TYPES: [''], + STATUS: '', + ASSOCIATION: '0', + types: [], + specification_types: [] + } + }, + getDic() { + // 安全操作规程类型 + requestFN( + 'dictionaries/getLevels', { DICTIONARIES_ID: 'ca4e4a7597f8485d8be323bd6876c40b' } + ).then((data) => { + this.typeList = data.list + }).catch((e) => { + this.loading = false + }) + // 操作规程行业类型 + requestFN( + 'dictionaries/getLevels', { DICTIONARIES_ID: 'f2598ba72e864eadabf0ca4b664d26b9' } + ).then((data) => { + this.industryTypeList = data.list + }).catch((e) => { + this.loading = false + }) + // 行业类别 + requestFN( + 'dictionaries/getLevels', { DICTIONARIES_ID: '99543742b79b473480617191f7ac256e' } + ).then((data) => { + this.categoryList = data.list + }).catch((e) => { + this.loading = false + }) + }, + getChooseOne(e) { + this.remoteControl.keyOne = !(e && e.info && e.info.DICTIONARIES_ID && e.info.DICTIONARIES_ID === '8051d985a2bc406a83ea9360b64182b2') + }, + openTextEdit(id, textDisabled) { + if (!id) { + this.textDisabled = false + this.$refs.textEditing.init({ text: this.form.TEXT_INFO }) + } else { + this.textDisabled = textDisabled + this.loading = true + requestFN('textLibrary/getTextInfo', id) + .then((data) => { + if (data.info && data.info.TEXT_INFO && data.info.TEXT_INFO !== '') { + this.$refs.textEditing.init({ text: data.info.TEXT_INFO }) + } else { + if (((!this.form.TEXT_INFO) || this.form.TEXT_INFO === '') && this.textDisabled) { + this.$message.error('此数据未维护文件内容') + } else { + this.$refs.textEditing.init({ text: this.form.TEXT_INFO }) + } + } + this.loading = false + }).catch((e) => { + console.log(e) + this.loading = false + }) + } + }, + getText(e) { + this.form.TEXT_INFO = e.text + }, + exportWord(info) { + this.loading = true + requestFN('textLibrary/getTextInfo', info) + .then((data) => { + if (data.info) { + if ((!data.info) || data.info.TEXT_INFO === '') { + this.$message.error('没有文件导出') + } else { + this.$message.success('导出成功') + window.open(config.httpurl + '/textLibrary/exportWord?BUS_TEXT_LIBRARY_ID=' + info.BUS_TEXT_LIBRARY_ID) + } + } else { + this.$message.error('此数据未维护文件内容') + } + this.loading = false + }).catch((e) => { + console.log(e) + this.loading = false + }) + } + } +} + +</script> diff --git a/src/views/threeSystems/soLibrary/components/list.vue b/src/views/threeSystems/soLibrary/components/list.vue new file mode 100644 index 0000000..bbf4709 --- /dev/null +++ b/src/views/threeSystems/soLibrary/components/list.vue @@ -0,0 +1,561 @@ +<template> + <div class="app-container"> + <div class="filter-container"> + <el-form label-width="50px"> + <el-row> + <el-col :span="6"> + <el-form-item label="安全操作规程名称:" label-width="150px"> + <el-input v-model="form.KEYWORDS" placeholder="请输入" class="filter-item"/> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label-width="10px"> + <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery"> + 搜索 + </el-button> + <el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="addCondition"> + 添加其他搜索条件 + </el-button> + <el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="clearMessage"> + 重置 + </el-button> + </el-form-item> + </el-col> + </el-row> + </el-form> + </div> + <el-table + v-loading="listLoading" + ref="multipleTable" + :row-key="getRowKey" + :data="varList" + :header-cell-style="{ + 'font-weight': 'bold', + 'color': '#000' + }" + :row-class-name="tableRowClassName" + tooltip-effect="dark" + border + fit + highlight-current-row + @cell-mouse-enter="enterSelectionRows" + @cell-mouse-leave="leaveSelectionRows"> + <el-table-column type="expand"> + <template slot-scope="props"> + <div style="text-align: left;padding: 10px;"> + <el-form label-position="left" inline> + <el-form-item label="标签"> + <el-tag + v-for="tag in props.row.labels" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.NAME }} + </el-tag> + </el-form-item> + <el-form-item label="国民经济行业类型"> + <div v-if="(props.row.SPECIFICATION_TYPES && props.row.SPECIFICATION_TYPES.length > 0) && ((!props.row.CATEGORY_LIST) || (!props.row.CATEGORY_LIST[0]) || (props.row.CATEGORY_LIST[0].CATEGORY_ID !== '691346658ed744a1bda2ed3a755f606c')) "> + <el-tag + v-for="tag in props.row.SPECIFICATION_TYPES" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </div> + <div v-else> + <el-tag type="warning">通用</el-tag> + </div> + </el-form-item> + </el-form> + </div> + </template> + </el-table-column> + <el-table-column + v-if="false" + :reserve-selection="true" + type="selection" + width="55" + align="center"/> + <el-table-column type="index" label="序号" width="50" align="center" /> + <el-table-column align="center" prop="REMARKS" label="安全操作规程名称" /> + <el-table-column align="center" prop="TYPES" label="类型" > + <template slot-scope="{row}"> + <el-tag + v-for="tag in row.TYPES" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </template> + </el-table-column> + <el-table-column v-if="false" prop="LABEL" align="center" label="标签" > + <template slot-scope="{row}"> + <el-tag + v-for="tag in row.labels" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.NAME }} + </el-tag> + </template> + </el-table-column> + <el-table-column v-if="false" align="center" prop="SPECIFICATION_TYPES" label="国民经济行业类型" width="300px"> + <template slot-scope="{row}"> + <div v-if="(row.SPECIFICATION_TYPES && row.SPECIFICATION_TYPES.length > 0) && ((!row.CATEGORY_LIST) || (!row.CATEGORY_LIST[0]) || (row.CATEGORY_LIST[0].CATEGORY_ID !== '8051d985a2bc406a83ea9360b64182b2')) "> + <el-tag + v-for="tag in row.SPECIFICATION_TYPES" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </div> + <div v-else> + <el-tag type="warning">通用</el-tag> + </div> + </template> + </el-table-column> + <el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" width="200px"/> + <el-table-column v-if="false" :show-overflow-tooltip="true" align="center" prop="UPLOAD_USER_NAME" width="100px" label="数据来源" > + <template slot-scope="{row}"> + {{ '资源库数据' }} + </template> + </el-table-column> + <el-table-column label="操作" align="center" width="200px"> + <template slot-scope="{row}"> + <el-row> + <el-col :span="14"> + <el-button v-show="!row.LOCKTOOL" type="primary" icon="el-icon-edit" size="mini" @click="handleExport(row)">导出</el-button> + </el-col> + <el-col :span="10"> + <el-button type="primary" icon="el-icon-edit" size="mini" @click="getInformation(row)">查看</el-button> + </el-col> + </el-row> + </template> + </el-table-column> + </el-table> + <div class="page-btn-group"> + <div/> + <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> + </div> + <edit-text-library ref="editTextLibrary" :title="title" @logical-end="saveClose"/> + <text-library-info ref="textLibraryInfo"/> + <update-spe-file ref="updateFile"/> + <update-log ref="updateLog"/> + <condition ref="condition" @getResult="getCondition"/> + </div> +</template> +<style> +.el-table .warning-row { + background: oldlace; +} +</style> +<script> +import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包 +import { requestFN } from '@/utils/request' +import waves from '@/directive/waves' +import editTextLibrary from './editTextLibrary.vue' +import textLibraryInfo from './textLibraryInfo.vue' +import updateLog from './updateLog.vue' +import condition from './condition.vue' +import UpdateSpeFile from './updateSpeFile.vue' +export default { + components: { UpdateSpeFile, Pagination, editTextLibrary, textLibraryInfo, updateLog, condition }, + directives: { waves }, + data() { + return { + config: config, + listLoading: true, + add: false, + del: false, + edit: false, + listQuery: { + page: 1, + limit: 10 + }, + total: 0, + form: { + KEYWORDS: '', + labels: [], + CATEGORY_LIST: [], + TYPES: [], + SPECIFICATION_TYPES: [], + STATUS: '' + }, + label_name: '', + + varList: [], + pd: [], + isEdit: false, + isLook: false, + title: '' + } + }, + created() { + this.getList() + }, + methods: { + getRowKey(row) { + return row.BUS_TEXT_LIBRARY_ID + }, + getQuery() { + this.$refs.multipleTable.clearSelection() + this.getList() + }, + addCondition() { + this.$refs.condition.init() + }, + getCondition(info) { + this.form.CATEGORY_LIST = info.CATEGORY_LIST + this.form.TYPES = info.TYPES + this.form.SPECIFICATION_TYPES = info.SPECIFICATION_TYPES + this.form.labels = info.LABELS + }, + clearMessage() { + this.label_name = '' + this.form = { + KEYWORDS: '', + labels: [], + CATEGORY_LIST: [], + TYPES: [], + SPECIFICATION_TYPES: [], + STATUS: '' + } + this.$refs.condition.clear() + this.getList() + }, + getList() { + this.listLoading = true + requestFN( + '/textLibrary/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, + { + KEYWORDS: this.form.KEYWORDS, + CATEGORY_LIST: JSON.stringify(this.form.CATEGORY_LIST), + TYPES: JSON.stringify(this.form.TYPES), + SPECIFICATION_TYPES: JSON.stringify(this.form.SPECIFICATION_TYPES), + labels: JSON.stringify(this.form.labels), + STATUS: this.form.STATUS, + ASSOCIATION: '0', + CORPINFO_ID: '0', + LIBRARY_FLAG: '1' + } + ).then((data) => { + this.listLoading = false + this.varList = data.varList + this.total = data.page.totalResult + this.hasButton() + this.pd = data.pd + }).catch((e) => { + this.listLoading = false + }) + }, + handleAdd() { + this.title = '新增' + this.$refs.editTextLibrary.init() + }, + handleEdit(e) { + this.title = '编辑' + this.$refs.editTextLibrary.init({ e: e, isEdit: true }) + }, + getInformation(e) { + this.$refs.textLibraryInfo.init({ e: e }) + }, + handleDelete(e) { + this.$confirm('确定要删除吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/delete', + { + BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID + } + ).then((data) => { + if (data.code === '0') { + this.$message({ + message: '删除成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.getList() + } else { + this.listLoading = false + this.$message.error(data.errorMessage) + } + }).catch((e) => { + this.listLoading = false + }) + }).catch((e) => { + console.log(e) + }) + }, + handleLock(e, flag) { + this.$confirm(flag === '1' ? '确定要锁定吗?' : '确定要解锁吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/lock', + { + BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID, + isLock: flag + } + ).then(() => { + this.$message({ + message: '操作成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch((e) => { + console.log(e) + }) + }, + handleTop(e, flag) { + this.$confirm(flag === '1' ? '确定要置顶吗?' : '确定要取消置顶吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/top', + { + BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID, + isTop: flag + } + ).then(() => { + this.$message({ + message: '操作成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch((e) => { + console.log(e) + }) + }, + handleExport(e) { + this.$confirm('确定要导出文件吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + if (e.MIGRATION_FLAG === '1') { + window.open(config.fileUrl + e.PATH) + } else { + window.open(e.PATH) + } + }).catch((e) => { + console.log(e) + }) + }, + batchDel() { + const _selectData = this.$refs.multipleTable.selection + if (_selectData == null || _selectData.length == 0) { + this.$message({ + message: '请选中要删除的项...', + type: 'error' + }) + return false + } + const _ids = _selectData.filter((item, index) => { + return item.LOCKTOOL + }) + if (_ids.length > 0) { + this.$message.error('选中的数据有锁定数据,请重新选择') + return + } + const ids = _selectData.map((item, index) => { + return item.BUS_TEXT_LIBRARY_ID + }).join(',') + + this.$confirm('确定要删除选中的数据吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/deleteAll', + { + DATA_IDS: ids + } + ).then(() => { + this.$message({ + message: '删除成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.$refs.multipleTable.clearSelection() + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch(() => { + }) + }, + hasButton: function() { + var keys = 'textlibraryOne:add,textlibraryOne:del,textlibraryOne:edit,toExcel' + requestFN( + '/head/hasButton', + { + keys: keys + } + ).then((data) => { + this.add = data.textlibraryOnefhadminadd // 新增权限 + this.del = data.textlibraryOnefhadmindel // 删除权限 + this.edit = data.textlibraryOnefhadminedit // 修改权限 + }).catch((e) => { + this.listLoading = false + }) + }, + tableRowClassName({ row, rowIndex }) { + if (row.ISTOPTIME) { + return 'warning-row' + } + }, + saveClose(e) { + this.getList() + }, + openUpdateFile(row) { + this.$refs.updateFile.init(row) + }, + openUpdateLog(row) { + this.$refs.updateLog.init(row) + }, + setStatus(row, status) { + this.listLoading = true + this.$confirm('是否更改状态?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + requestFN( + '/textLibrary/setStatus', + { + BUS_TEXT_LIBRARY_ID: row.BUS_TEXT_LIBRARY_ID, + STATUS: status + } + ).then((data) => { + this.listLoading = false + this.$message({ + type: 'success', + message: '修改成功!' + }) + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消' + }) + this.listLoading = false + }) + }, + handleCopy(row) { + this.$confirm('确定要将此条数据添加到本地', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.copyInfo(row) + }).catch((e) => { + console.log(e) + this.$message({ + type: 'info', + message: '已取消添加' + }) + }) + }, + copyInfo(row) { + requestFN( + '/textLibrary/copyToOperate?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, + { BUS_TEXT_LIBRARY_ID: row.BUS_TEXT_LIBRARY_ID } + ).then((data) => { + if (data.code === '0') { + this.$message.success('添加成功') + } else { + this.$message.success('添加失败') + } + }).catch((e) => { + this.$message.success('添加失败') + }) + }, + enterSelectionRows(row, column, cell, event) { + console.log(row, 'row') + if (row.ISTOPTIME) { + this.createTips(event, row, '数据已置顶') + } + }, + leaveSelectionRows(row, column, cell, event) { + if (row.ISTOPTIME) { + this.removeTips(row) + } + }, + createTips(el, row, value) { + const { BUS_TEXT_LIBRARY_ID } = row + const tooltipDom = document.createElement('div') + tooltipDom.style.cssText = ` + display: inline-block; + max-width: 400px; + max-height: 400px; + position: absolute; + top: ${el.clientY + 5}px; + left: ${el.clientX}px; + padding:5px 10px; + overflow: auto; + font-size: 12px; + font-family: PingFangSC-Regular, PingFang SC; + font-weight: 400; + color: #595959; + background: #fff; + border-radius: 5px; + z-index: 19999; + box-shadow: 0 4px 12px 1px #ccc; + ` + tooltipDom.innerHTML = value + tooltipDom.setAttribute('id', `tooltip-${BUS_TEXT_LIBRARY_ID}`) + // 将浮层插入到body中 + document.body.appendChild(tooltipDom) + }, + removeTips(row) { + console.log(row, 'row') + const { BUS_TEXT_LIBRARY_ID } = row + const tooltipDomLeave = document.querySelectorAll(`#tooltip-${BUS_TEXT_LIBRARY_ID}`) + if (tooltipDomLeave.length) { + tooltipDomLeave.forEach(dom => { + document.body.removeChild(dom) + }) + } + } + } +} +</script> diff --git a/src/views/threeSystems/soLibrary/components/listEm.vue b/src/views/threeSystems/soLibrary/components/listEm.vue new file mode 100644 index 0000000..2e5a16f --- /dev/null +++ b/src/views/threeSystems/soLibrary/components/listEm.vue @@ -0,0 +1,504 @@ +<template> + <div class="app-container"> + <div class="filter-container"> + <el-form label-width="50px"> + <el-row> + <el-col :span="6"> + <el-form-item label="安全操作规程名称:" label-width="150px"> + <el-input v-model="form.KEYWORDS" placeholder="请输入" class="filter-item"/> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label-width="10px"> + <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery"> + 搜索 + </el-button> + <el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="addCondition"> + 添加其他搜索条件 + </el-button> + <el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="clearMessage"> + 重置 + </el-button> + </el-form-item> + </el-col> + </el-row> + </el-form> + </div> + <el-table + v-loading="listLoading" + ref="multipleTable" + :row-key="getRowKey" + :data="varList" + :header-cell-style="{ + 'font-weight': 'bold', + 'color': '#000' + }" + :row-class-name="tableRowClassName" + tooltip-effect="dark" + border + fit + highlight-current-row + @cell-mouse-enter="enterSelectionRows" + @cell-mouse-leave="leaveSelectionRows"> + <el-table-column + :reserve-selection="true" + type="selection" + width="55" + align="center" + /> + <el-table-column type="index" label="序号" width="50" align="center" /> + <el-table-column align="center" prop="REMARKS" label="安全操作规程名称" /> + <el-table-column align="center" prop="TYPES" label="类型" > + <template slot-scope="{row}"> + <el-tag + v-for="tag in row.TYPES" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </template> + </el-table-column> + <el-table-column prop="LABEL" align="center" label="标签" > + <template slot-scope="{row}"> + <el-tag + v-for="tag in row.labels" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.NAME }} + </el-tag> + </template> + </el-table-column> + <el-table-column align="center" prop="SPECIFICATION_TYPES" label="国民经济行业类型" width="300px"> + <template slot-scope="{row}"> + <div v-if="row.SPECIFICATION_TYPES && row.SPECIFICATION_TYPES.length > 0"> + <el-tag + v-for="tag in row.SPECIFICATION_TYPES" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </div> + <div v-else> + <el-tag type="warning">通用</el-tag> + </div> + </template> + </el-table-column> + <el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" width="90px"/> + <el-table-column v-if="false" :show-overflow-tooltip="true" align="center" prop="UPLOAD_USER_NAME" width="100px" label="数据来源" > + <template slot-scope="{row}"> + {{ !row.CORP_NAME === '' ? '资源库数据' : row.CORP_NAME }} + </template> + </el-table-column> <el-table-column label="操作" align="center" width="200px"> + <template slot-scope="{row}"> + <el-row> + <el-col :span="24" style="padding-bottom: 10px"> + <el-button type="info" icon="el-icon-view" size="mini" @click="getInformation(row)">查看</el-button> + <el-button type="warning" icon="el-icon-printer" size="mini" @click="handleExport(row)">导出</el-button> + </el-col> + <el-col :span="24"> + <el-button v-if="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)">编辑</el-button> + <el-button v-if="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row)">删除</el-button> + </el-col> + </el-row> + </template> + </el-table-column> + </el-table> + <div class="page-btn-group"> + <div> + <el-button v-if="add" type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button> + </div> + <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> + </div> + <edit-text-library ref="editTextLibrary" :title="title" @logical-end="saveClose"/> + <text-library-info ref="textLibraryInfo"/> + <update-spe-file ref="updateFile"/> + <update-log ref="updateLog"/> + <condition ref="condition" have-corp-flag @getResult="getCondition"/> + </div> +</template> +<style> +.el-table .warning-row { + background: oldlace; +} +</style> +<script> +import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包 +import { requestFN } from '@/utils/request' +import waves from '@/directive/waves' +import editTextLibrary from './editTextLibrary.vue' +import textLibraryInfo from './textLibraryInfo.vue' +import updateLog from './updateLog.vue' +import UpdateLog from './updateLog.vue' +import condition from './condition.vue' +import UpdateSpeFile from './updateSpeFile.vue' +export default { + components: { UpdateSpeFile, UpdateLog, Pagination, editTextLibrary, textLibraryInfo, updateLog, condition }, + directives: { waves }, + data() { + return { + config: config, + listLoading: true, + add: false, + del: false, + edit: false, + listQuery: { + page: 1, + limit: 10 + }, + total: 0, + form: { + KEYWORDS: '', + labels: [], + CATEGORY_LIST: [], + TYPES: [], + SPECIFICATION_TYPES: [], + STATUS: '' + }, + label_name: '', + + varList: [], + pd: [], + isEdit: false, + isLook: false, + title: '' + } + }, + created() { + this.getList() + }, + methods: { + getRowKey(row) { + return row.BLACKSPOT_ID + }, + getQuery() { + this.$refs.multipleTable.clearSelection() + this.getList() + }, + addCondition() { + this.$refs.condition.init() + }, + getCondition(info) { + this.form.CATEGORY_LIST = info.CATEGORY_LIST + this.form.TYPES = info.TYPES + this.form.SPECIFICATION_TYPES = info.SPECIFICATION_TYPES + this.form.labels = info.LABELS + this.form.CORPINFO_ID = info.CORPINFO_ID + }, + clearMessage() { + this.label_name = '' + this.form = { + KEYWORDS: '', + labels: [], + CATEGORY_LIST: [], + TYPES: [], + SPECIFICATION_TYPES: [], + STATUS: '' + } + this.$refs.condition.clear() + this.getList() + }, + getList() { + this.listLoading = true + requestFN( + '/textLibrary/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, + { + KEYWORDS: this.form.KEYWORDS, + CATEGORY_LIST: JSON.stringify(this.form.CATEGORY_LIST), + TYPES: JSON.stringify(this.form.TYPES), + SPECIFICATION_TYPES: JSON.stringify(this.form.SPECIFICATION_TYPES), + labels: JSON.stringify(this.form.labels), + STATUS: this.form.STATUS, + ASSOCIATION: '0', + ENTERPRISE_SIDE: '0', + CORPINFO_ID: this.form.CORPINFO_ID + } + ).then((data) => { + this.listLoading = false + this.varList = data.varList + this.total = data.page.totalResult + this.hasButton() + this.pd = data.pd + }).catch((e) => { + this.listLoading = false + }) + }, + handleAdd() { + this.title = '新增' + this.$refs.editTextLibrary.init() + }, + handleEdit(e) { + this.title = '编辑' + this.$refs.editTextLibrary.init({ e: e, isEdit: true }) + }, + getInformation(e) { + this.$refs.textLibraryInfo.init({ e: e }) + }, + handleDelete(e) { + this.$confirm('确定要删除吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/delete', + { + BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID + } + ).then((data) => { + if (data.code === '0') { + this.$message({ + message: '删除成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.getList() + } else { + this.listLoading = false + this.$message.error(data.errorMessage) + } + }).catch((e) => { + this.listLoading = false + }) + }).catch((e) => { + console.log(e) + }) + }, + handleLock(e, flag) { + this.$confirm(flag === '1' ? '确定要锁定吗?' : '确定要解锁吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/lock', + { + BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID, + isLock: flag + } + ).then(() => { + this.$message({ + message: '操作成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch((e) => { + console.log(e) + }) + }, + handleTop(e, flag) { + this.$confirm(flag === '1' ? '确定要置顶吗?' : '确定要取消置顶吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/top', + { + BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID, + isTop: flag + } + ).then(() => { + this.$message({ + message: '操作成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch((e) => { + console.log(e) + }) + }, + handleExport(e) { + this.$confirm('确定要导出文件吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + if (e.MIGRATION_FLAG === '1') { + window.open(config.fileUrl + e.PATH) + } else { + window.open(e.PATH) + } + }).catch((e) => { + console.log(e) + }) + }, + batchDel() { + const _selectData = this.$refs.multipleTable.selection + if (_selectData == null || _selectData.length == 0) { + this.$message({ + message: '请选中要删除的项...', + type: 'error' + }) + return false + } + const _ids = _selectData.filter((item, index) => { + return item.LOCKTOOL + }) + if (_ids.length > 0) { + this.$message.error('选中的数据有锁定数据,请重新选择') + return + } + const ids = _selectData.map((item, index) => { + return item.BUS_TEXT_LIBRARY_ID + }).join(',') + + this.$confirm('确定要删除选中的数据吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/deleteAll', + { + DATA_IDS: ids + } + ).then(() => { + this.$message({ + message: '删除成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.$refs.multipleTable.clearSelection() + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch(() => { + }) + }, + hasButton: function() { + var keys = 'textlibraryOne:add,textlibraryOne:del,textlibraryOne:edit,toExcel' + requestFN( + '/head/hasButton', + { + keys: keys + } + ).then((data) => { + this.add = data.textlibraryOnefhadminadd // 新增权限 + this.del = data.textlibraryOnefhadmindel // 删除权限 + this.edit = data.textlibraryOnefhadminedit // 修改权限 + }).catch((e) => { + this.listLoading = false + }) + }, + tableRowClassName({ row, rowIndex }) { + if (row.ISTOPTIME) { + return 'warning-row' + } + }, + saveClose(e) { + this.getList() + }, + openUpdateFile(row) { + this.$refs.updateFile.init(row) + }, + openUpdateLog(row) { + this.$refs.updateLog.init(row) + }, + setStatus(row, status) { + this.listLoading = true + this.$confirm('是否更改状态?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + requestFN( + '/textLibrary/setStatus', + { + BUS_TEXT_LIBRARY_ID: row.BUS_TEXT_LIBRARY_ID, + STATUS: status + } + ).then((data) => { + this.listLoading = false + this.$message({ + type: 'success', + message: '修改成功!' + }) + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消' + }) + this.listLoading = false + }) + }, + enterSelectionRows(row, column, cell, event) { + console.log('row', row) + if (row.ISTOPTIME) { + this.createTips(event, row, '数据已置顶') + } + }, + leaveSelectionRows(row, column, cell, event) { + if (row.ISTOPTIME) { + this.removeTips(row) + } + }, + createTips(el, row, value) { + const { BUS_TEXT_LIBRARY_ID } = row + const tooltipDom = document.createElement('div') + tooltipDom.style.cssText = ` + display: inline-block; + max-width: 400px; + max-height: 400px; + position: absolute; + top: ${el.clientY + 5}px; + left: ${el.clientX}px; + padding:5px 10px; + overflow: auto; + font-size: 12px; + font-family: PingFangSC-Regular, PingFang SC; + font-weight: 400; + color: #595959; + background: #fff; + border-radius: 5px; + z-index: 19999; + box-shadow: 0 4px 12px 1px #ccc; + ` + tooltipDom.innerHTML = value + tooltipDom.setAttribute('id', `tooltip-${BUS_TEXT_LIBRARY_ID}`) + // 将浮层插入到body中 + document.body.appendChild(tooltipDom) + }, + removeTips(row) { + console.log(row, 'row') + const { BUS_TEXT_LIBRARY_ID } = row + const tooltipDomLeave = document.querySelectorAll(`#tooltip-${BUS_TEXT_LIBRARY_ID}`) + if (tooltipDomLeave.length) { + tooltipDomLeave.forEach(dom => { + document.body.removeChild(dom) + }) + } + } + } +} +</script> diff --git a/src/views/threeSystems/soLibrary/components/textLibraryInfo.vue b/src/views/threeSystems/soLibrary/components/textLibraryInfo.vue new file mode 100644 index 0000000..b104a8f --- /dev/null +++ b/src/views/threeSystems/soLibrary/components/textLibraryInfo.vue @@ -0,0 +1,146 @@ +<template> + <el-dialog v-loading="loading" v-if="dialogVisible" :visible.sync="dialogVisible" title="详情"> + <el-form ref="form" :model="form" label-width="180px"> + <el-form-item label="安全操作规程名称:" prop="FILE_NAME"> + <el-input v-model="form.REMARKS" disabled style="width: 70%"/> + </el-form-item> + <el-form-item label="规程属性:" prop="FILE_NAME"> + <el-tag + v-for="tag in form.CATEGORY_LIST" + :key="tag.value" + :disable-transitions="false" + style="margin-right: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </el-form-item> + <el-form-item label="类型:" prop="FILE_NAME"> + <el-tag + v-for="tag in form.TYPES" + :key="tag.value" + :disable-transitions="false" + style="margin-right: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </el-form-item> + <el-form-item v-if="remoteControl.keyOne" label="国民经济行业类型:" prop="FILE_NAME"> + <el-tag v-for="tag in form.SPECIFICATION_TYPES" :key="tag.value" :disable-transitions="false" style="margin-right: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </el-form-item> + <el-form-item label="上传时间:" prop="FILE_NAME"> + <el-input v-model="form.UPLOAD_TIME" disabled style="width: 70%"/> + </el-form-item> + <el-form-item label="上传人:" prop="FILE_NAME"> + <el-input v-model="form.UPLOAD_USER_NAME" disabled style="width: 70%"/> + </el-form-item> + <el-form-item prop="tags" label="标签:"> + <el-tag + v-for="tag in form.labels" + :key="tag.value" + :disable-transitions="false" + style="margin-right: 10px"> + {{ tag.NAME }} + </el-tag> + </el-form-item> + <el-form-item label="文件详情:"> + <el-button size="small" type="primary" @click="openTextEdit({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID})">查看文件详情</el-button> + <el-button size="small" type="primary" @click="exportWord(form)">导出word</el-button> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button @click="goBack">返 回</el-button> + </div> + <text-editing ref="textEditing" :disabled="true" append-to-body title="文本编辑器"/> + </el-dialog> +</template> +<script> +import Pagination from '@/components/Pagination' +import waves from '@/directive/waves' +import { requestFN } from '@/utils/request' +import TextEditing from '../../../util/textEditing.vue' + +export default { + components: { TextEditing, Pagination }, + directives: { waves }, + data() { + return { + config: config, + dialogVisible: false, + form: { + BUS_TEXT_LIBRARY_ID: '', + FILE_NAME: '', + FILE: [], + TYPE: '', + labels: [], + UPLOAD_TIME: '', + UPLOAD_USER_NAME: '' + }, + loading: false, + remoteControl: { + keyOne: true + } + } + }, + methods: { + init(e) { + this.dialogVisible = true + this.loading = true + this.e = e.e + requestFN( + '/textLibrary/goEdit', + { + BUS_TEXT_LIBRARY_ID: this.e.BUS_TEXT_LIBRARY_ID + } + ).then((data) => { + this.loading = false + this.form = data.data + this.form.FILE = [] + this.remoteControl.keyOne = !(this.form.CATEGORY_LIST[0].CATEGORY_ID === '8051d985a2bc406a83ea9360b64182b2') + }).catch((e) => { + this.$message.error(e) + this.loading = false + }) + }, + goBack() { + this.dialogVisible = false + this.$emit('goBack', this.e) + }, + openTextEdit(id) { + this.loading = true + requestFN('textLibrary/getTextInfo', id) + .then((data) => { + if (data.info && data.info.TEXT_INFO && data.info.TEXT_INFO !== '') { + this.$refs.textEditing.init({ text: data.info.TEXT_INFO }) + } else { + this.$message.error('此数据未维护文件内容') + } + this.loading = false + }).catch((e) => { + console.log(e) + this.loading = false + }) + }, + exportWord(info) { + this.loading = true + requestFN('textLibrary/getTextInfo', info) + .then((data) => { + if (data.info) { + if ((!data.info) || data.info.TEXT_INFO === '') { + this.$message.error('没有文件导出') + } else { + this.$message.success('导出成功') + window.open(config.httpurl + '/textLibrary/exportWord?BUS_TEXT_LIBRARY_ID=' + info.BUS_TEXT_LIBRARY_ID) + } + } else { + this.$message.error('此数据未维护文件内容') + } + this.loading = false + }).catch((e) => { + console.log(e) + this.loading = false + }) + } + } +} + +</script> diff --git a/src/views/threeSystems/soLibrary/components/updateLog.vue b/src/views/threeSystems/soLibrary/components/updateLog.vue new file mode 100644 index 0000000..ee30bd2 --- /dev/null +++ b/src/views/threeSystems/soLibrary/components/updateLog.vue @@ -0,0 +1,55 @@ +<template> + <el-dialog v-loading="loading" v-if="visible" :visible.sync="visible" title="替换"> + <el-table :data="list"> + <el-table-column prop="CREATE_TIME" label="日期"/> + <el-table-column prop="CREATOR_NAME" label="姓名"/> + </el-table> + <div slot="footer" class="dialog-footer"> + <el-button @click="goBack">取 消</el-button> + </div> + </el-dialog> +</template> +<script> +import Pagination from '@/components/Pagination' +import waves from '@/directive/waves' +import { requestFN } from '@/utils/request' + +export default { + components: { Pagination }, + directives: { waves }, + data() { + return { + visible: false, + list: [], + loading: false, + id: '' + } + }, + methods: { + init(e) { + this.visible = true + this.id = e.BUS_TEXT_LIBRARY_ID + this.getList() + }, + goBack() { + this.list = [] + this.visible = false + }, + getList() { + this.loading = true + requestFN( + '/textLibrary/getUpdateLog', + { + BUS_TEXT_LIBRARY_ID: this.id + } + ).then((data) => { + this.loading = false + this.list = data.list + }).catch((e) => { + this.loading = false + }) + } + } +} + +</script> diff --git a/src/views/threeSystems/soLibrary/components/updateSpeFile.vue b/src/views/threeSystems/soLibrary/components/updateSpeFile.vue new file mode 100644 index 0000000..63cfb6f --- /dev/null +++ b/src/views/threeSystems/soLibrary/components/updateSpeFile.vue @@ -0,0 +1,77 @@ +<template> + <el-dialog v-loading="loading" v-if="visible" :visible.sync="visible" title="替换"> + <el-form ref="form" :model="form" :rules="rules" label-width="150px"> + <el-form-item label="文件:" prop="FILE"> + <upload-file :file-list.sync="form.FILE" :limit="1" :file-size="200" append-to-body accept=".pdf"/> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button @click="goBack">取 消</el-button> + <el-button type="primary" @click="save">确 定</el-button> + </div> + </el-dialog> +</template> +<script> +import Pagination from '@/components/Pagination' +import waves from '@/directive/waves' +import { upload } from '@/utils/upload' +import uploadFile from '../../../../components/upload-file/index.vue' + +export default { + components: { Pagination, uploadFile }, + directives: { waves }, + data() { + return { + visible: false, + form: { + FILE: [], + BUS_TEXT_LIBRARY_ID: '' + }, + rules: { + FILE: [{ required: true, message: '请选择文件', trigger: 'blur' }] + }, + loading: false + } + }, + methods: { + init(e) { + this.visible = true + this.form.BUS_TEXT_LIBRARY_ID = e.BUS_TEXT_LIBRARY_ID + }, + goBack() { + this.form = { + FILE: [], + BUS_TEXT_LIBRARY_ID: '' + } + this.visible = false + }, + save() { + const loading = this.$loading({ + lock: true, + text: '上传中...', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) + const formData = new FormData() + for (let i = 0; i < this.form.FILE.length; i++) { + if (this.form.FILE[i].raw) { + formData.append('FILE', this.form.FILE[i].raw) + } + } + formData.append('BUS_TEXT_LIBRARY_ID', this.form.BUS_TEXT_LIBRARY_ID) + upload( + '/textLibrary/updateFile', + formData + ).then((data) => { + loading.close() + this.visible = false + this.$emit('logical-end', { result: 'OK' }) + }).catch((e) => { + loading.close() + console.log(e) + }) + } + } +} + +</script> diff --git a/src/views/threeSystems/soLibrary/index.vue b/src/views/threeSystems/soLibrary/index.vue new file mode 100644 index 0000000..8d78561 --- /dev/null +++ b/src/views/threeSystems/soLibrary/index.vue @@ -0,0 +1,19 @@ +<template> + <div> + <List v-if="activeName==='List'" ref="list" /> + <Dashboard v-if="activeName==='Dashboard'" ref="Dashboard"/> + </div> +</template> +<script> +import List from './components/list.vue' +import Dashboard from './components/dashboard.vue' +export default { + components: { List, Dashboard }, + data() { + return { + activeName: 'Dashboard' + } + } +} + +</script> diff --git a/src/views/threeSystems/spmLibrary/components/condition.vue b/src/views/threeSystems/spmLibrary/components/condition.vue new file mode 100644 index 0000000..051c13e --- /dev/null +++ b/src/views/threeSystems/spmLibrary/components/condition.vue @@ -0,0 +1,188 @@ +<template> + <el-drawer + v-if="visible" + ref="drawer" + :visible.sync="visible" + :before-close="close" + title="搜索条件" + size="50%"> + <div style="margin-left: 30px"> + <el-form ref="form" label-width="200px"> + <el-form-item label="规程属性:" prop="CATEGORY_LIST"> + <multiple-choice :dynamic-tags.sync="form.CATEGORY_LIST" :labels="categoryList" :row-key="key.categoryKey" :row-name="key.categoryName" title="选择"/> + </el-form-item> + <el-form-item label="类型:" prop="TYPES"> + <multiple-choice :dynamic-tags.sync="form.TYPES" :labels="typeList" :row-key="key.typeKey" :row-name="key.typeName" title="选择"/> + </el-form-item> + <el-form-item label="国民经济行业类型:" prop="SPECIFICATION_TYPES"> + <multiple-choice :dynamic-tags.sync="form.SPECIFICATION_TYPES" :labels="industryTypeList" :row-key="key.specificationTypeKey" :row-name="key.specificationTypeName" lazy title="选择"/> + </el-form-item> + <el-form-item label="标签:" prop="LABELS"> + <multiple-choice :dynamic-tags.sync="form.LABELS" :row-key="key.labelsKey" :row-name="key.labelsName" title="选择"/> + </el-form-item> + <el-form-item v-if="false" label="企业:"> + <el-select + v-model="form.CORPINFO_ID" + :remote-method="searchCorp" + :loading="selectLoading" + filterable + remote + reserve-keyword + placeholder="请输入关键词"> + <el-option + v-for="item in corp_list" + :key="item.CORPINFO_ID" + :label="item.CORP_NAME" + :value="item.CORPINFO_ID"/> + </el-select> + </el-form-item> + </el-form> + <div> + <el-button @click="closePanel">取 消</el-button> + <el-button :loading="loading" type="primary" @click="submit">{{ loading ? '提交中 ...' : '确 定' }}</el-button> + </div> + </div> + </el-drawer> +</template> +<script> +import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包 +import waves from '@/directive/waves' // waves directive +import { videoPlayer } from 'vue-video-player' +import 'video.js/dist/video-js.css' +import multipleChoice from '../../../util/multipleChoice.vue' +import { requestFN } from '@/utils/request' +export default { + components: { multipleChoice, Pagination, videoPlayer }, + directives: { waves }, + props: { + haveCorpFlag: { + type: Boolean, + default: false + } + }, + data() { + return { + visible: false, + loading: false, + key: { + typeKey: 'DICTIONARIES_ID', + typeName: 'NAME', + specificationTypeKey: 'DICTIONARIES_ID', + specificationTypeName: 'NAME', + categoryKey: 'DICTIONARIES_ID', + categoryName: 'NAME', + labelsKey: 'BUS_LABEL_FACTORY_ID', + labelsName: 'NAME' + }, + typeList: [], + industryTypeList: [], + categoryList: [], + form: { + CATEGORY_LIST: [''], + TYPES: [''], + SPECIFICATION_TYPES: [''], + LABELS: [''], + CORPINFO_ID: '' + }, + corp_list: [], + selectLoading: false + } + }, + watch: { + filterText(val) { + this.$refs.tree.filter(val) + } + }, + created() { + this.getDic() + }, + methods: { + init(tags) { + this.visible = true + }, + close(done) { + this.$confirm('确认关闭?') + .then(_ => { + this.form = { + CATEGORY_LIST: [''], + TYPES: [''], + SPECIFICATION_TYPES: [''], + LABELS: [''] + } + done() + }) + .catch(e => {}) + }, + closePanel() { + this.visible = false + this.form = { + CATEGORY_LIST: [''], + TYPES: [''], + SPECIFICATION_TYPES: [''], + LABELS: [''] + } + }, + submit() { + this.$emit('getResult', this.form) + this.visible = false + }, + getDic() { + // 安全生产基础类型 + requestFN( + 'dictionaries/getLevels', { DICTIONARIES_ID: '675ed73a7d7d42a488491f6e0e9c8fd5' } + ).then((data) => { + this.typeList = data.list + }).catch((e) => { + this.loading = false + }) + // 安全生产类型 + requestFN( + 'dictionaries/getLevels', { DICTIONARIES_ID: 'f2598ba72e864eadabf0ca4b664d26b9' } + ).then((data) => { + this.industryTypeList = data.list + }).catch((e) => { + this.loading = false + }) + // 行业类别 + requestFN( + 'dictionaries/getLevels', { DICTIONARIES_ID: 'c35e6f7ea1b844e7946b2f78e1cc3907' } + ).then((data) => { + this.categoryList = data.list + }).catch((e) => { + this.loading = false + }) + }, + clear() { + this.form = { + CATEGORY_LIST: [''], + TYPES: [''], + SPECIFICATION_TYPES: [''], + LABELS: [''], + TTRIBUTE_LIST: [''], + CORPINFO_ID: '' + } + }, + searchCorp(query) { + if (query !== '') { + this.selectLoading = true + requestFN( + 'corpinfo/list', { KEYWORDS: query } + ).then((data) => { + this.corp_list = data.varList + this.selectLoading = false + }).catch((e) => { + console.log(e) + this.selectLoading = false + }) + } + } + } +} + +</script> + +<style scoped> +.information >>> .el-scrollbar__wrap { + overflow-x: hidden; +} +</style> diff --git a/src/views/threeSystems/spmLibrary/components/dashboard.vue b/src/views/threeSystems/spmLibrary/components/dashboard.vue new file mode 100644 index 0000000..f9b3596 --- /dev/null +++ b/src/views/threeSystems/spmLibrary/components/dashboard.vue @@ -0,0 +1,38 @@ +<template> + <div class="app-container"> + <el-tabs type="border-card" @tab-click="changTab"> + <el-tab-pane label="安全生产管理制度平台资源库"> + <list/> + </el-tab-pane> + </el-tabs> + </div> +</template> +<style> +.el-table .warning-row { + background: oldlace; +} +</style> +<script> +import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包 +import waves from '@/directive/waves' +import List from './list.vue' +import ListEm from './listEm.vue' +export default { + components: { List, Pagination, ListEm }, + directives: { waves }, + data() { + return { + vectory: 'listEm' + } + }, + created() { + }, + methods: { + changTab(title) { + console.log(title.label) + if (title.label === '安全生产管理制度平台资源库') { this.vectory = 'list' } + if (title.label === '安全生产管理制度') { this.vectory = 'listEm' } + } + } +} +</script> diff --git a/src/views/threeSystems/spmLibrary/components/editTextLibrary.vue b/src/views/threeSystems/spmLibrary/components/editTextLibrary.vue new file mode 100644 index 0000000..590cc93 --- /dev/null +++ b/src/views/threeSystems/spmLibrary/components/editTextLibrary.vue @@ -0,0 +1,390 @@ +<template> + <el-dialog v-loading="loading" v-if="dialogVisible" :visible.sync="dialogVisible" :title="title" destroy-on-close @close="clear"> + <el-form ref="form" :model="form" :rules="rules" label-width="180px"> + <el-form-item v-if="false" label="规程属性:" prop="CATEGORY_LIST"> + <multiple-choice :dynamic-tags.sync="form.CATEGORY_LIST" :labels="categoryList" :row-key="key.categoryKey" :row-name="key.categoryName" :limit="1" @getChooseOne="getChooseOne"/> + </el-form-item> + <el-form-item label="安全管理制度名称:" prop="REMARKS"> + <el-input v-model="form.REMARKS" style="width: 100%"/> + </el-form-item> + <el-form-item label="类型:" prop="TYPES"> + <multiple-choice :dynamic-tags.sync="form.TYPES" :labels="typeList" :row-key="key.typeKey" :row-name="key.typeName"/> + </el-form-item> + <el-form-item v-if="false" label="国民经济行业类型:" prop="SPECIFICATION_TYPES"> + <multiple-choice :dynamic-tags.sync="form.SPECIFICATION_TYPES" :labels="industryTypeList" :row-key="key.specificationTypeKey" :row-name="key.specificationTypeName" lazy/> + </el-form-item> + <el-form-item v-if="false" label="状态:" prop="STATUS"> + <el-select v-model="form.STATUS" placeholder="请选择" style="width: 100%;"> + <el-option label="停用" value="0"/> + <el-option label="启用" value="1"/> + </el-select> + </el-form-item> + <el-form-item v-if="!isEdit" label="文件:" prop="FILE"> + <upload-file :file-list.sync="form.FILE" :limit="1" :file-size="200" append-to-body accept=".pdf"/> + </el-form-item> + <el-form-item v-if="!isEdit" label="添加文件内容:"> + <el-button size="small" type="primary" @click="openTextEdit()">添加文件内容</el-button> + </el-form-item> + <el-form-item v-if="isEdit" label="添加文件内容:"> + <el-button size="small" type="primary" @click="openTextEdit({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID},true)">查看</el-button> + <el-button size="small" type="primary" @click="openTextEdit({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID},false)">编辑内容</el-button> + <el-button size="small" type="primary" @click="exportWord({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID})">导出word</el-button> + </el-form-item> + <el-form-item label="标签:" prop="labels"> + <multiple-choice :dynamic-tags.sync="form.labels" :row-key="key.labelsKey" :row-name="key.labelsName" can-add/> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button @click="goBack">取 消</el-button> + <el-button type="primary" @click="save">确 定</el-button> + </div> + <edit-label ref="editLabel" append-to-body/> + <select-label ref="selectLabel" append-to-body @getResult="getChooseTage"/> + <select-type ref="selectType" :limit="1" append-to-body @getResult="getType"/> + <text-editing ref="textEditing" :disabled="textDisabled" append-to-body title="文本编辑器" @getResult="getText"/> + </el-dialog> +</template> +<script> +import Pagination from '@/components/Pagination' +import waves from '@/directive/waves' +import { upload } from '@/utils/upload' +import { requestFN } from '@/utils/request' +import editLabel from '../../../Label/components/editLabel.vue' +import selectLabel from '../../../Label/components/selectLable.vue' +import selectType from '../../../util/selectType.vue' +import multipleChoice from '../../../util/multipleChoice.vue' +import UploadFile from '../../../../components/upload-file/index.vue' +import TextEditing from '../../../util/textEditing.vue' + +export default { + components: { TextEditing, Pagination, editLabel, selectLabel, selectType, multipleChoice, UploadFile }, + directives: { waves }, + props: { + title: { + type: String, + default: '' + } + }, + data() { + return { + dialogVisible: false, + form: { + REMARKS: '', + FILE: [], + labels: [''], + TYPE: '', + TYPES: [''], + SPECIFICATION_TYPES: [''], + CATEGORY_LIST: [''], + STATUS: '', + ASSOCIATION: '1', + types: [], + specification_types: [], + category_list: [], + TEXT_INFO: '' + }, + key: { + typeKey: 'DICTIONARIES_ID', + typeName: 'NAME', + specificationTypeKey: 'DICTIONARIES_ID', + specificationTypeName: 'NAME', + categoryKey: 'DICTIONARIES_ID', + categoryName: 'NAME', + labelsKey: 'BUS_LABEL_FACTORY_ID', + labelsName: 'NAME' + }, + rules: { + REMARKS: [{ required: true, message: '请输安全操作规程', trigger: 'change' }], + STATUS: [{ required: true, message: '请选择状态', trigger: 'change' }], + FILE: [{ required: true, message: '请选择文件', trigger: 'blur' }], + TYPES: [{ + required: true, + validator: (rules, value, callback) => { + if (!value || value.length === 0 || value[0] === '') { + return callback(new Error('类型必选')) + } + return callback() + }, + trigger: 'blur' + }], + SPECIFICATION_TYPES: [{ + required: true, + validator: (rules, value, callback) => { + if (!value || value.length === 0 || value[0] === '') { + return callback(new Error('操作规程行业类型必选')) + } + return callback() + }, + trigger: 'blur' + }], + CATEGORY_LIST: [{ + required: true, + validator: (rules, value, callback) => { + if (!value || value.length === 0 || value[0] === '') { + return callback(new Error('规程属性必选')) + } + return callback() + }, + trigger: 'blur' + }] + }, + + loading: false, + e: {}, + isEdit: false, + typeList: [], + industryTypeList: [], + categoryList: [], + + remoteControl: { + keyOne: true + }, + textDisabled: false + } + }, + methods: { + init(e) { + this.dialogVisible = true + this.e = e ? e.e : {} + this.isEdit = e ? e.isEdit : false + this.getDic() + if (e) { + this.loading = true + requestFN( + '/textLibrary/goEdit', + { BUS_TEXT_LIBRARY_ID: this.e.BUS_TEXT_LIBRARY_ID } + ).then((data) => { + this.loading = false + this.form = data.data + this.form.FILE = [] + this.form.types = [] + this.form.specification_types = [] + this.form.category_list = [] + + if (!this.form.TYPES || this.form.TYPES.length === 0) this.form.TYPES = [''] + if (!this.form.SPECIFICATION_TYPES || this.form.SPECIFICATION_TYPES.length === 0) this.form.SPECIFICATION_TYPES = [''] + if (!this.form.CATEGORY_LIST || this.form.CATEGORY_LIST.length === 0) this.form.CATEGORY_LIST = [''] + if (!this.form.labels || this.form.labels.length === 0) this.form.labels = [''] + + this.remoteControl.keyOne = !(this.form.CATEGORY_LIST[0].CATEGORY_ID === '691346658ed744a1bda2ed3a755f606c') + }).catch((e) => { + this.$message.error(e) + this.loading = false + }) + } else { + this.isEdit = false + } + }, + save() { + if (this.checkForm()) { + return + } + this.$refs.form.validate((valid) => { + if (valid) { + const loading = this.$loading({ + lock: true, + text: '上传中...', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) + const formData = new FormData() + if (this.form.TEXT_INFO) this.form.TEXT_INFO = this.form.TEXT_INFO.replaceAll('<img', '<img style="max-width:100%"') + Object.keys(this.form).map(key => { + formData.append(key, this.form[key]) + }) + if (!this.isEdit) { + if (!this.form.FILE || this.form.FILE.length <= 0) { + this.$message.error('请上传文件') + loading.close() + return + } + } + for (let i = 0; i < this.form.FILE.length; i++) { + if (this.form.FILE[i].raw) { + formData.append('FILE', this.form.FILE[i].raw) + } + } + formData.append('labels', JSON.stringify(this.form.labels)) + for (let i = 0; i < this.form.TYPES.length; i++) { + if (this.form.TYPES[i]) { + this.form.types.push({ + CATEGORY: 'TYPES', + CATEGORY_ID: this.form.TYPES[i].DICTIONARIES_ID, + CATEGORY_NAME: this.form.TYPES[i].NAME + }) + } + } + formData.append('TYPES', JSON.stringify(this.form.types)) + for (let i = 0; i < this.form.SPECIFICATION_TYPES.length; i++) { + if (this.form.SPECIFICATION_TYPES[i]) { + this.form.specification_types.push({ + CATEGORY: 'SPECIFICATION_TYPES', + CATEGORY_ID: this.form.SPECIFICATION_TYPES[i].DICTIONARIES_ID, + CATEGORY_NAME: this.form.SPECIFICATION_TYPES[i].NAME + }) + } + } + formData.append('SPECIFICATION_TYPES', JSON.stringify(this.form.specification_types)) + if (!this.form.category_list) this.form.category_list = [] + this.form.category_list.push({ + CATEGORY: 'CATEGORY_LIST', + CATEGORY_ID: '0ac08f29beec46bd93956afec058e189', + CATEGORY_NAME: '行业专属类' + }) + formData.append('CATEGORY_LIST', JSON.stringify(this.form.category_list)) + upload( + '/textLibrary/init', + formData + ).then((data) => { + loading.close() + this.dialogVisible = false + this.$emit('logical-end', { result: 'OK' }) + this.$message.success('保存成功') + }).catch((e) => { + loading.close() + console.log(e) + }) + this.clear() + } else { + return false + } + }) + }, + checkForm() { + if (this.form.labels.length > 15) { + this.$message.error('关联标签数不能超过15个') + return true + } + }, + goBack() { + this.dialogVisible = false + this.clear() + this.$emit('goBack', this.e) + }, + getChooseTage(e) { + if (e.TYPE === '0') { + const list = e.e + for (const listKey in list) { + const index = this.form.labels.findIndex(item => { + item.BUS_LABEL_FACTORY_ID === list[listKey].BUS_LABEL_FACTORY_ID + }) + if (index < 0) { + const label = JSON.parse(JSON.stringify(list[listKey])) + label.label = label.NAME + label.value = JSON.stringify(list[listKey]) + const index = this.form.labels.findIndex(item => item.value === label.value) + if (index < 0) { + this.form.labels.push(label) + } + } + } + } else { + if (e.e.length > 1) { + this.$message.error('只能选择一个类型') + return + } + this.form.TYPE_NAME = e.e[0].NAME + this.form.TYPE = e.e[0].BUS_LABEL_FACTORY_ID + this.$forceUpdate() + } + }, + getType(e) { + this.form.TYPE = e.info[0].DICTIONARIES_ID + this.form.TYPE_NAME = e.info[0].NAME + }, + clear() { + this.isEdit = false + this.form = { + REMARKS: '', + FILE: [], + labels: [''], + TYPE: '', + TYPES: [''], + SPECIFICATION_TYPES: [''], + STATUS: '', + ASSOCIATION: '1', + types: [], + specification_types: [] + } + }, + getDic() { + // 安全操作规程类型 + requestFN( + 'dictionaries/getLevels', { DICTIONARIES_ID: '675ed73a7d7d42a488491f6e0e9c8fd5' } + ).then((data) => { + this.typeList = data.list + }).catch((e) => { + this.loading = false + }) + // 操作规程行业类型 + requestFN( + 'dictionaries/getLevels', { DICTIONARIES_ID: 'f2598ba72e864eadabf0ca4b664d26b9' } + ).then((data) => { + this.industryTypeList = data.list + }).catch((e) => { + this.loading = false + }) + // 行业类别 + requestFN( + 'dictionaries/getLevels', { DICTIONARIES_ID: 'c35e6f7ea1b844e7946b2f78e1cc3907' } + ).then((data) => { + this.categoryList = data.list + }).catch((e) => { + this.loading = false + }) + }, + getChooseOne(e) { + this.remoteControl.keyOne = !(e && e.info && e.info.DICTIONARIES_ID && e.info.DICTIONARIES_ID === '691346658ed744a1bda2ed3a755f606c') + }, + openTextEdit(id, textDisabled) { + if (!id) { + this.textDisabled = false + this.$refs.textEditing.init({ text: this.form.TEXT_INFO }) + } else { + this.textDisabled = textDisabled + this.loading = true + requestFN('textLibrary/getTextInfo', id) + .then((data) => { + if (data.info && data.info.TEXT_INFO && data.info.TEXT_INFO !== '') { + this.$refs.textEditing.init({ text: data.info.TEXT_INFO }) + } else { + if (((!this.form.TEXT_INFO) || this.form.TEXT_INFO === '') && this.textDisabled) { + this.$message.error('此数据未维护文件内容') + } else { + this.$refs.textEditing.init({ text: this.form.TEXT_INFO }) + } + } + this.loading = false + }).catch((e) => { + console.log(e) + this.loading = false + }) + } + }, + getText(e) { + this.form.TEXT_INFO = e.text + }, + exportWord(info) { + this.loading = true + requestFN('textLibrary/getTextInfo', info) + .then((data) => { + if (data.info) { + if ((!data.info) || data.info.TEXT_INFO === '') { + this.$message.error('没有文件导出') + } else { + this.$message.success('导出成功') + window.open(config.httpurl + '/textLibrary/exportWord?BUS_TEXT_LIBRARY_ID=' + info.BUS_TEXT_LIBRARY_ID) + } + } else { + this.$message.error('此数据未维护文件内容') + } + this.loading = false + }).catch((e) => { + console.log(e) + this.loading = false + }) + } + } +} + +</script> diff --git a/src/views/threeSystems/spmLibrary/components/list.vue b/src/views/threeSystems/spmLibrary/components/list.vue new file mode 100644 index 0000000..a3f8660 --- /dev/null +++ b/src/views/threeSystems/spmLibrary/components/list.vue @@ -0,0 +1,562 @@ +<template> + <div class="app-container"> + <div class="filter-container"> + <el-form label-width="50px"> + <el-row> + <el-col :span="6"> + <el-form-item label="安全生产管理制度名称:" label-width="200px"> + <el-input v-model="form.KEYWORDS" placeholder="请输入" class="filter-item"/> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label-width="10px"> + <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery"> + 搜索 + </el-button> + <el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="addCondition"> + 添加其他搜索条件 + </el-button> + <el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="clearMessage"> + 重置 + </el-button> + </el-form-item> + </el-col> + </el-row> + </el-form> + </div> + <el-table + v-loading="listLoading" + ref="multipleTable" + :row-key="getRowKey" + :data="varList" + :header-cell-style="{ + 'font-weight': 'bold', + 'color': '#000' + }" + :row-class-name="tableRowClassName" + tooltip-effect="dark" + border + fit + highlight-current-row + @cell-mouse-enter="enterSelectionRows" + @cell-mouse-leave="leaveSelectionRows"> + <el-table-column + v-if="false" + :reserve-selection="true" + type="selection" + width="55" + align="center" + /> + <el-table-column type="expand"> + <template slot-scope="props"> + <div style="text-align: left;padding: 10px;"> + <el-form label-position="left" inline> + <el-form-item label="标签"> + <el-tag + v-for="tag in props.row.labels" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.NAME }} + </el-tag> + </el-form-item> + <el-form-item label="国民经济行业类型"> + <div v-if="(props.row.SPECIFICATION_TYPES && props.row.SPECIFICATION_TYPES.length > 0) && ((!props.row.CATEGORY_LIST) || (!props.row.CATEGORY_LIST[0]) || (props.row.CATEGORY_LIST[0].CATEGORY_ID !== '691346658ed744a1bda2ed3a755f606c')) "> + <el-tag + v-for="tag in props.row.SPECIFICATION_TYPES" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </div> + <div v-else> + <el-tag type="warning">通用</el-tag> + </div> + </el-form-item> + </el-form> + </div> + </template> + </el-table-column> + <el-table-column type="index" label="序号" width="50" align="center" /> + <el-table-column align="center" prop="REMARKS" label="安全生产管理制度名称" /> + <el-table-column align="center" prop="TYPES" label="类型" > + <template slot-scope="{row}"> + <el-tag + v-for="tag in row.TYPES" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </template> + </el-table-column> + <el-table-column v-if="false" prop="LABEL" align="center" label="标签" > + <template slot-scope="{row}"> + <el-tag + v-for="tag in row.labels" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.NAME }} + </el-tag> + </template> + </el-table-column> + <el-table-column v-if="false" align="center" prop="SPECIFICATION_TYPES" label="国民经济行业类型" width="300px"> + <template slot-scope="{row}"> + <div v-if="(row.SPECIFICATION_TYPES && row.SPECIFICATION_TYPES.length > 0) && ((!row.CATEGORY_LIST) || (!row.CATEGORY_LIST[0]) || (row.CATEGORY_LIST[0].CATEGORY_ID !== '691346658ed744a1bda2ed3a755f606c')) "> + <el-tag + v-for="tag in row.SPECIFICATION_TYPES" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </div> + <div v-else> + <el-tag type="warning">通用</el-tag> + </div> + </template> + </el-table-column> + <el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" width="200px"/> + <el-table-column v-if="false" :show-overflow-tooltip="true" align="center" prop="UPLOAD_USER_NAME" width="100px" label="数据来源" > + <template slot-scope="{row}"> + {{ '资源库数据' }} + </template> + </el-table-column> + <el-table-column label="操作" align="center" width="200px"> + <template slot-scope="{row}"> + <el-row> + <el-col :span="14"> + <el-button v-show="!row.LOCKTOOL" type="primary" icon="el-icon-edit" size="mini" @click="handleExport(row)">导出</el-button> + </el-col> + <el-col :span="10"> + <el-button type="primary" icon="el-icon-edit" size="mini" @click="getInformation(row)">查看</el-button> + </el-col> + </el-row> + </template> + </el-table-column> + </el-table> + <div class="page-btn-group"> + <div/> + <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> + </div> + <edit-text-library ref="editTextLibrary" :title="title" @logical-end="saveClose"/> + <text-library-info ref="textLibraryInfo"/> + <update-spe-file ref="updateFile"/> + <update-log ref="updateLog"/> + <condition ref="condition" @getResult="getCondition"/> + </div> +</template> +<style> +.el-table .warning-row { + background: oldlace; +} +</style> +<script> +import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包 +import { requestFN } from '@/utils/request' +import waves from '@/directive/waves' +import editTextLibrary from './editTextLibrary.vue' +import textLibraryInfo from './textLibraryInfo.vue' +import updateFile from './updateSpeFile.vue' +import updateLog from './updateLog.vue' +import condition from './condition.vue' +import UpdateSpeFile from './updateSpeFile.vue' +export default { + components: { UpdateSpeFile, Pagination, editTextLibrary, textLibraryInfo, updateFile, updateLog, condition }, + directives: { waves }, + data() { + return { + config: config, + listLoading: true, + add: false, + del: false, + edit: false, + listQuery: { + page: 1, + limit: 10 + }, + total: 0, + form: { + KEYWORDS: '', + labels: [], + CATEGORY_LIST: [], + TYPES: [], + SPECIFICATION_TYPES: [], + STATUS: '' + }, + label_name: '', + + varList: [], + pd: [], + isEdit: false, + isLook: false, + title: '' + } + }, + created() { + this.getList() + }, + methods: { + getRowKey(row) { + return row.BUS_TEXT_LIBRARY_ID + }, + getQuery() { + this.$refs.multipleTable.clearSelection() + this.getList() + }, + addCondition() { + this.$refs.condition.init() + }, + getCondition(info) { + this.form.CATEGORY_LIST = info.CATEGORY_LIST + this.form.TYPES = info.TYPES + this.form.SPECIFICATION_TYPES = info.SPECIFICATION_TYPES + this.form.labels = info.LABELS + }, + clearMessage() { + this.label_name = '' + this.form = { + KEYWORDS: '', + labels: [], + CATEGORY_LIST: [], + TYPES: [], + SPECIFICATION_TYPES: [], + STATUS: '' + } + this.$refs.condition.clear() + this.getList() + }, + getList() { + this.listLoading = true + requestFN( + '/textLibrary/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, + { + KEYWORDS: this.form.KEYWORDS, + CATEGORY_LIST: JSON.stringify(this.form.CATEGORY_LIST), + TYPES: JSON.stringify(this.form.TYPES), + SPECIFICATION_TYPES: JSON.stringify(this.form.SPECIFICATION_TYPES), + labels: JSON.stringify(this.form.labels), + STATUS: this.form.STATUS, + ASSOCIATION: '1', + CORPINFO_ID: '0', + LIBRARY_FLAG: '1' + } + ).then((data) => { + this.listLoading = false + this.varList = data.varList + this.total = data.page.totalResult + this.hasButton() + this.pd = data.pd + }).catch((e) => { + this.listLoading = false + }) + }, + handleAdd() { + this.title = '新增' + this.$refs.editTextLibrary.init() + }, + handleEdit(e) { + this.title = '编辑' + this.$refs.editTextLibrary.init({ e: e, isEdit: true }) + }, + getInformation(e) { + this.$refs.textLibraryInfo.init({ e: e }) + }, + handleDelete(e) { + this.$confirm('确定要删除吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/delete', + { + BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID + } + ).then((data) => { + if (data.code === '0') { + this.$message({ + message: '删除成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.getList() + } else { + this.listLoading = false + this.$message.error(data.errorMessage) + } + }).catch((e) => { + this.listLoading = false + }) + }).catch((e) => { + console.log(e) + }) + }, + handleLock(e, flag) { + this.$confirm(flag === '1' ? '确定要锁定吗?' : '确定要解锁吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/lock', + { + BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID, + isLock: flag + } + ).then(() => { + this.$message({ + message: '操作成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch((e) => { + console.log(e) + }) + }, + handleTop(e, flag) { + this.$confirm(flag === '1' ? '确定要置顶吗?' : '确定要取消置顶吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/top', + { + BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID, + isTop: flag + } + ).then(() => { + this.$message({ + message: '操作成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch((e) => { + console.log(e) + }) + }, + handleExport(e) { + this.$confirm('确定要导出文件吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + if (e.MIGRATION_FLAG === '1') { + window.open(config.fileUrl + e.PATH) + } else { + window.open(e.PATH) + } + }).catch((e) => { + console.log(e) + }) + }, + batchDel() { + const _selectData = this.$refs.multipleTable.selection + if (_selectData == null || _selectData.length == 0) { + this.$message({ + message: '请选中要删除的项...', + type: 'error' + }) + return false + } + const _ids = _selectData.filter((item, index) => { + return item.LOCKTOOL + }) + if (_ids.length > 0) { + this.$message.error('选中的数据有锁定数据,请重新选择') + return + } + const ids = _selectData.map((item, index) => { + return item.BUS_TEXT_LIBRARY_ID + }).join(',') + + this.$confirm('确定要删除选中的数据吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/deleteAll', + { + DATA_IDS: ids + } + ).then(() => { + this.$message({ + message: '删除成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.$refs.multipleTable.clearSelection() + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch(() => { + }) + }, + hasButton: function() { + var keys = 'textlibraryTwo:add,textlibraryTwo:del,textlibraryTwo:edit,toExcel' + requestFN( + '/head/hasButton', + { + keys: keys + } + ).then((data) => { + this.add = data.textlibraryTwofhadminadd // 新增权限 + this.del = data.textlibraryTwofhadmindel // 删除权限 + this.edit = data.textlibraryTwofhadminedit // 修改权限 + }).catch((e) => { + this.listLoading = false + }) + }, + tableRowClassName({ row, rowIndex }) { + if (row.ISTOPTIME) { + return 'warning-row' + } + }, + saveClose(e) { + this.getList() + }, + openUpdateFile(row) { + this.$refs.updateFile.init(row) + }, + openUpdateLog(row) { + this.$refs.updateLog.init(row) + }, + setStatus(row, status) { + this.listLoading = true + this.$confirm('是否更改状态?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + requestFN( + '/textLibrary/setStatus', + { + BUS_TEXT_LIBRARY_ID: row.BUS_TEXT_LIBRARY_ID, + STATUS: status + } + ).then((data) => { + this.listLoading = false + this.$message({ + type: 'success', + message: '修改成功!' + }) + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消' + }) + this.listLoading = false + }) + }, + handleCopy(row) { + this.$confirm('确定要将此条数据添加到本地', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.copyInfo(row) + }).catch((e) => { + console.log(e) + this.$message({ + type: 'info', + message: '已取消添加' + }) + }) + }, + copyInfo(row) { + requestFN( + '/textLibrary/copyToOperate?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, + { BUS_TEXT_LIBRARY_ID: row.BUS_TEXT_LIBRARY_ID } + ).then((data) => { + if (data.code === '0') { + this.$message.success('添加成功') + } else { + this.$message.success('添加失败') + } + }).catch((e) => { + this.$message.success('添加失败') + }) + }, + enterSelectionRows(row, column, cell, event) { + if (row.ISTOPTIME) { + this.createTips(event, row, '数据已置顶') + } + }, + leaveSelectionRows(row, column, cell, event) { + if (row.ISTOPTIME) { + this.removeTips(row) + } + }, + createTips(el, row, value) { + const { BUS_TEXT_LIBRARY_ID } = row + const tooltipDom = document.createElement('div') + tooltipDom.style.cssText = ` + display: inline-block; + max-width: 400px; + max-height: 400px; + position: absolute; + top: ${el.clientY + 5}px; + left: ${el.clientX}px; + padding:5px 10px; + overflow: auto; + font-size: 12px; + font-family: PingFangSC-Regular, PingFang SC; + font-weight: 400; + color: #595959; + background: #fff; + border-radius: 5px; + z-index: 19999; + box-shadow: 0 4px 12px 1px #ccc; + ` + tooltipDom.innerHTML = value + tooltipDom.setAttribute('id', `tooltip-${BUS_TEXT_LIBRARY_ID}`) + // 将浮层插入到body中 + document.body.appendChild(tooltipDom) + }, + removeTips(row) { + console.log(row, 'row') + const { BUS_TEXT_LIBRARY_ID } = row + const tooltipDomLeave = document.querySelectorAll(`#tooltip-${BUS_TEXT_LIBRARY_ID}`) + if (tooltipDomLeave.length) { + tooltipDomLeave.forEach(dom => { + document.body.removeChild(dom) + }) + } + } + } +} +</script> diff --git a/src/views/threeSystems/spmLibrary/components/listEm.vue b/src/views/threeSystems/spmLibrary/components/listEm.vue new file mode 100644 index 0000000..f275b9d --- /dev/null +++ b/src/views/threeSystems/spmLibrary/components/listEm.vue @@ -0,0 +1,503 @@ +<template> + <div class="app-container"> + <div class="filter-container"> + <el-form label-width="50px"> + <el-row> + <el-col :span="6"> + <el-form-item label="安全生产管理制度名称:" label-width="200px"> + <el-input v-model="form.KEYWORDS" placeholder="请输入" class="filter-item"/> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label-width="10px"> + <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery"> + 搜索 + </el-button> + <el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="addCondition"> + 添加其他搜索条件 + </el-button> + <el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="clearMessage"> + 重置 + </el-button> + </el-form-item> + </el-col> + </el-row> + </el-form> + </div> + <el-table + v-loading="listLoading" + ref="multipleTable" + :row-key="getRowKey" + :data="varList" + :header-cell-style="{ + 'font-weight': 'bold', + 'color': '#000' + }" + :row-class-name="tableRowClassName" + tooltip-effect="dark" + border + fit + highlight-current-row + @cell-mouse-enter="enterSelectionRows" + @cell-mouse-leave="leaveSelectionRows"> + <el-table-column + :reserve-selection="true" + type="selection" + width="55" + align="center" + /> + <el-table-column type="index" label="序号" width="50" align="center" /> + <el-table-column align="center" prop="REMARKS" label="安全生产管理制度名称" /> + <el-table-column align="center" prop="TYPES" label="类型" > + <template slot-scope="{row}"> + <el-tag + v-for="tag in row.TYPES" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </template> + </el-table-column> + <el-table-column prop="LABEL" align="center" label="标签" > + <template slot-scope="{row}"> + <el-tag + v-for="tag in row.labels" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.NAME }} + </el-tag> + </template> + </el-table-column> + <el-table-column align="center" prop="SPECIFICATION_TYPES" label="国民经济行业类型" width="300px"> + <template slot-scope="{row}"> + <div v-if="row.SPECIFICATION_TYPES && row.SPECIFICATION_TYPES.length > 0"> + <el-tag + v-for="tag in row.SPECIFICATION_TYPES" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </div> + <div v-else> + <el-tag type="warning">通用</el-tag> + </div> + </template> + </el-table-column> + <el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" width="90px"/> + <el-table-column v-if="false" :show-overflow-tooltip="true" align="center" prop="UPLOAD_USER_NAME" width="100px" label="数据来源" > + <template slot-scope="{row}"> + {{ !row.CORP_NAME ? '资源库数据' : row.CORP_NAME }} + </template> + </el-table-column> <el-table-column label="操作" align="center" width="200px"> + <template slot-scope="{row}"> + <el-row> + <el-col :span="24" style="padding-bottom: 10px"> + <el-button type="info" icon="el-icon-view" size="mini" @click="getInformation(row)">查看</el-button> + <el-button type="warning" icon="el-icon-printer" size="mini" @click="handleExport(row)">导出</el-button> + </el-col> + <el-col :span="24"> + <el-button v-if="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)">编辑</el-button> + <el-button v-if="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row)">删除</el-button> + </el-col> + </el-row> + </template> + </el-table-column> + </el-table> + <div class="page-btn-group"> + <div> + <el-button v-if="add" type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button> + </div> + <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> + </div> + <edit-text-library ref="editTextLibrary" :title="title" @logical-end="saveClose"/> + <text-library-info ref="textLibraryInfo"/> + <update-spe-file ref="updateFile"/> + <update-log ref="updateLog"/> + <condition ref="condition" have-corp-flag @getResult="getCondition"/> + </div> +</template> +<style> +.el-table .warning-row { + background: oldlace; +} +</style> +<script> +import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包 +import { requestFN } from '@/utils/request' +import waves from '@/directive/waves' +import editTextLibrary from './editTextLibrary.vue' +import textLibraryInfo from './textLibraryInfo.vue' +import updateLog from './updateLog.vue' +import UpdateLog from './updateLog.vue' +import condition from './condition.vue' +import UpdateSpeFile from './updateSpeFile.vue' +export default { + components: { UpdateSpeFile, UpdateLog, Pagination, editTextLibrary, textLibraryInfo, updateLog, condition }, + directives: { waves }, + data() { + return { + config: config, + listLoading: true, + add: false, + del: false, + edit: false, + listQuery: { + page: 1, + limit: 10 + }, + total: 0, + form: { + KEYWORDS: '', + labels: [], + CATEGORY_LIST: [], + TYPES: [], + SPECIFICATION_TYPES: [], + STATUS: '' + }, + label_name: '', + + varList: [], + pd: [], + isEdit: false, + isLook: false, + title: '' + } + }, + created() { + this.getList() + }, + methods: { + getRowKey(row) { + return row.BLACKSPOT_ID + }, + getQuery() { + this.$refs.multipleTable.clearSelection() + this.getList() + }, + addCondition() { + this.$refs.condition.init() + }, + getCondition(info) { + this.form.CATEGORY_LIST = info.CATEGORY_LIST + this.form.TYPES = info.TYPES + this.form.SPECIFICATION_TYPES = info.SPECIFICATION_TYPES + this.form.labels = info.LABELS + this.form.CORPINFO_ID = info.CORPINFO_ID + }, + clearMessage() { + this.label_name = '' + this.form = { + KEYWORDS: '', + labels: [], + CATEGORY_LIST: [], + TYPES: [], + SPECIFICATION_TYPES: [], + STATUS: '' + } + this.$refs.condition.clear() + this.getList() + }, + getList() { + this.listLoading = true + requestFN( + '/textLibrary/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, + { + KEYWORDS: this.form.KEYWORDS, + CATEGORY_LIST: JSON.stringify(this.form.CATEGORY_LIST), + TYPES: JSON.stringify(this.form.TYPES), + SPECIFICATION_TYPES: JSON.stringify(this.form.SPECIFICATION_TYPES), + labels: JSON.stringify(this.form.labels), + STATUS: this.form.STATUS, + ASSOCIATION: '1', + ENTERPRISE_SIDE: '0', + CORPINFO_ID: this.form.CORPINFO_ID + } + ).then((data) => { + this.listLoading = false + this.varList = data.varList + this.total = data.page.totalResult + this.hasButton() + this.pd = data.pd + }).catch((e) => { + this.listLoading = false + }) + }, + handleAdd() { + this.title = '新增' + this.$refs.editTextLibrary.init() + }, + handleEdit(e) { + this.title = '编辑' + this.$refs.editTextLibrary.init({ e: e, isEdit: true }) + }, + getInformation(e) { + this.$refs.textLibraryInfo.init({ e: e }) + }, + handleDelete(e) { + this.$confirm('确定要删除吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/delete', + { + BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID + } + ).then((data) => { + if (data.code === '0') { + this.$message({ + message: '删除成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.getList() + } else { + this.listLoading = false + this.$message.error(data.errorMessage) + } + }).catch((e) => { + this.listLoading = false + }) + }).catch((e) => { + console.log(e) + }) + }, + handleLock(e, flag) { + this.$confirm(flag === '1' ? '确定要锁定吗?' : '确定要解锁吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/lock', + { + BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID, + isLock: flag + } + ).then(() => { + this.$message({ + message: '操作成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch((e) => { + console.log(e) + }) + }, + handleTop(e, flag) { + this.$confirm(flag === '1' ? '确定要置顶吗?' : '确定要取消置顶吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/top', + { + BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID, + isTop: flag + } + ).then(() => { + this.$message({ + message: '操作成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch((e) => { + console.log(e) + }) + }, + handleExport(e) { + this.$confirm('确定要导出文件吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + if (e.MIGRATION_FLAG === '1') { + window.open(config.fileUrl + e.PATH) + } else { + window.open(e.PATH) + } + }).catch((e) => { + console.log(e) + }) + }, + batchDel() { + const _selectData = this.$refs.multipleTable.selection + if (_selectData == null || _selectData.length == 0) { + this.$message({ + message: '请选中要删除的项...', + type: 'error' + }) + return false + } + const _ids = _selectData.filter((item, index) => { + return item.LOCKTOOL + }) + if (_ids.length > 0) { + this.$message.error('选中的数据有锁定数据,请重新选择') + return + } + const ids = _selectData.map((item, index) => { + return item.BUS_TEXT_LIBRARY_ID + }).join(',') + + this.$confirm('确定要删除选中的数据吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/deleteAll', + { + DATA_IDS: ids + } + ).then(() => { + this.$message({ + message: '删除成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.$refs.multipleTable.clearSelection() + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch(() => { + }) + }, + hasButton: function() { + var keys = 'textlibraryTwo:add,textlibraryTwo:del,textlibraryTwo:edit,toExcel' + requestFN( + '/head/hasButton', + { + keys: keys + } + ).then((data) => { + this.add = data.textlibraryTwofhadminadd // 新增权限 + this.del = data.textlibraryTwofhadmindel // 删除权限 + this.edit = data.textlibraryTwofhadminedit // 修改权限 + }).catch((e) => { + this.listLoading = false + }) + }, + tableRowClassName({ row, rowIndex }) { + if (row.ISTOPTIME) { + return 'warning-row' + } + }, + saveClose(e) { + this.getList() + }, + openUpdateFile(row) { + this.$refs.updateFile.init(row) + }, + openUpdateLog(row) { + this.$refs.updateLog.init(row) + }, + setStatus(row, status) { + this.listLoading = true + this.$confirm('是否更改状态?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + requestFN( + '/textLibrary/setStatus', + { + BUS_TEXT_LIBRARY_ID: row.BUS_TEXT_LIBRARY_ID, + STATUS: status + } + ).then((data) => { + this.listLoading = false + this.$message({ + type: 'success', + message: '修改成功!' + }) + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消' + }) + this.listLoading = false + }) + }, + enterSelectionRows(row, column, cell, event) { + if (row.ISTOPTIME) { + this.createTips(event, row, '数据已置顶') + } + }, + leaveSelectionRows(row, column, cell, event) { + if (row.ISTOPTIME) { + this.removeTips(row) + } + }, + createTips(el, row, value) { + const { BUS_TEXT_LIBRARY_ID } = row + const tooltipDom = document.createElement('div') + tooltipDom.style.cssText = ` + display: inline-block; + max-width: 400px; + max-height: 400px; + position: absolute; + top: ${el.clientY + 5}px; + left: ${el.clientX}px; + padding:5px 10px; + overflow: auto; + font-size: 12px; + font-family: PingFangSC-Regular, PingFang SC; + font-weight: 400; + color: #595959; + background: #fff; + border-radius: 5px; + z-index: 19999; + box-shadow: 0 4px 12px 1px #ccc; + ` + tooltipDom.innerHTML = value + tooltipDom.setAttribute('id', `tooltip-${BUS_TEXT_LIBRARY_ID}`) + // 将浮层插入到body中 + document.body.appendChild(tooltipDom) + }, + removeTips(row) { + console.log(row, 'row') + const { BUS_TEXT_LIBRARY_ID } = row + const tooltipDomLeave = document.querySelectorAll(`#tooltip-${BUS_TEXT_LIBRARY_ID}`) + if (tooltipDomLeave.length) { + tooltipDomLeave.forEach(dom => { + document.body.removeChild(dom) + }) + } + } + } +} +</script> diff --git a/src/views/threeSystems/spmLibrary/components/textLibraryInfo.vue b/src/views/threeSystems/spmLibrary/components/textLibraryInfo.vue new file mode 100644 index 0000000..e9f9aac --- /dev/null +++ b/src/views/threeSystems/spmLibrary/components/textLibraryInfo.vue @@ -0,0 +1,146 @@ +<template> + <el-dialog v-loading="loading" v-if="dialogVisible" :visible.sync="dialogVisible" title="详情"> + <el-form ref="form" :model="form" label-width="180px"> + <el-form-item label="安全管理制度名称:" prop="FILE_NAME"> + <el-input v-model="form.REMARKS" disabled style="width: 70%"/> + </el-form-item> + <el-form-item label="规程属性:" prop="FILE_NAME"> + <el-tag + v-for="tag in form.CATEGORY_LIST" + :key="tag.value" + :disable-transitions="false" + style="margin-right: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </el-form-item> + <el-form-item label="类型:" prop="FILE_NAME"> + <el-tag + v-for="tag in form.TYPES" + :key="tag.value" + :disable-transitions="false" + style="margin-right: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </el-form-item> + <el-form-item v-if="remoteControl.keyOne" label="国民经济行业类型:" prop="FILE_NAME"> + <el-tag v-for="tag in form.SPECIFICATION_TYPES" :key="tag.value" :disable-transitions="false" style="margin-right: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </el-form-item> + <el-form-item label="上传时间:" prop="FILE_NAME"> + <el-input v-model="form.UPLOAD_TIME" disabled style="width: 70%"/> + </el-form-item> + <el-form-item label="上传人:" prop="FILE_NAME"> + <el-input v-model="form.UPLOAD_USER_NAME" disabled style="width: 70%"/> + </el-form-item> + <el-form-item prop="tags" label="标签:"> + <el-tag + v-for="tag in form.labels" + :key="tag.value" + :disable-transitions="false" + style="margin-right: 10px"> + {{ tag.NAME }} + </el-tag> + </el-form-item> + <el-form-item label="文件详情:"> + <el-button size="small" type="primary" @click="openTextEdit({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID})">查看文件详情</el-button> + <el-button size="small" type="primary" @click="exportWord({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID})">导出word</el-button> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button @click="goBack">返 回</el-button> + </div> + <text-editing ref="textEditing" :disabled="true" append-to-body title="文本编辑器"/> + </el-dialog> +</template> +<script> +import Pagination from '@/components/Pagination' +import waves from '@/directive/waves' +import { requestFN } from '@/utils/request' +import TextEditing from '../../../util/textEditing.vue' + +export default { + components: { TextEditing, Pagination }, + directives: { waves }, + data() { + return { + config: config, + dialogVisible: false, + form: { + BUS_TEXT_LIBRARY_ID: '', + FILE_NAME: '', + FILE: [], + TYPE: '', + labels: [], + UPLOAD_TIME: '', + UPLOAD_USER_NAME: '' + }, + loading: false, + remoteControl: { + keyOne: true + } + } + }, + methods: { + init(e) { + this.dialogVisible = true + this.loading = true + this.e = e.e + requestFN( + '/textLibrary/goEdit', + { + BUS_TEXT_LIBRARY_ID: this.e.BUS_TEXT_LIBRARY_ID + } + ).then((data) => { + this.loading = false + this.form = data.data + this.form.FILE = [] + this.remoteControl.keyOne = !(this.form.CATEGORY_LIST[0].CATEGORY_ID === '691346658ed744a1bda2ed3a755f606c') + }).catch((e) => { + this.$message.error(e) + this.loading = false + }) + }, + goBack() { + this.dialogVisible = false + this.$emit('goBack', this.e) + }, + openTextEdit(id) { + this.loading = true + requestFN('textLibrary/getTextInfo', id) + .then((data) => { + if (data.info && data.info.TEXT_INFO && data.info.TEXT_INFO !== '') { + this.$refs.textEditing.init({ text: data.info.TEXT_INFO }) + } else { + this.$message.error('此数据未维护文件内容') + } + this.loading = false + }).catch((e) => { + console.log(e) + this.loading = false + }) + }, + exportWord(info) { + this.loading = true + requestFN('textLibrary/getTextInfo', info) + .then((data) => { + if (data.info) { + if ((!data.info) || data.info.TEXT_INFO === '') { + this.$message.error('没有文件导出') + } else { + this.$message.success('导出成功') + window.open(config.httpurl + '/textLibrary/exportWord?BUS_TEXT_LIBRARY_ID=' + info.BUS_TEXT_LIBRARY_ID) + } + } else { + this.$message.error('此数据未维护文件内容') + } + this.loading = false + }).catch((e) => { + console.log(e) + this.loading = false + }) + } + } +} + +</script> diff --git a/src/views/threeSystems/spmLibrary/components/updateLog.vue b/src/views/threeSystems/spmLibrary/components/updateLog.vue new file mode 100644 index 0000000..ee30bd2 --- /dev/null +++ b/src/views/threeSystems/spmLibrary/components/updateLog.vue @@ -0,0 +1,55 @@ +<template> + <el-dialog v-loading="loading" v-if="visible" :visible.sync="visible" title="替换"> + <el-table :data="list"> + <el-table-column prop="CREATE_TIME" label="日期"/> + <el-table-column prop="CREATOR_NAME" label="姓名"/> + </el-table> + <div slot="footer" class="dialog-footer"> + <el-button @click="goBack">取 消</el-button> + </div> + </el-dialog> +</template> +<script> +import Pagination from '@/components/Pagination' +import waves from '@/directive/waves' +import { requestFN } from '@/utils/request' + +export default { + components: { Pagination }, + directives: { waves }, + data() { + return { + visible: false, + list: [], + loading: false, + id: '' + } + }, + methods: { + init(e) { + this.visible = true + this.id = e.BUS_TEXT_LIBRARY_ID + this.getList() + }, + goBack() { + this.list = [] + this.visible = false + }, + getList() { + this.loading = true + requestFN( + '/textLibrary/getUpdateLog', + { + BUS_TEXT_LIBRARY_ID: this.id + } + ).then((data) => { + this.loading = false + this.list = data.list + }).catch((e) => { + this.loading = false + }) + } + } +} + +</script> diff --git a/src/views/threeSystems/spmLibrary/components/updateSpeFile.vue b/src/views/threeSystems/spmLibrary/components/updateSpeFile.vue new file mode 100644 index 0000000..63cfb6f --- /dev/null +++ b/src/views/threeSystems/spmLibrary/components/updateSpeFile.vue @@ -0,0 +1,77 @@ +<template> + <el-dialog v-loading="loading" v-if="visible" :visible.sync="visible" title="替换"> + <el-form ref="form" :model="form" :rules="rules" label-width="150px"> + <el-form-item label="文件:" prop="FILE"> + <upload-file :file-list.sync="form.FILE" :limit="1" :file-size="200" append-to-body accept=".pdf"/> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button @click="goBack">取 消</el-button> + <el-button type="primary" @click="save">确 定</el-button> + </div> + </el-dialog> +</template> +<script> +import Pagination from '@/components/Pagination' +import waves from '@/directive/waves' +import { upload } from '@/utils/upload' +import uploadFile from '../../../../components/upload-file/index.vue' + +export default { + components: { Pagination, uploadFile }, + directives: { waves }, + data() { + return { + visible: false, + form: { + FILE: [], + BUS_TEXT_LIBRARY_ID: '' + }, + rules: { + FILE: [{ required: true, message: '请选择文件', trigger: 'blur' }] + }, + loading: false + } + }, + methods: { + init(e) { + this.visible = true + this.form.BUS_TEXT_LIBRARY_ID = e.BUS_TEXT_LIBRARY_ID + }, + goBack() { + this.form = { + FILE: [], + BUS_TEXT_LIBRARY_ID: '' + } + this.visible = false + }, + save() { + const loading = this.$loading({ + lock: true, + text: '上传中...', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) + const formData = new FormData() + for (let i = 0; i < this.form.FILE.length; i++) { + if (this.form.FILE[i].raw) { + formData.append('FILE', this.form.FILE[i].raw) + } + } + formData.append('BUS_TEXT_LIBRARY_ID', this.form.BUS_TEXT_LIBRARY_ID) + upload( + '/textLibrary/updateFile', + formData + ).then((data) => { + loading.close() + this.visible = false + this.$emit('logical-end', { result: 'OK' }) + }).catch((e) => { + loading.close() + console.log(e) + }) + } + } +} + +</script> diff --git a/src/views/threeSystems/spmLibrary/index.vue b/src/views/threeSystems/spmLibrary/index.vue new file mode 100644 index 0000000..8d78561 --- /dev/null +++ b/src/views/threeSystems/spmLibrary/index.vue @@ -0,0 +1,19 @@ +<template> + <div> + <List v-if="activeName==='List'" ref="list" /> + <Dashboard v-if="activeName==='Dashboard'" ref="Dashboard"/> + </div> +</template> +<script> +import List from './components/list.vue' +import Dashboard from './components/dashboard.vue' +export default { + components: { List, Dashboard }, + data() { + return { + activeName: 'Dashboard' + } + } +} + +</script> diff --git a/src/views/threeSystems/sprLibrary/components/condition.vue b/src/views/threeSystems/sprLibrary/components/condition.vue new file mode 100644 index 0000000..fbb3b86 --- /dev/null +++ b/src/views/threeSystems/sprLibrary/components/condition.vue @@ -0,0 +1,188 @@ +<template> + <el-drawer + v-if="visible" + ref="drawer" + :visible.sync="visible" + :before-close="close" + title="搜索条件" + size="50%"> + <div style="margin-left: 30px"> + <el-form ref="form" label-width="200px"> + <el-form-item label="规程属性:" prop="CATEGORY_LIST"> + <multiple-choice :dynamic-tags.sync="form.CATEGORY_LIST" :labels="categoryList" :row-key="key.categoryKey" :row-name="key.categoryName" title="选择"/> + </el-form-item> + <el-form-item label="类型:" prop="TYPES"> + <multiple-choice :dynamic-tags.sync="form.TYPES" :labels="typeList" :row-key="key.typeKey" :row-name="key.typeName" title="选择"/> + </el-form-item> + <el-form-item label="国民经济行业类型:" prop="SPECIFICATION_TYPES"> + <multiple-choice :dynamic-tags.sync="form.SPECIFICATION_TYPES" :labels="industryTypeList" :row-key="key.specificationTypeKey" :row-name="key.specificationTypeName" lazy title="选择"/> + </el-form-item> + <el-form-item label="标签:" prop="LABELS"> + <multiple-choice :dynamic-tags.sync="form.LABELS" :row-key="key.labelsKey" :row-name="key.labelsName" title="选择"/> + </el-form-item> + <el-form-item v-if="false" label="企业:"> + <el-select + v-model="form.CORPINFO_ID" + :remote-method="searchCorp" + :loading="selectLoading" + filterable + remote + reserve-keyword + placeholder="请输入关键词"> + <el-option + v-for="item in corp_list" + :key="item.CORPINFO_ID" + :label="item.CORP_NAME" + :value="item.CORPINFO_ID"/> + </el-select> + </el-form-item> + </el-form> + <div> + <el-button @click="closePanel">取 消</el-button> + <el-button :loading="loading" type="primary" @click="submit">{{ loading ? '提交中 ...' : '确 定' }}</el-button> + </div> + </div> + </el-drawer> +</template> +<script> +import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包 +import waves from '@/directive/waves' // waves directive +import { videoPlayer } from 'vue-video-player' +import 'video.js/dist/video-js.css' +import multipleChoice from '../../../util/multipleChoice.vue' +import { requestFN } from '@/utils/request' +export default { + components: { multipleChoice, Pagination, videoPlayer }, + directives: { waves }, + props: { + haveCorpFlag: { + type: Boolean, + default: false + } + }, + data() { + return { + visible: false, + loading: false, + key: { + typeKey: 'DICTIONARIES_ID', + typeName: 'NAME', + specificationTypeKey: 'DICTIONARIES_ID', + specificationTypeName: 'NAME', + categoryKey: 'DICTIONARIES_ID', + categoryName: 'NAME', + labelsKey: 'BUS_LABEL_FACTORY_ID', + labelsName: 'NAME' + }, + typeList: [], + industryTypeList: [], + categoryList: [], + form: { + CATEGORY_LIST: [''], + TYPES: [''], + SPECIFICATION_TYPES: [''], + LABELS: [''], + CORPINFO_ID: '' + }, + corp_list: [], + selectLoading: false + } + }, + watch: { + filterText(val) { + this.$refs.tree.filter(val) + } + }, + created() { + this.getDic() + }, + methods: { + init(tags) { + this.visible = true + }, + close(done) { + this.$confirm('确认关闭?') + .then(_ => { + this.form = { + CATEGORY_LIST: [''], + TYPES: [''], + SPECIFICATION_TYPES: [''], + LABELS: [''] + } + done() + }) + .catch(e => {}) + }, + closePanel() { + this.visible = false + this.form = { + CATEGORY_LIST: [''], + TYPES: [''], + SPECIFICATION_TYPES: [''], + LABELS: [''] + } + }, + submit() { + this.$emit('getResult', this.form) + this.visible = false + }, + getDic() { + // 安全生产基础类型 + requestFN( + 'dictionaries/getLevels', { DICTIONARIES_ID: '5a7c94b2b9514285b433759edd848b4a' } + ).then((data) => { + this.typeList = data.list + }).catch((e) => { + this.loading = false + }) + // 安全生产类型 + requestFN( + 'dictionaries/getLevels', { DICTIONARIES_ID: 'f2598ba72e864eadabf0ca4b664d26b9' } + ).then((data) => { + this.industryTypeList = data.list + }).catch((e) => { + this.loading = false + }) + // 行业类别 + requestFN( + 'dictionaries/getLevels', { DICTIONARIES_ID: '84254cb5b2ae40eb9f451509b2d370ae' } + ).then((data) => { + this.categoryList = data.list + }).catch((e) => { + this.loading = false + }) + }, + clear() { + this.form = { + CATEGORY_LIST: [''], + TYPES: [''], + SPECIFICATION_TYPES: [''], + LABELS: [''], + TTRIBUTE_LIST: [''], + CORPINFO_ID: '' + } + }, + searchCorp(query) { + if (query !== '') { + this.selectLoading = true + requestFN( + 'corpinfo/list', { KEYWORDS: query } + ).then((data) => { + this.corp_list = data.varList + this.selectLoading = false + }).catch((e) => { + console.log(e) + this.selectLoading = false + }) + } + } + } +} + +</script> + +<style scoped> +.information >>> .el-scrollbar__wrap { + overflow-x: hidden; +} +</style> diff --git a/src/views/threeSystems/sprLibrary/components/dashboard.vue b/src/views/threeSystems/sprLibrary/components/dashboard.vue new file mode 100644 index 0000000..e7c8301 --- /dev/null +++ b/src/views/threeSystems/sprLibrary/components/dashboard.vue @@ -0,0 +1,38 @@ +<template> + <div class="app-container"> + <el-tabs type="border-card" @tab-click="changTab"> + <el-tab-pane label="安全生产责任制平台资源库"> + <list/> + </el-tab-pane> + </el-tabs> + </div> +</template> +<style> +.el-table .warning-row { + background: oldlace; +} +</style> +<script> +import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包 +import waves from '@/directive/waves' +import List from './list.vue' +import ListEm from './listEm.vue' +export default { + components: { List, Pagination, ListEm }, + directives: { waves }, + data() { + return { + vectory: 'listEm' + } + }, + created() { + }, + methods: { + changTab(title) { + console.log(title.label) + if (title.label === '安全生产责任制平台资源库') { this.vectory = 'list' } + if (title.label === '安全生产责任制') { this.vectory = 'listEm' } + } + } +} +</script> diff --git a/src/views/threeSystems/sprLibrary/components/editTextLibrary.vue b/src/views/threeSystems/sprLibrary/components/editTextLibrary.vue new file mode 100644 index 0000000..d3b2599 --- /dev/null +++ b/src/views/threeSystems/sprLibrary/components/editTextLibrary.vue @@ -0,0 +1,390 @@ +<template> + <el-dialog v-loading="loading" v-if="dialogVisible" :visible.sync="dialogVisible" :title="title" destroy-on-close @close="clear"> + <el-form ref="form" :model="form" :rules="rules" label-width="180px"> + <el-form-item v-if="false" label="规程属性:" prop="CATEGORY_LIST"> + <multiple-choice :dynamic-tags.sync="form.CATEGORY_LIST" :labels="categoryList" :row-key="key.categoryKey" :row-name="key.categoryName" :limit="1" @getChooseOne="getChooseOne"/> + </el-form-item> + <el-form-item label="安全生产责任制名称:" prop="REMARKS"> + <el-input v-model="form.REMARKS" style="width: 100%"/> + </el-form-item> + <el-form-item label="类型:" prop="TYPES"> + <multiple-choice :dynamic-tags.sync="form.TYPES" :labels="typeList" :row-key="key.typeKey" :row-name="key.typeName"/> + </el-form-item> + <el-form-item v-if="false" label="国民经济行业类型:" prop="SPECIFICATION_TYPES"> + <multiple-choice :dynamic-tags.sync="form.SPECIFICATION_TYPES" :labels="industryTypeList" :row-key="key.specificationTypeKey" :row-name="key.specificationTypeName" lazy/> + </el-form-item> + <el-form-item v-if="false" label="状态:" prop="STATUS"> + <el-select v-model="form.STATUS" placeholder="请选择" style="width: 100%;"> + <el-option label="停用" value="0"/> + <el-option label="启用" value="1"/> + </el-select> + </el-form-item> + <el-form-item v-if="!isEdit" label="文件:" prop="FILE"> + <upload-file :file-list.sync="form.FILE" :limit="1" :file-size="200" append-to-body accept=".pdf"/> + </el-form-item> + <el-form-item v-if="!isEdit" label="添加文件内容:"> + <el-button size="small" type="primary" @click="openTextEdit()">添加文件内容</el-button> + </el-form-item> + <el-form-item v-if="isEdit" label="添加文件内容:"> + <el-button size="small" type="primary" @click="openTextEdit({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID},true)">查看</el-button> + <el-button size="small" type="primary" @click="openTextEdit({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID},false)">编辑内容</el-button> + <el-button size="small" type="primary" @click="exportWord(form)">导出word</el-button> + </el-form-item> + <el-form-item label="标签:" prop="labels"> + <multiple-choice :dynamic-tags.sync="form.labels" :row-key="key.labelsKey" :row-name="key.labelsName" can-add/> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button @click="goBack">取 消</el-button> + <el-button type="primary" @click="save">确 定</el-button> + </div> + <edit-label ref="editLabel" append-to-body/> + <select-label ref="selectLabel" append-to-body @getResult="getChooseTage"/> + <select-type ref="selectType" :limit="1" append-to-body @getResult="getType"/> + <text-editing ref="textEditing" :disabled="textDisabled" append-to-body title="文本编辑器" @getResult="getText"/> + </el-dialog> +</template> +<script> +import Pagination from '@/components/Pagination' +import waves from '@/directive/waves' +import { upload } from '@/utils/upload' +import { requestFN } from '@/utils/request' +import editLabel from '../../../Label/components/editLabel.vue' +import selectLabel from '../../../Label/components/selectLable.vue' +import selectType from '../../../util/selectType.vue' +import multipleChoice from '../../../util/multipleChoice.vue' +import UploadFile from '../../../../components/upload-file/index.vue' +import TextEditing from '../../../util/textEditing.vue' + +export default { + components: { TextEditing, Pagination, editLabel, selectLabel, selectType, multipleChoice, UploadFile }, + directives: { waves }, + props: { + title: { + type: String, + default: '' + } + }, + data() { + return { + dialogVisible: false, + form: { + REMARKS: '', + FILE: [], + labels: [''], + TYPE: '', + TYPES: [''], + SPECIFICATION_TYPES: [''], + CATEGORY_LIST: [''], + STATUS: '', + ASSOCIATION: '2', + types: [], + specification_types: [], + category_list: [], + TEXT_INFO: '' + }, + key: { + typeKey: 'DICTIONARIES_ID', + typeName: 'NAME', + specificationTypeKey: 'DICTIONARIES_ID', + specificationTypeName: 'NAME', + categoryKey: 'DICTIONARIES_ID', + categoryName: 'NAME', + labelsKey: 'BUS_LABEL_FACTORY_ID', + labelsName: 'NAME' + }, + rules: { + REMARKS: [{ required: true, message: '请输安全操作规程', trigger: 'change' }], + STATUS: [{ required: true, message: '请选择状态', trigger: 'change' }], + FILE: [{ required: true, message: '请选择文件', trigger: 'blur' }], + TYPES: [{ + required: true, + validator: (rules, value, callback) => { + if (!value || value.length === 0 || value[0] === '') { + return callback(new Error('类型必选')) + } + return callback() + }, + trigger: 'blur' + }], + SPECIFICATION_TYPES: [{ + required: true, + validator: (rules, value, callback) => { + if (!value || value.length === 0 || value[0] === '') { + return callback(new Error('操作规程行业类型必选')) + } + return callback() + }, + trigger: 'blur' + }], + CATEGORY_LIST: [{ + required: true, + validator: (rules, value, callback) => { + if (!value || value.length === 0 || value[0] === '') { + return callback(new Error('规程属性必选')) + } + return callback() + }, + trigger: 'blur' + }] + }, + + loading: false, + e: {}, + isEdit: false, + typeList: [], + industryTypeList: [], + categoryList: [], + + remoteControl: { + keyOne: true + }, + textDisabled: false + } + }, + methods: { + init(e) { + this.dialogVisible = true + this.e = e ? e.e : {} + this.isEdit = e ? e.isEdit : false + this.getDic() + if (e) { + this.loading = true + requestFN( + '/textLibrary/goEdit', + { BUS_TEXT_LIBRARY_ID: this.e.BUS_TEXT_LIBRARY_ID } + ).then((data) => { + this.loading = false + this.form = data.data + this.form.FILE = [] + this.form.types = [] + this.form.specification_types = [] + this.form.category_list = [] + + if (!this.form.TYPES || this.form.TYPES.length === 0) this.form.TYPES = [''] + if (!this.form.SPECIFICATION_TYPES || this.form.SPECIFICATION_TYPES.length === 0) this.form.SPECIFICATION_TYPES = [''] + if (!this.form.CATEGORY_LIST || this.form.CATEGORY_LIST.length === 0) this.form.CATEGORY_LIST = [''] + if (!this.form.labels || this.form.labels.length === 0) this.form.labels = [''] + + this.remoteControl.keyOne = !(this.form.CATEGORY_LIST[0].CATEGORY_ID === '7158f688d0f34054a28a9275139298df') + }).catch((e) => { + this.$message.error(e) + this.loading = false + }) + } else { + this.isEdit = false + } + }, + save() { + if (this.checkForm()) { + return + } + this.$refs.form.validate((valid) => { + if (valid) { + const loading = this.$loading({ + lock: true, + text: '上传中...', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) + const formData = new FormData() + if (this.form.TEXT_INFO) this.form.TEXT_INFO = this.form.TEXT_INFO.replaceAll('<img', '<img style="max-width:100%"') + Object.keys(this.form).map(key => { + formData.append(key, this.form[key]) + }) + if (!this.isEdit) { + if (!this.form.FILE || this.form.FILE.length <= 0) { + this.$message.error('请上传文件') + loading.close() + return + } + } + for (let i = 0; i < this.form.FILE.length; i++) { + if (this.form.FILE[i].raw) { + formData.append('FILE', this.form.FILE[i].raw) + } + } + formData.append('labels', JSON.stringify(this.form.labels)) + for (let i = 0; i < this.form.TYPES.length; i++) { + if (this.form.TYPES[i]) { + this.form.types.push({ + CATEGORY: 'TYPES', + CATEGORY_ID: this.form.TYPES[i].DICTIONARIES_ID, + CATEGORY_NAME: this.form.TYPES[i].NAME + }) + } + } + formData.append('TYPES', JSON.stringify(this.form.types)) + for (let i = 0; i < this.form.SPECIFICATION_TYPES.length; i++) { + if (this.form.SPECIFICATION_TYPES[i]) { + this.form.specification_types.push({ + CATEGORY: 'SPECIFICATION_TYPES', + CATEGORY_ID: this.form.SPECIFICATION_TYPES[i].DICTIONARIES_ID, + CATEGORY_NAME: this.form.SPECIFICATION_TYPES[i].NAME + }) + } + } + formData.append('SPECIFICATION_TYPES', JSON.stringify(this.form.specification_types)) + if (!this.form.category_list) this.form.category_list = [] + this.form.category_list.push({ + CATEGORY: 'CATEGORY_LIST', + CATEGORY_ID: '7158f688d0f34054a28a9275139298df', + CATEGORY_NAME: '行业专属类' + }) + formData.append('CATEGORY_LIST', JSON.stringify(this.form.category_list)) + upload( + '/textLibrary/init', + formData + ).then((data) => { + loading.close() + this.dialogVisible = false + this.$emit('logical-end', { result: 'OK' }) + this.$message.success('保存成功') + }).catch((e) => { + loading.close() + console.log(e) + }) + this.clear() + } else { + return false + } + }) + }, + checkForm() { + if (this.form.labels.length > 15) { + this.$message.error('关联标签数不能超过15个') + return true + } + }, + goBack() { + this.dialogVisible = false + this.clear() + this.$emit('goBack', this.e) + }, + getChooseTage(e) { + if (e.TYPE === '0') { + const list = e.e + for (const listKey in list) { + const index = this.form.labels.findIndex(item => { + item.BUS_LABEL_FACTORY_ID === list[listKey].BUS_LABEL_FACTORY_ID + }) + if (index < 0) { + const label = JSON.parse(JSON.stringify(list[listKey])) + label.label = label.NAME + label.value = JSON.stringify(list[listKey]) + const index = this.form.labels.findIndex(item => item.value === label.value) + if (index < 0) { + this.form.labels.push(label) + } + } + } + } else { + if (e.e.length > 1) { + this.$message.error('只能选择一个类型') + return + } + this.form.TYPE_NAME = e.e[0].NAME + this.form.TYPE = e.e[0].BUS_LABEL_FACTORY_ID + this.$forceUpdate() + } + }, + getType(e) { + this.form.TYPE = e.info[0].DICTIONARIES_ID + this.form.TYPE_NAME = e.info[0].NAME + }, + clear() { + this.isEdit = false + this.form = { + REMARKS: '', + FILE: [], + labels: [''], + TYPE: '', + TYPES: [''], + SPECIFICATION_TYPES: [''], + STATUS: '', + ASSOCIATION: '2', + types: [], + specification_types: [] + } + }, + getDic() { + // 安全生产责任制基础类型 + requestFN( + 'dictionaries/getLevels', { DICTIONARIES_ID: '5a7c94b2b9514285b433759edd848b4a' } + ).then((data) => { + this.typeList = data.list + }).catch((e) => { + this.loading = false + }) + // 安全生产责任制类型 + requestFN( + 'dictionaries/getLevels', { DICTIONARIES_ID: 'f2598ba72e864eadabf0ca4b664d26b9' } + ).then((data) => { + this.industryTypeList = data.list + }).catch((e) => { + this.loading = false + }) + // 行业类别 + requestFN( + 'dictionaries/getLevels', { DICTIONARIES_ID: '84254cb5b2ae40eb9f451509b2d370ae' } + ).then((data) => { + this.categoryList = data.list + }).catch((e) => { + this.loading = false + }) + }, + getChooseOne(e) { + this.remoteControl.keyOne = !(e && e.info && e.info.DICTIONARIES_ID && e.info.DICTIONARIES_ID === '7158f688d0f34054a28a9275139298df') + }, + openTextEdit(id, textDisabled) { + if (!id) { + this.textDisabled = false + this.$refs.textEditing.init({ text: this.form.TEXT_INFO }) + } else { + this.textDisabled = textDisabled + this.loading = true + requestFN('textLibrary/getTextInfo', id) + .then((data) => { + if (data.info && data.info.TEXT_INFO && data.info.TEXT_INFO !== '') { + this.$refs.textEditing.init({ text: data.info.TEXT_INFO }) + } else { + if (((!this.form.TEXT_INFO) || this.form.TEXT_INFO === '') && this.textDisabled) { + this.$message.error('此数据未维护文件内容') + } else { + this.$refs.textEditing.init({ text: this.form.TEXT_INFO }) + } + } + this.loading = false + }).catch((e) => { + console.log(e) + this.loading = false + }) + } + }, + getText(e) { + this.form.TEXT_INFO = e.text + }, + exportWord(info) { + this.loading = true + requestFN('textLibrary/getTextInfo', info) + .then((data) => { + if (data.info) { + if ((!data.info) || data.info.TEXT_INFO === '') { + this.$message.error('没有文件导出') + } else { + this.$message.success('导出成功') + window.open(config.httpurl + '/textLibrary/exportWord?BUS_TEXT_LIBRARY_ID=' + info.BUS_TEXT_LIBRARY_ID) + } + } else { + this.$message.error('此数据未维护文件内容') + } + this.loading = false + }).catch((e) => { + console.log(e) + this.loading = false + }) + } + } +} + +</script> diff --git a/src/views/threeSystems/sprLibrary/components/list.vue b/src/views/threeSystems/sprLibrary/components/list.vue new file mode 100644 index 0000000..8829e4d --- /dev/null +++ b/src/views/threeSystems/sprLibrary/components/list.vue @@ -0,0 +1,562 @@ +<template> + <div class="app-container"> + <div class="filter-container"> + <el-form label-width="50px"> + <el-row> + <el-col :span="6"> + <el-form-item label="安全生产责任制名称:" label-width="150px"> + <el-input v-model="form.KEYWORDS" placeholder="请输入" class="filter-item"/> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label-width="10px"> + <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery"> + 搜索 + </el-button> + <el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="addCondition"> + 添加其他搜索条件 + </el-button> + <el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="clearMessage"> + 重置 + </el-button> + </el-form-item> + </el-col> + </el-row> + </el-form> + </div> + <el-table + v-loading="listLoading" + ref="multipleTable" + :row-key="getRowKey" + :data="varList" + :header-cell-style="{ + 'font-weight': 'bold', + 'color': '#000' + }" + :row-class-name="tableRowClassName" + tooltip-effect="dark" + border + fit + highlight-current-row + @cell-mouse-enter="enterSelectionRows" + @cell-mouse-leave="leaveSelectionRows"> + <el-table-column + v-if="false" + :reserve-selection="true" + type="selection" + width="55" + align="center" + /> + <el-table-column type="expand"> + <template slot-scope="props"> + <div style="text-align: left;padding: 10px;"> + <el-form label-position="left" inline> + <el-form-item label="标签"> + <el-tag + v-for="tag in props.row.labels" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.NAME }} + </el-tag> + </el-form-item> + <el-form-item label="国民经济行业类型"> + <div v-if="(props.row.SPECIFICATION_TYPES && props.row.SPECIFICATION_TYPES.length > 0) && ((!props.row.CATEGORY_LIST) || (!props.row.CATEGORY_LIST[0]) || (props.row.CATEGORY_LIST[0].CATEGORY_ID !== '691346658ed744a1bda2ed3a755f606c')) "> + <el-tag + v-for="tag in props.row.SPECIFICATION_TYPES" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </div> + <div v-else> + <el-tag type="warning">通用</el-tag> + </div> + </el-form-item> + </el-form> + </div> + </template> + </el-table-column> + <el-table-column type="index" label="序号" width="50" align="center" /> + <el-table-column align="center" prop="REMARKS" label="安全生产责任制名称" /> + <el-table-column align="center" prop="TYPES" label="类型" > + <template slot-scope="{row}"> + <el-tag + v-for="tag in row.TYPES" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </template> + </el-table-column> + <el-table-column v-if="false" align="center" prop="LABEL" label="标签" > + <template slot-scope="{row}"> + <el-tag + v-for="tag in row.labels" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.NAME }} + </el-tag> + </template> + </el-table-column> + <el-table-column v-if="false" align="center" prop="SPECIFICATION_TYPES" label="国民经济行业类型" width="300px"> + <template slot-scope="{row}"> + <div v-if="(row.SPECIFICATION_TYPES && row.SPECIFICATION_TYPES.length > 0) && ((!row.CATEGORY_LIST) || (!row.CATEGORY_LIST[0]) || (row.CATEGORY_LIST[0].CATEGORY_ID !== '7158f688d0f34054a28a9275139298df'))"> + <el-tag + v-for="tag in row.SPECIFICATION_TYPES" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </div> + <div v-else> + <el-tag type="warning">通用</el-tag> + </div> + </template> + </el-table-column> + <el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" width="200px"/> + <el-table-column v-if="false" :show-overflow-tooltip="true" align="center" prop="UPLOAD_USER_NAME" width="100px" label="数据来源" > + <template slot-scope="{row}"> + {{ !row.CORP_NAME ? '资源库数据' : row.CORP_NAME }} + </template> + </el-table-column> + <el-table-column label="操作" align="center" width="200px"> + <template slot-scope="{row}"> + <el-row> + <el-col :span="14"> + <el-button v-show="!row.LOCKTOOL" type="primary" icon="el-icon-edit" size="mini" @click="handleExport(row)">导出</el-button> + </el-col> + <el-col :span="10"> + <el-button type="primary" icon="el-icon-edit" size="mini" @click="getInformation(row)">查看</el-button> + </el-col> + </el-row> + </template> + </el-table-column> + </el-table> + <div class="page-btn-group"> + <div/> + <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> + </div> + <edit-text-library ref="editTextLibrary" :title="title" @logical-end="saveClose"/> + <text-library-info ref="textLibraryInfo"/> + <update-spe-file ref="updateFile"/> + <update-log ref="updateLog"/> + <condition ref="condition" @getResult="getCondition"/> + </div> +</template> +<style> +.el-table .warning-row { + background: oldlace; +} +</style> +<script> +import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包 +import { requestFN } from '@/utils/request' +import waves from '@/directive/waves' +import editTextLibrary from './editTextLibrary.vue' +import textLibraryInfo from './textLibraryInfo.vue' +import updateLog from './updateLog.vue' +import UpdateLog from './updateLog.vue' +import condition from './condition.vue' +import UpdateSpeFile from './updateSpeFile.vue' +export default { + components: { UpdateSpeFile, UpdateLog, Pagination, editTextLibrary, textLibraryInfo, updateLog, condition }, + directives: { waves }, + data() { + return { + config: config, + listLoading: true, + add: false, + del: false, + edit: false, + listQuery: { + page: 1, + limit: 10 + }, + total: 0, + form: { + KEYWORDS: '', + labels: [], + CATEGORY_LIST: [], + TYPES: [], + SPECIFICATION_TYPES: [], + STATUS: '' + }, + label_name: '', + + varList: [], + pd: [], + isEdit: false, + isLook: false, + title: '' + } + }, + created() { + this.getList() + }, + methods: { + getRowKey(row) { + return row.BUS_TEXT_LIBRARY_ID + }, + getQuery() { + this.$refs.multipleTable.clearSelection() + this.getList() + }, + addCondition() { + this.$refs.condition.init() + }, + getCondition(info) { + this.form.CATEGORY_LIST = info.CATEGORY_LIST + this.form.TYPES = info.TYPES + this.form.SPECIFICATION_TYPES = info.SPECIFICATION_TYPES + this.form.labels = info.LABELS + }, + clearMessage() { + this.label_name = '' + this.form = { + KEYWORDS: '', + labels: [], + CATEGORY_LIST: [], + TYPES: [], + SPECIFICATION_TYPES: [], + STATUS: '' + } + this.$refs.condition.clear() + this.getList() + }, + getList() { + this.listLoading = true + requestFN( + '/textLibrary/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, + { + KEYWORDS: this.form.KEYWORDS, + CATEGORY_LIST: JSON.stringify(this.form.CATEGORY_LIST), + TYPES: JSON.stringify(this.form.TYPES), + SPECIFICATION_TYPES: JSON.stringify(this.form.SPECIFICATION_TYPES), + labels: JSON.stringify(this.form.labels), + STATUS: this.form.STATUS, + ASSOCIATION: '2', + CORPINFO_ID: '0', + LIBRARY_FLAG: '1' + } + ).then((data) => { + this.listLoading = false + this.varList = data.varList + this.total = data.page.totalResult + this.hasButton() + this.pd = data.pd + }).catch((e) => { + this.listLoading = false + }) + }, + handleAdd() { + this.title = '新增' + this.$refs.editTextLibrary.init() + }, + handleEdit(e) { + this.title = '编辑' + this.$refs.editTextLibrary.init({ e: e, isEdit: true }) + }, + getInformation(e) { + this.$refs.textLibraryInfo.init({ e: e }) + }, + handleDelete(e) { + this.$confirm('确定要删除吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/delete', + { + BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID + } + ).then((data) => { + if (data.code === '0') { + this.$message({ + message: '删除成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.getList() + } else { + this.listLoading = false + this.$message.error(data.errorMessage) + } + }).catch((e) => { + this.listLoading = false + }) + }).catch((e) => { + console.log(e) + }) + }, + handleLock(e, flag) { + this.$confirm(flag === '1' ? '确定要锁定吗?' : '确定要解锁吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/lock', + { + BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID, + isLock: flag + } + ).then(() => { + this.$message({ + message: '操作成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch((e) => { + console.log(e) + }) + }, + handleTop(e, flag) { + this.$confirm(flag === '1' ? '确定要置顶吗?' : '确定要取消置顶吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/top', + { + BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID, + isTop: flag + } + ).then(() => { + this.$message({ + message: '操作成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch((e) => { + console.log(e) + }) + }, + handleExport(e) { + this.$confirm('确定要导出文件吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + if (e.MIGRATION_FLAG === '1') { + window.open(config.fileUrl + e.PATH) + } else { + window.open(e.PATH) + } + }).catch((e) => { + console.log(e) + }) + }, + batchDel() { + const _selectData = this.$refs.multipleTable.selection + if (_selectData == null || _selectData.length == 0) { + this.$message({ + message: '请选中要删除的项...', + type: 'error' + }) + return false + } + const _ids = _selectData.filter((item, index) => { + return item.LOCKTOOL + }) + if (_ids.length > 0) { + this.$message.error('选中的数据有锁定数据,请重新选择') + return + } + const ids = _selectData.map((item, index) => { + return item.BUS_TEXT_LIBRARY_ID + }).join(',') + + this.$confirm('确定要删除选中的数据吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/deleteAll', + { + DATA_IDS: ids + } + ).then(() => { + this.$message({ + message: '删除成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.$refs.multipleTable.clearSelection() + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch(() => { + }) + }, + hasButton: function() { + var keys = 'textlibraryThree:add,textlibraryThree:del,textlibraryThree:edit,toExcel' + requestFN( + '/head/hasButton', + { + keys: keys + } + ).then((data) => { + this.add = data.textlibraryThreefhadminadd // 新增权限 + this.del = data.textlibraryThreefhadmindel // 删除权限 + this.edit = data.textlibraryThreefhadminedit // 修改权限 + }).catch((e) => { + this.listLoading = false + }) + }, + tableRowClassName({ row, rowIndex }) { + if (row.ISTOPTIME) { + return 'warning-row' + } + }, + saveClose(e) { + this.getList() + }, + openUpdateFile(row) { + this.$refs.updateFile.init(row) + }, + openUpdateLog(row) { + this.$refs.updateLog.init(row) + }, + setStatus(row, status) { + this.listLoading = true + this.$confirm('是否更改状态?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + requestFN( + '/textLibrary/setStatus', + { + BUS_TEXT_LIBRARY_ID: row.BUS_TEXT_LIBRARY_ID, + STATUS: status + } + ).then((data) => { + this.listLoading = false + this.$message({ + type: 'success', + message: '修改成功!' + }) + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消' + }) + this.listLoading = false + }) + }, + handleCopy(row) { + this.$confirm('确定要将此条数据添加到本地', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.copyInfo(row) + }).catch((e) => { + console.log(e) + this.$message({ + type: 'info', + message: '已取消添加' + }) + }) + }, + copyInfo(row) { + requestFN( + '/textLibrary/copyToOperate?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, + { BUS_TEXT_LIBRARY_ID: row.BUS_TEXT_LIBRARY_ID } + ).then((data) => { + if (data.code === '0') { + this.$message.success('添加成功') + } else { + this.$message.success('添加失败') + } + }).catch((e) => { + this.$message.success('添加失败') + }) + }, + enterSelectionRows(row, column, cell, event) { + if (row.ISTOPTIME) { + this.createTips(event, row, '数据已置顶') + } + }, + leaveSelectionRows(row, column, cell, event) { + if (row.ISTOPTIME) { + this.removeTips(row) + } + }, + createTips(el, row, value) { + const { BUS_TEXT_LIBRARY_ID } = row + const tooltipDom = document.createElement('div') + tooltipDom.style.cssText = ` + display: inline-block; + max-width: 400px; + max-height: 400px; + position: absolute; + top: ${el.clientY + 5}px; + left: ${el.clientX}px; + padding:5px 10px; + overflow: auto; + font-size: 12px; + font-family: PingFangSC-Regular, PingFang SC; + font-weight: 400; + color: #595959; + background: #fff; + border-radius: 5px; + z-index: 19999; + box-shadow: 0 4px 12px 1px #ccc; + ` + tooltipDom.innerHTML = value + tooltipDom.setAttribute('id', `tooltip-${BUS_TEXT_LIBRARY_ID}`) + // 将浮层插入到body中 + document.body.appendChild(tooltipDom) + }, + removeTips(row) { + console.log(row, 'row') + const { BUS_TEXT_LIBRARY_ID } = row + const tooltipDomLeave = document.querySelectorAll(`#tooltip-${BUS_TEXT_LIBRARY_ID}`) + if (tooltipDomLeave.length) { + tooltipDomLeave.forEach(dom => { + document.body.removeChild(dom) + }) + } + } + } +} +</script> diff --git a/src/views/threeSystems/sprLibrary/components/listEm.vue b/src/views/threeSystems/sprLibrary/components/listEm.vue new file mode 100644 index 0000000..a1c6b1e --- /dev/null +++ b/src/views/threeSystems/sprLibrary/components/listEm.vue @@ -0,0 +1,503 @@ +<template> + <div class="app-container"> + <div class="filter-container"> + <el-form label-width="50px"> + <el-row> + <el-col :span="6"> + <el-form-item label="安全生产责任制名称:" label-width="150px"> + <el-input v-model="form.KEYWORDS" placeholder="请输入" class="filter-item"/> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label-width="10px"> + <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery"> + 搜索 + </el-button> + <el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="addCondition"> + 添加其他搜索条件 + </el-button> + <el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="clearMessage"> + 重置 + </el-button> + </el-form-item> + </el-col> + </el-row> + </el-form> + </div> + <el-table + v-loading="listLoading" + ref="multipleTable" + :row-key="getRowKey" + :data="varList" + :header-cell-style="{ + 'font-weight': 'bold', + 'color': '#000' + }" + :row-class-name="tableRowClassName" + tooltip-effect="dark" + border + fit + highlight-current-row + @cell-mouse-enter="enterSelectionRows" + @cell-mouse-leave="leaveSelectionRows"> + <el-table-column + :reserve-selection="true" + type="selection" + width="55" + align="center" + /> + <el-table-column type="index" label="序号" width="50" align="center" /> + <el-table-column align="center" prop="REMARKS" label="安全生产管理制度名称" /> + <el-table-column align="center" prop="TYPES" label="类型" > + <template slot-scope="{row}"> + <el-tag + v-for="tag in row.TYPES" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </template> + </el-table-column> + <el-table-column prop="LABEL" align="center" label="标签" > + <template slot-scope="{row}"> + <el-tag + v-for="tag in row.labels" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.NAME }} + </el-tag> + </template> + </el-table-column> + <el-table-column align="center" prop="SPECIFICATION_TYPES" label="国民经济行业类型" width="300px"> + <template slot-scope="{row}"> + <div v-if="row.SPECIFICATION_TYPES && row.SPECIFICATION_TYPES.length > 0"> + <el-tag + v-for="tag in row.SPECIFICATION_TYPES" + :key="tag.BUS_LIBRARY_LABELS_ID" + :disable-transitions="false" + type="warning" + style="margin-right: 10px;margin-bottom: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </div> + <div v-else> + <el-tag type="warning">通用</el-tag> + </div> + </template> + </el-table-column> + <el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" width="90px"/> + <el-table-column v-if="false" :show-overflow-tooltip="true" align="center" prop="UPLOAD_USER_NAME" width="100px" label="数据来源" > + <template slot-scope="{row}"> + {{ !row.CORP_NAME ? '资源库数据' : row.CORP_NAME }} + </template> + </el-table-column> <el-table-column label="操作" align="center" width="200px"> + <template slot-scope="{row}"> + <el-row> + <el-col :span="24" style="padding-bottom: 10px"> + <el-button type="info" icon="el-icon-view" size="mini" @click="getInformation(row)">查看</el-button> + <el-button type="warning" icon="el-icon-printer" size="mini" @click="handleExport(row)">导出</el-button> + </el-col> + <el-col :span="24"> + <el-button v-if="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)">编辑</el-button> + <el-button v-if="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row)">删除</el-button> + </el-col> + </el-row> + </template> + </el-table-column> + </el-table> + <div class="page-btn-group"> + <div> + <el-button v-if="add" type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button> + </div> + <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> + </div> + <edit-text-library ref="editTextLibrary" :title="title" @logical-end="saveClose"/> + <text-library-info ref="textLibraryInfo"/> + <update-spe-file ref="updateFile"/> + <update-log ref="updateLog"/> + <condition ref="condition" have-corp-flag @getResult="getCondition"/> + </div> +</template> +<style> +.el-table .warning-row { + background: oldlace; +} +</style> +<script> +import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包 +import { requestFN } from '@/utils/request' +import waves from '@/directive/waves' +import editTextLibrary from './editTextLibrary.vue' +import textLibraryInfo from './textLibraryInfo.vue' +import updateLog from './updateLog.vue' +import UpdateLog from './updateLog.vue' +import condition from './condition.vue' +import UpdateSpeFile from './updateSpeFile.vue' +export default { + components: { UpdateSpeFile, UpdateLog, Pagination, editTextLibrary, textLibraryInfo, updateLog, condition }, + directives: { waves }, + data() { + return { + config: config, + listLoading: true, + add: false, + del: false, + edit: false, + listQuery: { + page: 1, + limit: 10 + }, + total: 0, + form: { + KEYWORDS: '', + labels: [], + CATEGORY_LIST: [], + TYPES: [], + SPECIFICATION_TYPES: [], + STATUS: '' + }, + label_name: '', + + varList: [], + pd: [], + isEdit: false, + isLook: false, + title: '' + } + }, + created() { + this.getList() + }, + methods: { + getRowKey(row) { + return row.BLACKSPOT_ID + }, + getQuery() { + this.$refs.multipleTable.clearSelection() + this.getList() + }, + addCondition() { + this.$refs.condition.init() + }, + getCondition(info) { + this.form.CATEGORY_LIST = info.CATEGORY_LIST + this.form.TYPES = info.TYPES + this.form.SPECIFICATION_TYPES = info.SPECIFICATION_TYPES + this.form.labels = info.LABELS + this.form.CORPINFO_ID = info.CORPINFO_ID + }, + clearMessage() { + this.label_name = '' + this.form = { + KEYWORDS: '', + labels: [], + CATEGORY_LIST: [], + TYPES: [], + SPECIFICATION_TYPES: [], + STATUS: '' + } + this.$refs.condition.clear() + this.getList() + }, + getList() { + this.listLoading = true + requestFN( + '/textLibrary/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, + { + KEYWORDS: this.form.KEYWORDS, + CATEGORY_LIST: JSON.stringify(this.form.CATEGORY_LIST), + TYPES: JSON.stringify(this.form.TYPES), + SPECIFICATION_TYPES: JSON.stringify(this.form.SPECIFICATION_TYPES), + labels: JSON.stringify(this.form.labels), + STATUS: this.form.STATUS, + ASSOCIATION: '2', + ENTERPRISE_SIDE: '0', + CORPINFO_ID: this.form.CORPINFO_ID + } + ).then((data) => { + this.listLoading = false + this.varList = data.varList + this.total = data.page.totalResult + this.hasButton() + this.pd = data.pd + }).catch((e) => { + this.listLoading = false + }) + }, + handleAdd() { + this.title = '新增' + this.$refs.editTextLibrary.init() + }, + handleEdit(e) { + this.title = '编辑' + this.$refs.editTextLibrary.init({ e: e, isEdit: true }) + }, + getInformation(e) { + this.$refs.textLibraryInfo.init({ e: e }) + }, + handleDelete(e) { + this.$confirm('确定要删除吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/delete', + { + BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID + } + ).then((data) => { + if (data.code === '0') { + this.$message({ + message: '删除成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.getList() + } else { + this.listLoading = false + this.$message.error(data.errorMessage) + } + }).catch((e) => { + this.listLoading = false + }) + }).catch((e) => { + console.log(e) + }) + }, + handleLock(e, flag) { + this.$confirm(flag === '1' ? '确定要锁定吗?' : '确定要解锁吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/lock', + { + BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID, + isLock: flag + } + ).then(() => { + this.$message({ + message: '操作成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch((e) => { + console.log(e) + }) + }, + handleTop(e, flag) { + this.$confirm(flag === '1' ? '确定要置顶吗?' : '确定要取消置顶吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/top', + { + BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID, + isTop: flag + } + ).then(() => { + this.$message({ + message: '操作成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch((e) => { + console.log(e) + }) + }, + handleExport(e) { + this.$confirm('确定要导出文件吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + if (e.MIGRATION_FLAG === '1') { + window.open(config.fileUrl + e.PATH) + } else { + window.open(e.PATH) + } + }).catch((e) => { + console.log(e) + }) + }, + batchDel() { + const _selectData = this.$refs.multipleTable.selection + if (_selectData == null || _selectData.length == 0) { + this.$message({ + message: '请选中要删除的项...', + type: 'error' + }) + return false + } + const _ids = _selectData.filter((item, index) => { + return item.LOCKTOOL + }) + if (_ids.length > 0) { + this.$message.error('选中的数据有锁定数据,请重新选择') + return + } + const ids = _selectData.map((item, index) => { + return item.BUS_TEXT_LIBRARY_ID + }).join(',') + + this.$confirm('确定要删除选中的数据吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/textLibrary/deleteAll', + { + DATA_IDS: ids + } + ).then(() => { + this.$message({ + message: '删除成功', + type: 'success' + }) + this.listLoading = false + this.varList = [] + this.listQuery.page = 1 + this.$refs.multipleTable.clearSelection() + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch(() => { + }) + }, + hasButton: function() { + var keys = 'textlibraryThree:add,textlibraryThree:del,textlibraryThree:edit,toExcel' + requestFN( + '/head/hasButton', + { + keys: keys + } + ).then((data) => { + this.add = data.textlibraryThreefhadminadd // 新增权限 + this.del = data.textlibraryThreefhadmindel // 删除权限 + this.edit = data.textlibraryThreefhadminedit // 修改权限 + }).catch((e) => { + this.listLoading = false + }) + }, + tableRowClassName({ row, rowIndex }) { + if (row.ISTOPTIME) { + return 'warning-row' + } + }, + saveClose(e) { + this.getList() + }, + openUpdateFile(row) { + this.$refs.updateFile.init(row) + }, + openUpdateLog(row) { + this.$refs.updateLog.init(row) + }, + setStatus(row, status) { + this.listLoading = true + this.$confirm('是否更改状态?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + requestFN( + '/textLibrary/setStatus', + { + BUS_TEXT_LIBRARY_ID: row.BUS_TEXT_LIBRARY_ID, + STATUS: status + } + ).then((data) => { + this.listLoading = false + this.$message({ + type: 'success', + message: '修改成功!' + }) + this.getList() + }).catch((e) => { + this.listLoading = false + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消' + }) + this.listLoading = false + }) + }, + enterSelectionRows(row, column, cell, event) { + if (row.ISTOPTIME) { + this.createTips(event, row, '数据已置顶') + } + }, + leaveSelectionRows(row, column, cell, event) { + if (row.ISTOPTIME) { + this.removeTips(row) + } + }, + createTips(el, row, value) { + const { BUS_TEXT_LIBRARY_ID } = row + const tooltipDom = document.createElement('div') + tooltipDom.style.cssText = ` + display: inline-block; + max-width: 400px; + max-height: 400px; + position: absolute; + top: ${el.clientY + 5}px; + left: ${el.clientX}px; + padding:5px 10px; + overflow: auto; + font-size: 12px; + font-family: PingFangSC-Regular, PingFang SC; + font-weight: 400; + color: #595959; + background: #fff; + border-radius: 5px; + z-index: 19999; + box-shadow: 0 4px 12px 1px #ccc; + ` + tooltipDom.innerHTML = value + tooltipDom.setAttribute('id', `tooltip-${BUS_TEXT_LIBRARY_ID}`) + // 将浮层插入到body中 + document.body.appendChild(tooltipDom) + }, + removeTips(row) { + console.log(row, 'row') + const { BUS_TEXT_LIBRARY_ID } = row + const tooltipDomLeave = document.querySelectorAll(`#tooltip-${BUS_TEXT_LIBRARY_ID}`) + if (tooltipDomLeave.length) { + tooltipDomLeave.forEach(dom => { + document.body.removeChild(dom) + }) + } + } + } +} +</script> diff --git a/src/views/threeSystems/sprLibrary/components/textLibraryInfo.vue b/src/views/threeSystems/sprLibrary/components/textLibraryInfo.vue new file mode 100644 index 0000000..5ce9a08 --- /dev/null +++ b/src/views/threeSystems/sprLibrary/components/textLibraryInfo.vue @@ -0,0 +1,146 @@ +<template> + <el-dialog v-loading="loading" v-if="dialogVisible" :visible.sync="dialogVisible" title="详情"> + <el-form ref="form" :model="form" label-width="180px"> + <el-form-item label="安全生产责任制名称:" prop="FILE_NAME"> + <el-input v-model="form.REMARKS" disabled style="width: 70%"/> + </el-form-item> + <el-form-item label="规程属性:" prop="FILE_NAME"> + <el-tag + v-for="tag in form.CATEGORY_LIST" + :key="tag.value" + :disable-transitions="false" + style="margin-right: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </el-form-item> + <el-form-item label="类型:" prop="FILE_NAME"> + <el-tag + v-for="tag in form.TYPES" + :key="tag.value" + :disable-transitions="false" + style="margin-right: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </el-form-item> + <el-form-item v-if="remoteControl.keyOne" label="国民经济行业类型:" prop="FILE_NAME"> + <el-tag v-for="tag in form.SPECIFICATION_TYPES" :key="tag.value" :disable-transitions="false" style="margin-right: 10px"> + {{ tag.CATEGORY_NAME }} + </el-tag> + </el-form-item> + <el-form-item label="上传时间:" prop="FILE_NAME"> + <el-input v-model="form.UPLOAD_TIME" disabled style="width: 70%"/> + </el-form-item> + <el-form-item label="上传人:" prop="FILE_NAME"> + <el-input v-model="form.UPLOAD_USER_NAME" disabled style="width: 70%"/> + </el-form-item> + <el-form-item prop="tags" label="标签:"> + <el-tag + v-for="tag in form.labels" + :key="tag.value" + :disable-transitions="false" + style="margin-right: 10px"> + {{ tag.NAME }} + </el-tag> + </el-form-item> + <el-form-item label="文件详情:"> + <el-button size="small" type="primary" @click="openTextEdit({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID})">查看文件详情</el-button> + <el-button size="small" type="primary" @click="exportWord({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID})">导出word</el-button> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button @click="goBack">返 回</el-button> + </div> + <text-editing ref="textEditing" :disabled="true" append-to-body title="文本编辑器"/> + </el-dialog> +</template> +<script> +import Pagination from '@/components/Pagination' +import waves from '@/directive/waves' +import { requestFN } from '@/utils/request' +import TextEditing from '../../../util/textEditing.vue' + +export default { + components: { TextEditing, Pagination }, + directives: { waves }, + data() { + return { + config: config, + dialogVisible: false, + form: { + BUS_TEXT_LIBRARY_ID: '', + FILE_NAME: '', + FILE: [], + TYPE: '', + labels: [], + UPLOAD_TIME: '', + UPLOAD_USER_NAME: '' + }, + loading: false, + remoteControl: { + keyOne: true + } + } + }, + methods: { + init(e) { + this.dialogVisible = true + this.loading = true + this.e = e.e + requestFN( + '/textLibrary/goEdit', + { + BUS_TEXT_LIBRARY_ID: this.e.BUS_TEXT_LIBRARY_ID + } + ).then((data) => { + this.loading = false + this.form = data.data + this.form.FILE = [] + this.remoteControl.keyOne = !(this.form.CATEGORY_LIST[0].CATEGORY_ID === '7158f688d0f34054a28a9275139298df') + }).catch((e) => { + this.$message.error(e) + this.loading = false + }) + }, + goBack() { + this.dialogVisible = false + this.$emit('goBack', this.e) + }, + openTextEdit(id) { + this.loading = true + requestFN('textLibrary/getTextInfo', id) + .then((data) => { + if (data.info && data.info.TEXT_INFO && data.info.TEXT_INFO !== '') { + this.$refs.textEditing.init({ text: data.info.TEXT_INFO }) + } else { + this.$message.error('此数据未维护文件内容') + } + this.loading = false + }).catch((e) => { + console.log(e) + this.loading = false + }) + }, + exportWord(info) { + this.loading = true + requestFN('textLibrary/getTextInfo', info) + .then((data) => { + if (data.info) { + if ((!data.info) || data.info.TEXT_INFO === '') { + this.$message.error('没有文件导出') + } else { + this.$message.success('导出成功') + window.open(config.httpurl + '/textLibrary/exportWord?BUS_TEXT_LIBRARY_ID=' + info.BUS_TEXT_LIBRARY_ID) + } + } else { + this.$message.error('此数据未维护文件内容') + } + this.loading = false + }).catch((e) => { + console.log(e) + this.loading = false + }) + } + } +} + +</script> diff --git a/src/views/threeSystems/sprLibrary/components/updateLog.vue b/src/views/threeSystems/sprLibrary/components/updateLog.vue new file mode 100644 index 0000000..ee30bd2 --- /dev/null +++ b/src/views/threeSystems/sprLibrary/components/updateLog.vue @@ -0,0 +1,55 @@ +<template> + <el-dialog v-loading="loading" v-if="visible" :visible.sync="visible" title="替换"> + <el-table :data="list"> + <el-table-column prop="CREATE_TIME" label="日期"/> + <el-table-column prop="CREATOR_NAME" label="姓名"/> + </el-table> + <div slot="footer" class="dialog-footer"> + <el-button @click="goBack">取 消</el-button> + </div> + </el-dialog> +</template> +<script> +import Pagination from '@/components/Pagination' +import waves from '@/directive/waves' +import { requestFN } from '@/utils/request' + +export default { + components: { Pagination }, + directives: { waves }, + data() { + return { + visible: false, + list: [], + loading: false, + id: '' + } + }, + methods: { + init(e) { + this.visible = true + this.id = e.BUS_TEXT_LIBRARY_ID + this.getList() + }, + goBack() { + this.list = [] + this.visible = false + }, + getList() { + this.loading = true + requestFN( + '/textLibrary/getUpdateLog', + { + BUS_TEXT_LIBRARY_ID: this.id + } + ).then((data) => { + this.loading = false + this.list = data.list + }).catch((e) => { + this.loading = false + }) + } + } +} + +</script> diff --git a/src/views/threeSystems/sprLibrary/components/updateSpeFile.vue b/src/views/threeSystems/sprLibrary/components/updateSpeFile.vue new file mode 100644 index 0000000..63cfb6f --- /dev/null +++ b/src/views/threeSystems/sprLibrary/components/updateSpeFile.vue @@ -0,0 +1,77 @@ +<template> + <el-dialog v-loading="loading" v-if="visible" :visible.sync="visible" title="替换"> + <el-form ref="form" :model="form" :rules="rules" label-width="150px"> + <el-form-item label="文件:" prop="FILE"> + <upload-file :file-list.sync="form.FILE" :limit="1" :file-size="200" append-to-body accept=".pdf"/> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button @click="goBack">取 消</el-button> + <el-button type="primary" @click="save">确 定</el-button> + </div> + </el-dialog> +</template> +<script> +import Pagination from '@/components/Pagination' +import waves from '@/directive/waves' +import { upload } from '@/utils/upload' +import uploadFile from '../../../../components/upload-file/index.vue' + +export default { + components: { Pagination, uploadFile }, + directives: { waves }, + data() { + return { + visible: false, + form: { + FILE: [], + BUS_TEXT_LIBRARY_ID: '' + }, + rules: { + FILE: [{ required: true, message: '请选择文件', trigger: 'blur' }] + }, + loading: false + } + }, + methods: { + init(e) { + this.visible = true + this.form.BUS_TEXT_LIBRARY_ID = e.BUS_TEXT_LIBRARY_ID + }, + goBack() { + this.form = { + FILE: [], + BUS_TEXT_LIBRARY_ID: '' + } + this.visible = false + }, + save() { + const loading = this.$loading({ + lock: true, + text: '上传中...', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) + const formData = new FormData() + for (let i = 0; i < this.form.FILE.length; i++) { + if (this.form.FILE[i].raw) { + formData.append('FILE', this.form.FILE[i].raw) + } + } + formData.append('BUS_TEXT_LIBRARY_ID', this.form.BUS_TEXT_LIBRARY_ID) + upload( + '/textLibrary/updateFile', + formData + ).then((data) => { + loading.close() + this.visible = false + this.$emit('logical-end', { result: 'OK' }) + }).catch((e) => { + loading.close() + console.log(e) + }) + } + } +} + +</script> diff --git a/src/views/threeSystems/sprLibrary/index.vue b/src/views/threeSystems/sprLibrary/index.vue new file mode 100644 index 0000000..8d78561 --- /dev/null +++ b/src/views/threeSystems/sprLibrary/index.vue @@ -0,0 +1,19 @@ +<template> + <div> + <List v-if="activeName==='List'" ref="list" /> + <Dashboard v-if="activeName==='Dashboard'" ref="Dashboard"/> + </div> +</template> +<script> +import List from './components/list.vue' +import Dashboard from './components/dashboard.vue' +export default { + components: { List, Dashboard }, + data() { + return { + activeName: 'Dashboard' + } + } +} + +</script> From cf952e0ee373bcced660dbad019b5cd3fa10e99e Mon Sep 17 00:00:00 2001 From: limingyu <limingyu203@163.com> Date: Mon, 29 Apr 2024 14:17:08 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E5=8F=B3=E4=BE=A7?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B0=94=E8=B1=A1=E7=9B=91=E6=B5=8B=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E6=A8=A1=E5=9D=97=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/map/dialog/index.vue | 12 +++-- .../map/dialog/meteorologicalMonitoring.vue | 46 +++++++++++++++++++ src/views/map/index.vue | 14 ++++++ 3 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 src/views/map/dialog/meteorologicalMonitoring.vue diff --git a/src/views/map/dialog/index.vue b/src/views/map/dialog/index.vue index 96d68f2..7a15a2a 100644 --- a/src/views/map/dialog/index.vue +++ b/src/views/map/dialog/index.vue @@ -1,6 +1,6 @@ <template> <div class="bi-different-dialog"> - <el-dialog id="eldig" :visible="visible" :before-close="closeDialog" :title="title" :close-on-click-modal="false" :width="width"> + <el-dialog id="eldig" :visible="visible" :before-close="closeDialog" :title="title" :close-on-click-modal="false" :width="width" top="50px"> <!-- 动火 --> <!--消防模块对接--> <weatherstation v-if="type === '293187ddfd984c9ab3fd716aef58da0e'" :id="id" :type="type" :gangkou="gangkou"/> @@ -59,6 +59,9 @@ <outSourceInfo v-if="type === 'PROJECT'" :id="id" :type="type" /> <outSourceVideoInfo v-if="type === 'VIDEO'" :id="id" :type="type" /> <!-- 重点工程 end --> + <!-- 气象监测-右边栏 start--> + <meteorological-monitoring v-if="type === 'METEOROLOGICAL'" :id="id" :type="type" :gangkou="gangkou"/> + <!-- 气象监测-右边栏 end--> </el-dialog> </div> </template> @@ -106,6 +109,8 @@ import peoplePositionYGS from './peoplePositionYGS.vue' import outSourceInfo from './outSourceInfo.vue' import outSourceVideoInfo from './outSourceVideoInfo.vue' import AlarmDevice from './alarmDevice' +import meteorologicalMonitoring from './meteorologicalMonitoring.vue' + export default { components: { @@ -150,7 +155,8 @@ export default { peoplePositionYGS, outSourceInfo, outSourceVideoInfo, - MkGateMachineCmt + MkGateMachineCmt, + meteorologicalMonitoring }, props: { title: { @@ -230,7 +236,7 @@ export default { font-size: 14px; color: #fff; overflow-y: auto; - max-height: 60vh; + max-height: 85vh; //设置滚动条样式 &::-webkit-scrollbar { diff --git a/src/views/map/dialog/meteorologicalMonitoring.vue b/src/views/map/dialog/meteorologicalMonitoring.vue new file mode 100644 index 0000000..0a9696f --- /dev/null +++ b/src/views/map/dialog/meteorologicalMonitoring.vue @@ -0,0 +1,46 @@ +<template> + <div class="app-container print-work"> + <iframe + :src="'http://192.168.42.57:8080/QinHuangDao'" + style="width: 100%;height: 80vh;"/> + </div> +</template> + +<script> + +export default { + props: { + id: { + type: String, + default() { + return '' + } + }, + type: { + type: String, + default() { + return '' + } + } + }, + data() { + return {} + }, + methods: { + } +} +</script> +<style lang="scss" scoped> + #main4{ + width: 340px; + height: 380px; + } + #main5{ + width: 340px; + height: 380px; + } + #main6{ + width: 340px; + height: 380px; + } +</style> diff --git a/src/views/map/index.vue b/src/views/map/index.vue index c27605f..1b47b0c 100644 --- a/src/views/map/index.vue +++ b/src/views/map/index.vue @@ -429,6 +429,12 @@ export default { checkImg: require('../../assets/map/index/map_on.png'), check: false, label: '纯净地图' + }, + { + img: require('../../assets/map/index/map.png'), + checkImg: require('../../assets/map/index/map_on.png'), + check: '', + label: '气象监测' } ], myEntityCollection: {}, @@ -1894,6 +1900,14 @@ export default { this.componentKey = Math.random() this.bottomOptionsKey = Math.random() this.bottomOptionsAnimationComplex = false + } else if (index === 6) { + this.dialog.visible = true + this.dialog.title = '气象监测' + this.dialog.type = 'METEOROLOGICAL' + this.dialog.id = 'METEOROLOGICAL' + this.dialog.corpInfoId = '' + this.dialog.infoname = '' + this.dialog.width = '96%' } }, changeSceneMode(check) { From b0925b96e296806c1eb9bed0022abf8207b0472c Mon Sep 17 00:00:00 2001 From: liujun <liujun@zcloudchina.com> Date: Mon, 29 Apr 2024 14:53:26 +0800 Subject: [PATCH 08/10] =?UTF-8?q?1=E3=80=81=E7=9B=B8=E5=85=B3=E6=96=B9?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=90=8D=E7=A7=B0=E9=94=99=E8=AF=AF=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=202=E3=80=81=E7=9B=B8=E5=85=B3=E6=96=B9=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=B9=B3=E5=8F=B0=E8=B5=84=E6=BA=90=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/map/renyuan/ico1.png | Bin 0 -> 1483 bytes src/assets/map/renyuan/ico2.png | Bin 0 -> 1527 bytes src/assets/map/renyuan/ico3.png | Bin 0 -> 1845 bytes src/assets/map/renyuan/ico4.png | Bin 0 -> 1575 bytes src/assets/map/renyuan/ico5.png | Bin 0 -> 1553 bytes 5 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/assets/map/renyuan/ico1.png create mode 100644 src/assets/map/renyuan/ico2.png create mode 100644 src/assets/map/renyuan/ico3.png create mode 100644 src/assets/map/renyuan/ico4.png create mode 100644 src/assets/map/renyuan/ico5.png diff --git a/src/assets/map/renyuan/ico1.png b/src/assets/map/renyuan/ico1.png new file mode 100644 index 0000000000000000000000000000000000000000..191835eec83470e4c690efa33d31205fe6e4d7d7 GIT binary patch literal 1483 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nAI{vB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxOgGuk#8koDQqR!L z*u>ION5ROz&_dt9Lf_C>*U-$$#K6kPNC66zfVLH-q*(>IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD<cE0=g99h1>#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv<o$T9gcok2GbNW?<Oiw+N&V=o%}R{N&Qy)VvZ;7h5Huh+ax&ij}34larZ|p^1T^ zi?gAjtDBRln}M^lo4K=@o3pu*iwjJzXI^nhVqS78Om8MauQ6V|R?bDKi6!|(A^G_^ zu-FU8$S=t+&d4uNaCQd8mZgG5cxGNoetEGbD0rc+O)bhSOHFYr%Fk5*hmTbz7B@JV zJ3AS<7@3$Fm>UA!?`mmi>gwd`Wa4aL;pS*+ZlMI#n}WsfP`#!&_38s1qYsK)q{xN| z0aFl&2~WB}4m|Ov<^fZD5in^RwmvRqU|_QLba4!+xb@_^uSZCr$bpaM#xvCfEqpmA zw+W~yrE)ag7Et_iKy2$o4d&)ME!_nd&-qG=3tv3sQE*+!lqXBEPA4aIVynnQB`%gi zg|0=1R#txhy1(R@+~>mQwxw0we19rFm%cANH>di&@e_+aQJ0pr4N4o1R2%U-Z4T=> zZCj$esoS#dq2RB%Wv{*Sl8)~@{WOPjUyS5AMb~NEmYs*azE;d|`F~V-hKo>pp`5ct zKuS*k?g{n#HwGO&^_%bQiUSO<KFTewXt0zq?YaNnPv(@)@=wP#FYmhae(M6M%R&2m zYTRYBK02L`%$O7sUa7JD$~L3g+m(Bc3I8ckz1DlV+d1MO&$%D3UTw&oZMVH8&E;al z>m6U7mv1)P(7|W(eSU<bu=P4VUk~TI(>`){oU9hzXFh>rshLHmXpO76T7dv}$3x?3 z7n5ckmyJFvy7&LZD>1uddNYnzgfYLA)K3yU?{oI+O7m&AV<v9dc%@3#X94f>Leb+X zmUkyE-In3C>+Z8lg-q)WdJaB$TCu6B=5NQFvdNofR`jh6I)40`SDoFu@7JG2AAgzP zr(XAXRf5p%vitTY%C+N*Rhc|xH1Azqs#$tX@naYt^ZJGSojYvqO*!jw+)n2E=059t zcQXDxFwK5^_Nn8|!=-DCzD?P)ZoPhak;e@4KTOHK#bR2ezL!5tnjd|2#p{=G$F7}x zUC4iYk=O2d_IDlco1BoFCwreub>6hy2ZN4={QI4?blr)@`<<s^eSR?W7wW!O{CNKl d_vh#aMuwL7i}M3xrb~c|S5H?zmvv4FO#nq<H%9;f literal 0 HcmV?d00001 diff --git a/src/assets/map/renyuan/ico2.png b/src/assets/map/renyuan/ico2.png new file mode 100644 index 0000000000000000000000000000000000000000..1f28bbec48ac3d86c082976630d44755ebac794e GIT binary patch literal 1527 zcmaJ>c~BE~6kcRhz@{EmxfGZ63O30mVRJ1+C)rIPQ({AiO7UDbOW29YuE|Ei;V6pN zIEph$X+^CCk9MX}tU69DmR7V3Vzr&N7;hqiwjk0vMMhig20{CW^*6J><IVTI_q}6w zi)C(xASNLO004n06SwkbQuvD+!S89(BQ^XH&lz&L944PDBs>(Lvop&n(BvW<l$9dv zMJt=BbO4B)LECb<TyqvmGA;=b#z_1wmS+P%`W!z?kWPvNms1Yft%V+b-2j2KT?;Kx zn5AYGqYCKEVh@#5Jl94RJ4uZlnll?r_oKW67sU~v-?hT+Mg3Z6z%R<*!)6!)2OykN z3%wAPYqo$G<Do!>L@6d^hyqk;Br;_xqS1&zxm2cxrD|A~DwZixM2gDg;NXJzXdZh$ zYQ>F%vG|u3D&RO4h2g@&LP=q&gz-3FnMR|5rE*v<7xM_Qx5&*AezDs-b;tuwc}Wk= zax~)x!ybv{jE~boywVpbxLC9KrDL~uuuy!-U_ZgaGKmy+xx#r3puL=xdL`qvXs@k^ zrC=-NWqclz???XBAu?aPHwOv>c{M1`kUkgX=1jO2;w=(8ZAbN(T4hurxKxH?GMT}s zlOvd3YDCmJxf0i7*bvv`_Hu-qq=vZkD=zj%E{b_5f@3^3hFLMxJxc+@G2Q}(1u-n# zEe$AKK)dZsp*JO5-a)mLhh9b5jUL7Y4%7#wU#CHZ>E*Z_QAkxXUcW&jQyBCHJ%Xv# zMx8>Xh6cIz*X90#tN33o%!`4;&HYcahfMqgg|9D1mw&t*e#*^HyoVp{u7hU@02t;l z;X0fD+TAL1rY(DX)9Ux127`7wK3HX+0tI$~$zOssa%lLri7DA#^6Ai`lTqv9Q)|uo z>T46mMwV5!));JCCl23ot)>n>Xs(X(J=u$nPHMdIxM%XnMO<6c#rl$a&+hFh>G{f0 zpEV=r#F)-l@s3J=MPSXc$u?aq^4+xbweR*e&kH`<*m<Y3yL@5YRq3<HzO#v{ihIz8 z#89+o+egQT^%US=ymRQBYE%iEYDDVt1kW>*%TF~bH{G9{vWwkIe)CJ(gJW}?<Ck;_ z>wn7jw<7b~g(B1Z=%r%JHGX!7us&|P?sh3AZYbSZ+pp@f#8zY4ZlTE0|3Pw}I(lz{ zK5^&oeOGU_$Jh48?O7kO)n^Q4-G2m`FIAqV+ON(NUm%Zl)g|UZoqums_J98I%~3P= zix7wP%ITPfXCIzFshY83d-KT5xbLUWN)cC&CRU%zJK6?hH5E;|G5hhSQ=5Wme?dg@ ztXAOhfg>4|FL+3B`FxJ1B36t?ULXEInbfkbNzgPiVAf|`OgI`U5=Nxe#%#9VrPWMu zY0AVLi(tao8kqP*Ij)SwR(-ZLw4<1{RBUKI^j4KA@8KWUd&l-QqCb><J1&%W^X)2P zeaDhOOl50b<=HXa*`Zly4!1ORsH1$=YIW>FfwOH?{ieW^MVJ0rT(Ci`!O!n|f(#4% zI9;GiI&t5*ru9*NTv>)?Uwg@w(%om=bpM}sMWQlY+@%C(`GrZhe_J1WXXWaBw_<)} zqx0K@2guID`!jC6S5l(89xM$QpB_KO#_bMG>t5T@yZC5Jg!c0Dyx{YmhM%WIi~!ni V8*T>4l`Y|4vB@wOKcZi@?q3)sK}!Gt literal 0 HcmV?d00001 diff --git a/src/assets/map/renyuan/ico3.png b/src/assets/map/renyuan/ico3.png new file mode 100644 index 0000000000000000000000000000000000000000..9370a0e59901eab30dc1552a04fa75c6b5df8dde GIT binary patch literal 1845 zcmaJ?X;2eq7|wuzB8Z}+por@tc##uA4hTXHBtkHTR8mAGBnt#cHYAILqj;ev1EQfE za#SrK>L|3Lq9eqp(Ne`qH6tLDRsjozRtq|{g3xXhv_Gsnv-^GDJJ0jJ&wG5cI)21@ zNBhP07!1ad8_E`-tGnf$X^VdS3H4Rz;)-xYNF*GOq>EJ$CRhr`K>$}SPJjfESelV~ z8w$W+ti5DH5hCJ+(<QJRC$?a48o3f>V=w{hG)l1~8A5<KC_$!RfX|zZARv=6z$h}0 zz*DlIL|JI23X05(5K1zWB{V6xE)WRN&`}3+2oVDsd5S_!*D%1he(C7mV#b5OTL_ZO z0N;rc@%R7>RzUz6=ZBRLeaQfYh9mm<_|j<J0Es}P;t5nd(FaTPqx%x*BoZ+7fM_(8 zG@dSChfKvnPYf^-L6menK0Q4hm+pguRS9?^jYh*0NO%$niz2Y<3<V<AU=?bQX%B2j zEm6sohzwQ$7LVdMI1OQdsM2>S$dx?ad&dg(RH4w4;Wc6<o`@sh<#J12Z_#Q*0DX}0 zQM6i^p@i@PNDZf{Bxpb4J*LTM?LHmI0z}o&*{~!{4k-{Wn*pL0oKz;Ivzbg9g~K8e zh-?;-$O#GdBhr{;3Wv%jlgUIM&NP>+P$Oc61e)f`K5z-2<kDFxNQ}TLAq=NXcaNV4 zBd|IVRst-RrCT&$Rg_F2h11omE#;k33#nu~AZdsSmIH6=LzjI-1CzpHlGr3)GJ!%w z^>b)MGKa}w`m(6hkYF-}3QlpQAIW`+Oa5Oj9u<SPH1|Kvo;INqWZAwSUG(sN_#p*4 z@hWt*GhOQH(HnDu%MKQ5x@y|95+lTJ*GAOw@d_R*|FEkXuDJd5kmot=(+5dODqW&O z@{u2~mu|D8_m>^cTI-DMC=AnrML%`;Cc~m_>9wz#ueJ@p8cJ&(U<^Dxy|Fv%o;t@k zQ28RjI55~{^UYsQ@|CsKE=x>?PXA~#GSNKmS(+<#>7V|N9XDph)(l72D00(U>b^B0 zDU`yIo(z|*c|RKVFWjFt7)NinYrUcC3+uUXXC%n(i66M9GBVh<_w<)R2m7kr)(wRU zMJqn5D+?IaCq1LuyNIdfF|+k?=7bsXu}0HP_ol!h+)7&Z(!A6lUQGA#p#r%}sA)k! z<6vZ7j6=!fa><zUuzP&@MdGU9Ey6fVd{xN34$y8^=kAiu+?V{+FV53{6|qi{$LDSx zafLefT+$Zm5H3$}!Q|Xu<$3gbZ`fgBC&P2IS>j}D+|cZpQ7cKpY<XI_L|(HoFuGz4 zSG;@j;o^qw<jf}P`q+V9{=vk&U_%QnKRBOrtSQv7vH9ol;aJ+4VZD}l*MWp7_HG5m z*!I?j(df3MZH?S{Ueya<%snK?p8bHrw;t7N8CsT&SK0WOSJcTK@@{Kxal@%T_x9eR z{20b0bR;>`YFYnRXI{PLdUf5|m6JBOb|Sk@5ka|Fz$oYcQ_3p+g-g{n9htdk6!qC` z+Whj`;!_=sbI79HM4j1niPh+vD}D7)+Z*dm&sE#CagrRXd4jLY!?@U>vkw>M=V;F6 zG*=!w&hZ=3SW#Z`v9ngD&Q6v(wtcq-LHIikjLom0=+>+r-65ZOZ$qk9B{CU%hmKX` zwwReAh*jUY&%O3;RhPf4N^yTEcvyZ)S6gECX})0}b3N#8p`>f)<-MCi*ON=C=d?{U znOQe?m9+p49(D)r&$dzecV4$L1eN?Q>>w;_+vJ_07@L36!}`_zdEL->>x|Z0g9Xmn z=edK0D-5Y_k2JX?-FVPw_}>??4fXte3#5HESNecw9*+A$uWi%xFE$<$9X#5pJ9qg2 zOIxam)O%-4t|_xEsB%(0X6~%K;kY8!&-QU{CBC@uiu>xz1?C4Wo}N*+{K1i(rQw0F zq5QT}k%#*}%>nV{{PWrnuinFUf$4?>rH$!Hh(5*`);pm$J(Fy#GdRD_6lM*Bk8F!K z6ooPF6?RS9oM>?CX<U|dWg@E9zJYl)sKjo?3pj6Gzxk4=F>*b&v$|1m$R_mW@@&1) jpkF(%^p@a{lNf7^o$b*@7q?4(v;4@ooCtP3Gj`9v5=-K! literal 0 HcmV?d00001 diff --git a/src/assets/map/renyuan/ico4.png b/src/assets/map/renyuan/ico4.png new file mode 100644 index 0000000000000000000000000000000000000000..42475ba89abf22f78e31f65714b37ffdd4fed8f4 GIT binary patch literal 1575 zcmaJ>eM}Q~7{2z(myE4OzIA#W5plG=UTL9MTIeTGwG2yz&TT?JuC&_TwY`HDLKJj? z3Y%_b45Ql=T^MXmMm7~kf=h(>H5c~>bAChxjfqBPbh@FS?24fK!+FWw?<3FizR&x- zZ*FU8Nm1Oq)Oi2^#OaH*MrK_cexoCqZ=UerK4wXwb!NJZbkG5d9|u%+(uzZRkEI$n z;ud?I?-VWv05HR4GSg<mDw&P+2rOZYAn5TjYyglK1icp92Aqbhc(sdAz;_3Z!H~<Y zfGZ>hp~0)covz|~KVDW}VzSk5uwiz%ARm$kWlR7MPFtX$$4yYOpaPzWD`WQIYXpX7 zAoK<W{7jVDPzq^CKMqL*IeZ%`mO#0f0L{r3V;Bz-2~jB`lp<(0AI*`8g))%{ntfm< zo8Rt`8MTG8xtNmzcG9$0h9H4JKoH0lkp5}}#V`yJiV%^A&mj0z9YI@ye1b}!i=f3R zo8RT7T_gd8BU-Fv4XuC~rO!(6cnyZ<feC8XD8@1*Xz?PbK!|ue;kstf6m7&`$apE5 zGSzu;#E4U5jo-%f!;wBmX1sfKqA-wABh!+$8V^p;daVLxZUlChT_)5P<_d*k#xkuI zMRkQLO`%SjEzxLHBB@lIE1Ki#35vE5Hhhljdcj3s$(3pRxP>PDCX#f|b+6P((j?_1 zy^ux|?iL1RR=5Z|8K9Pj?VVMN`(3rTz0gm3pc#K;u9s*~=W5g<tw<~p=Aw*#9fnGD zYMolFkxC0yl3Xb~%eB9x_F1mvf4K-F1_?L!Kh2)IVkRiOeLlL(;ra061T*n|X0)#j zuDAsN><+zFWeQ%jPEAi299IGv%`7(PKx2Obt`pyzmvg^n^|84H5n~C;%ad2zN3laZ zhjyE->x=2+&d)xute#vDN&<YB3Ibh4rb9dN$vwgD(TSfcp>^z`?>5QbA<Eq7rQa*} zDQ`z|W9RoIedSBw9+|rD7*HP`UbK4<i7>9V*H@)yayCx*zRWmf{qtd^yz$PssW>}N z_4-8WNor?i+oSSLoZ<F)3Dg-?DLfT_`dDo5FgxqY6R^+q@%wMHeR*8+F*ohOlH=CV zrM(W|!Ywfm5dgkrndsn0^Cw$&^baM<kFbmh$~y*4)O%55zf{ERh)Ve_E2anAeyGWW zaf_^37rKFU@|B;oa~AUQuIFdo^>1lCQJvCS(L^sQJrG%(1o}j#ZELS#^6rGL%aI8! zZsk;RXne_y?kg=l?9(w|Pnq(7cJt^PjZ!egZ|Vm^k2=Tpx)WLA>6HFj>(j}OxRB~c z9(R8{tkjWB);)Xg4_%8>x;aDtG)+jkXFwmu?O^w%pEUMwAF1z!iXN;il|%OinkJ&S zy_}=-Lz_U~QtrDfA7sqoZ0%s(6KBS?zEukizBY9BNNY{G&A#mHuWb{%(kdIJKx)Hd zWy8(-qxt={?Av86<((Pl*2jOk<|eC8uqy>>`3rpbMBQf|7+-{r@3AQxVpGqz^p>ZL z?9Bppfh*EQ<_9IfH^`7Px^b*Ix+-EAs;sFh1H>oT#S)eeHpVwZv|ly1t=iJO;AH;B z=(ut>aASX6QY!E7>r~n~xx#tT3$|ZSJ{&Rc&R;eCG_B20aNa(mU;XHhDql?T(S;*# zg2PYNeC`o+9h<%aE@wGA2OHNejW`EZht@y-@bI@q{KbihASW4ElaW031Ii=Aziz#* KM0-$OwfSEHTQK_o literal 0 HcmV?d00001 diff --git a/src/assets/map/renyuan/ico5.png b/src/assets/map/renyuan/ico5.png new file mode 100644 index 0000000000000000000000000000000000000000..ffe9c41e3d585cc7f4aa92dcacc213fe22d0b466 GIT binary patch literal 1553 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nAI{vB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxOgGuk#8koDQqR!L z*u>ION5ROz&_dt9Lf_C>*U-$$#K6kPNC66zfVLH-q*(>IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD<cE0=g99h1>#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv<o$T9gcok2GbNW?<Oiw+N&V=o%}R{N&Qy)VvZ;7h5Huh+ax&ij}d6iIJs~qnm-D zi;JP5tDB{>xuvU<sez@Vi<zULn<Y%IXI^nhVqS78Om8MauPa`?R?bDKi6!|(A^G_^ zu-FU8$S=t+&d4uNaCQd8mZgG5cxGNoetEGbD0rc+O)bhSOHFYr%Fk5*hmTbz7B@JV zJ3AS<7@3$Fm>UA!?`mmi>gwd`Wa4aL;pS*+ZlMI#n}WsfP`#!&_38s1qYsK)q{xN| z0aFl&2~WB}4m|Ov<^fZD5in`HZi!vOz`)e#>EaktaqGzR_>8_lnd9@HS00b}d09-i zIygqd>(C{$`cLUzorO=?mWl<<vM*Hh_KFNj6Zbkbb<$Fv!i9#eQ+5<8ivN3)wA)cp z>e6RByY%0CKU=)FJiovE?0UQE`{yd>f3B^oKlgsl&U1SYoJ^?wz-_jq)*!<EQ{+Ro znJwan#nmV8REp8Cc$~fS;r@By95TI!KZs@V7JII2E-&zyuPwDu?_-70nbyl2PJg;p znE0x}GOITGfOh`B3&&SIFny9JX=83v&QxQOIwQMb`2~LN2l9>cXRG&CyqWr}f}`(H z=!+(`!;jRJwU&GDlfUSCxNSqe)PA<#36?(BwIV`~`)oCS&@A>%DuRpuVO5Bpmd*Vc zdRt$pt>Es=YrVTcOzqT+Tc`IHFupsa9>LLExHb24#Le)9QA!tbe)y{9h`c*cRxvdt zShGL=6w_X(_!FlyKS(@NkMQoaZx9Vq@7wc5s`6!;WW36uf7O*4^PYqrt<#Tb>gIGk zEW0*1Xp?);gOhjiUvO66IrLm4LO1^^$NYtI+m3F%cTw)g^{9t))_i1|=b;jMuvT95 z+|R?7|Jb&-E-F3NQP+|#q+9F#wjud~?8M~kLerxh+ULJTKMPaU&|6(#_h{$o0`7AW z&$5$Si_0Ero!*hv%Kqec&h1^C-wIbH2Z~<yTiMAu$z8S1;O#>R(X7dHTiqAFEtGqg zZaFnq_i~zcYV?}Pmsk2qxl}!jvFew8lJH^a#*&o1?Mu#X+{AeDy=dlE$=1u2F(P^G zs!#9i*%b3FO>)=O9WA@+bl%MhJd}5{{07J8n00fcj2EyklX^C3QoD4(;`6St`TfqP xC0vTR_e}JT&$MXH`G06i?!3?Q-}EyuGXyN<Ei*S|I{+%AJzf1=);T3K0RT#<QE~tP literal 0 HcmV?d00001 From 9825bd63c597b38da4e14ced7c9a0819c875c3ba Mon Sep 17 00:00:00 2001 From: guoyuepeng <770272267@qq.com> Date: Mon, 29 Apr 2024 18:11:01 +0800 Subject: [PATCH 09/10] =?UTF-8?q?1.=E6=9B=B9=E7=85=A4=E7=82=AD=E7=9A=84?= =?UTF-8?q?=E5=9B=9B=E8=89=B2=E5=9B=9B=E5=9B=BA=E5=AE=9A=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=202.=E6=B2=A7=E5=B7=9E=E7=9F=BF=E7=9F=B3=E7=9A=84=E5=80=BE?= =?UTF-8?q?=E6=96=9C=E6=91=84=E5=BD=B1=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/map/index.vue | 12 + src/views/map/js/dragentity.js | 2 + src/views/map/js/mapboxCmt.js | 4481 ++++++++++++++++++++++++++++++++ 3 files changed, 4495 insertions(+) create mode 100644 src/views/map/js/mapboxCmt.js diff --git a/src/views/map/index.vue b/src/views/map/index.vue index 194373d..7ca90f6 100644 --- a/src/views/map/index.vue +++ b/src/views/map/index.vue @@ -277,6 +277,7 @@ import cloneDeep from 'lodash/cloneDeep' import fullScreenMixins from '@/assets/mixins/fullScreen' import { animate } from 'motion' import loadMapBoxCfd from './js/mapboxCfd' +import loadCmtMapBox from './js/mapboxCmt' import loadMapBoxCzks from './js/mapboxCzks' import loadMapBox from './js/mapbox' import AnquanCfd from './components/anquanCfd' @@ -870,6 +871,7 @@ export default { pointBoxCfd: [], pointBox: [], pointBoxCzks: [], + pointBoxCmt: [], fwebsocket: {}, redList: [], orangeList: [], @@ -1151,6 +1153,7 @@ export default { mounted() { this.initMap() this.pointBoxCfd = loadMapBoxCfd() + this.pointBoxCmt = loadCmtMapBox() this.pointBox = loadMapBox() this.pointBoxCzks = loadMapBoxCzks() // this.ysVideoInit() @@ -1380,6 +1383,15 @@ export default { url: '/mapapi/ware/upload/qhdgysh/merge_tile.json' }) viewer.scene.primitives.add(qhdgysh) + var czkszhmt = new Cesium.Cesium3DTileset({ //沧州矿石 杂货码头 + url: '/mapapi/ware/upload/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E8%A5%BF/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E8%A5%BF/merge_tile.json' + }) + viewer.scene.primitives.add(czkszhmt) + var czksksmt = new Cesium.Cesium3DTileset({//沧州矿石 矿石码头 + url: '/mapapi/ware/upload/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E4%B8%9C/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E4%B8%9C/merge_tile.json' + }) + viewer.scene.primitives.add(czksksmt) + }, leftDownAction() { diff --git a/src/views/map/js/dragentity.js b/src/views/map/js/dragentity.js index d245179..bf3fb49 100644 --- a/src/views/map/js/dragentity.js +++ b/src/views/map/js/dragentity.js @@ -70,10 +70,12 @@ import './PolylineTrailLinkMaterialProperty' import loadMapBox from './mapbox' import loadMapBoxCfd from './mapboxCfd' import loadMapBoxCzks from './mapboxCzks' +import loadCmtMapBox from './mapboxCmt' const polygonMap = { '00003': loadMapBox, '00002': loadMapBoxCzks, + '00005': loadCmtMapBox, '00004': loadMapBoxCfd } diff --git a/src/views/map/js/mapboxCmt.js b/src/views/map/js/mapboxCmt.js new file mode 100644 index 0000000..a67e7dc --- /dev/null +++ b/src/views/map/js/mapboxCmt.js @@ -0,0 +1,4481 @@ +export default function loadMapBox() { + return { + redList: initMapDataRed(), + orangeList: initMapDataOrange(), + yellowList: initMapDataYellow(), + blueList: initMapDataBlue(), + wallList: initWallData() + } +} + +/** + * 四色图(红) + */ +function initMapDataRed() { + const varList = [] + // 翻车机房 + let formData = {} + formData['position'] = + [ + { + 'x': 118.43668319516881, + 'y': 38.97436205004733, + 'z': 0 + }, + { + 'x': 118.43605589416767, + 'y': 38.97436354619541, + 'z': 0 + }, + { + 'x': 118.43606003974193, + 'y': 38.97380175336525, + 'z': 0 + }, + { + 'x': 118.43668763683185, + 'y': 38.973799543310356, + 'z': 0 + } + + ] + + formData['color'] = 'rgba(211,0,0,0.4)' + formData['stretchHeight'] = 20// 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // S1 + formData = {} + formData['position'] = + [ + { + 'x': 118.45401870490508, + 'y': 38.96776218152991, + 'z': 0 + }, + { + 'x': 118.45414370540294, + 'y': 38.96776270752748, + 'z': 0 + }, + { + 'x': 118.45414007687944, + 'y': 38.96878877382881, + 'z': 0 + }, + { + 'x': 118.45401164925136, + 'y': 38.968782361648046, + 'z': 0 + } + ] + formData['color'] = 'rgba(211,0,0,0.4)' + formData['stretchHeight'] = 40 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // SL1 + formData = {} + formData['position'] = + [ + { + 'x': 118.45494173070524, + 'y': 38.977582500588646, + 'z': 0 + }, + { + 'x': 118.4545701232429, + 'y': 38.97757462541758, + 'z': 0 + }, + { + 'x': 118.45457205694078, + 'y': 38.9768071676769, + 'z': 0 + }, + { + 'x': 118.4549450904821, + 'y': 38.97680357607445, + 'z': 0 + } + ] + formData['color'] = 'rgba(211,0,0,0.4)' + formData['stretchHeight'] = 55 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // SL2 + formData = {} + formData['position'] = + [ + { + 'x': 118.45494627861514, + 'y': 38.97292677905791, + 'z': 0 + }, + { + 'x': 118.45457437023232, + 'y': 38.972927779685605, + 'z': 0 + }, + { + 'x': 118.45457430485773, + 'y': 38.97223922183119, + 'z': 0 + }, + { + 'x': 118.45494601887445, + 'y': 38.97224438303145, + 'z': 0 + } + ] + formData['color'] = 'rgba(211,0,0,0.4)' + formData['stretchHeight'] = 55 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // SL3 + formData = {} + formData['position'] = + [ + { + 'x': 118.45494709388107, + 'y': 38.97084736106996, + 'z': 0 + }, + { + 'x': 118.45457476840677, + 'y': 38.970841667871085, + 'z': 0 + }, + { + 'x': 118.4545744600577, + 'y': 38.97015912929737, + 'z': 0 + }, + { + 'x': 118.454947552244, + 'y': 38.970156947129894, + 'z': 0 + } + ] + formData['color'] = 'rgba(211,0,0,0.4)' + formData['stretchHeight'] = 55 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // SL4 + formData = {} + formData['position'] = + [ + { + 'x': 118.45493415284619, + 'y': 38.96686267766106, + 'z': 0 + }, + { + 'x': 118.45457689301277, + 'y': 38.966865580333526, + 'z': 0 + }, + { + 'x': 118.45457488273861, + 'y': 38.96613432504637, + 'z': 0 + }, + { + 'x': 118.45493678325379, + 'y': 38.966139616718635, + 'z': 0 + } + ] + formData['color'] = 'rgba(211,0,0,0.4)' + formData['stretchHeight'] = 55 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // R6 + formData = {} + formData['position'] = + [ + { + 'x': 118.44983206448667, + 'y': 38.968609088366016, + 'z': 0 + }, + { + 'x': 118.44965940997488, + 'y': 38.96861315698681, + 'z': 0 + }, + { + 'x': 118.44966495596304, + 'y': 38.96782480261959, + 'z': 0 + }, + { + 'x': 118.44983111388923, + 'y': 38.96782608949472, + 'z': 0 + } + ] + formData['color'] = 'rgba(211,0,0,0.4)' + formData['stretchHeight'] = 40 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // S4 + formData = {} + formData['position'] = + [ + { + 'x': 118.44880842986889, + 'y': 38.97531746678863, + 'z': 0 + }, + { + 'x': 118.44894429283572, + 'y': 38.97531694467056, + 'z': 0 + }, + { + 'x': 118.44894194838906, + 'y': 38.97630117210993, + 'z': 0 + }, + { + 'x': 118.44880739835806, + 'y': 38.97630210702245, + 'z': 0 + } + ] + formData['color'] = 'rgba(211,0,0,0.4)' + formData['stretchHeight'] = 40 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + // R5 + formData = {} + formData['position'] = + [ + { + 'x': 118.44982511603936, + 'y': 38.97480969463574, + 'z': 0 + }, + { + 'x': 118.44965949968713, + 'y': 38.97481875275964, + 'z': 0 + }, + { + 'x': 118.44965408423367, + 'y': 38.97557539104295, + 'z': 0 + }, + { + 'x': 118.44982599924174, + 'y': 38.9755785957013, + 'z': 0 + } + ] + formData['color'] = 'rgba(211,0,0,0.4)' + formData['stretchHeight'] = 40 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + // S3 + formData = {} + formData['position'] = + [ + { + 'x': 118.4506819073016, + 'y': 38.96841333187937, + 'z': 0 + }, + { + 'x': 118.45054806358243, + 'y': 38.968414672760744, + 'z': 0 + }, + { + 'x': 118.45054736276177, + 'y': 38.967441732761436, + 'z': 0 + }, + { + 'x': 118.45068503344464, + 'y': 38.96744347491385, + 'z': 0 + } + ] + formData['color'] = 'rgba(211,0,0,0.4)' + formData['stretchHeight'] = 40 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + // R3 + formData = {} + formData['position'] = + [ + { + 'x': 118.45156360454915, + 'y': 38.96855778756091, + 'z': 0 + }, + { + 'x': 118.45139266437113, + 'y': 38.968561343144636, + 'z': 0 + }, + { + 'x': 118.45139462038668, + 'y': 38.96787824067078, + 'z': 0 + }, + { + 'x': 118.45156467445727, + 'y': 38.967881603664665, + 'z': 0 + } + ] + formData['color'] = 'rgba(211,0,0,0.4)' + formData['stretchHeight'] = 40 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // R4 + formData = {} + formData['position'] = + [ + { + 'x': 118.4515545490416, + 'y': 38.97729497318118, + 'z': 0 + }, + { + 'x': 118.45140224790165, + 'y': 38.97729009093853, + 'z': 0 + }, + { + 'x': 118.45138661382094, + 'y': 38.97652047016268, + 'z': 0 + }, + { + 'x': 118.45155339918233, + 'y': 38.97651885756536, + 'z': 0 + } + ] + formData['color'] = 'rgba(211,0,0,0.4)' + formData['stretchHeight'] = 40 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // S2 + formData = {} + formData['position'] = + [ + { + 'x': 118.45240766557431, + 'y': 38.97534575778284, + 'z': 0 + }, + { + 'x': 118.45224282896565, + 'y': 38.97534011028037, + 'z': 0 + }, + { + 'x': 118.45224035043688, + 'y': 38.97450040106855, + 'z': 0 + }, + { + 'x': 118.45241094858173, + 'y': 38.97450066850072, + 'z': 0 + } + ] + formData['color'] = 'rgba(211,0,0,0.4)' + formData['stretchHeight'] = 40 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + // R2 + formData = {} + formData['position'] = + [ + { + 'x': 118.45328782442537, + 'y': 38.97566801945691, + 'z': 0 + }, + { + 'x': 118.45311829455308, + 'y': 38.97567130998295, + 'z': 0 + }, + { + 'x': 118.45311846659096, + 'y': 38.97681579790999, + 'z': 0 + }, + { + 'x': 118.45328686230255, + 'y': 38.97681710026622, + 'z': 0 + } + ] + formData['color'] = 'rgba(211,0,0,0.4)' + formData['stretchHeight'] = 40 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // R1 + formData = {} + formData['position'] = + [ + { + 'x': 118.45329116596798, + 'y': 38.96982793670997, + 'z': 0 + }, + { + 'x': 118.45312317895143, + 'y': 38.969827380470655, + 'z': 0 + }, + { + 'x': 118.45312354372409, + 'y': 38.96912941946868, + 'z': 0 + }, + { + 'x': 118.45329217489703, + 'y': 38.96913137385099, + 'z': 0 + } + ] + formData['color'] = 'rgba(211,0,0,0.4)' + formData['stretchHeight'] = 40 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + return varList +} + +/** + * 四色图(橙) + */ +function initMapDataOrange() { + const varList = [] + + // 宿舍楼3 + let formData = {} + formData['position'] = + [ + { + 'x': 118.44213515957912, + 'y': 38.98182620076322, + 'z': 0 + }, + { + 'x': 118.44213754899599, + 'y': 38.981995327952696, + 'z': 0 + }, + { + 'x': 118.4414836256865, + 'y': 38.98199173734516, + 'z': 0 + }, + { + 'x': 118.44148436646135, + 'y': 38.981827006879826, + 'z': 0 + } + ] + formData['color'] = 'rgba(243,151,1,0.44)' + formData['stretchHeight'] = 25 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // 宿舍楼2 + formData = {} + formData['position'] = + [ + { + 'x': 118.44148609425869, + 'y': 38.98239025737818, + 'z': 0 + }, + { + 'x': 118.44148536726634, + 'y': 38.9822562453524, + 'z': 0 + }, + { + 'x': 118.4421320807601, + 'y': 38.982256708341865, + 'z': 0 + }, + { + 'x': 118.4421329492144, + 'y': 38.98239452423525, + 'z': 0 + } + ] + formData['color'] = 'rgba(243,151,1,0.44)' + formData['stretchHeight'] = 25 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // 宿舍楼1 + formData = {} + formData['position'] = + [ + { + 'x': 118.4421331812966, + 'y': 38.98265803299595, + 'z': 0 + }, + { + 'x': 118.44213426112553, + 'y': 38.982797355555796, + 'z': 0 + }, + { + 'x': 118.44148596442709, + 'y': 38.982797465588966, + 'z': 0 + }, + { + 'x': 118.44148525488498, + 'y': 38.98265429110123, + 'z': 0 + } + ] + formData['color'] = 'rgba(243,151,1,0.44)' + formData['stretchHeight'] = 25 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + return varList +} + +/** + * 四色图(黄) + */ +function initMapDataYellow() { + const varList = [] + // 6#变电所 + let formData = {} + formData['position'] = + [ + { + 'x': 118.44374546848871, + 'y': 38.982263167365176, + 'z': 0 + }, + { + 'x': 118.44374722948864, + 'y': 38.98209246368076, + 'z': 0 + }, + { + 'x': 118.44401378171396, + 'y': 38.98209257157892, + 'z': 0 + }, + { + 'x': 118.4440138349424, + 'y': 38.98226615161588, + 'z': 0 + } + ] + + formData['color'] = 'rgba(255,240,0,0.4)' + formData['stretchHeight'] = 10 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // 维修车间 + formData = {} + formData['position'] = + [ + { + 'x': 118.44597088138809, + 'y': 38.981471308427594, + 'z': 0 + }, + { + 'x': 118.4459760948946, + 'y': 38.981765817536036, + 'z': 0 + }, + { + 'x': 118.44553065474521, + 'y': 38.98176812180565, + 'z': 0 + }, + { + 'x': 118.4455307179291, + 'y': 38.98147144453055, + 'z': 0 + } + ] + formData['color'] = 'rgba(255,240,0,0.4)' + formData['stretchHeight'] = 12// 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // 3#边上的变电站 + formData = {} + formData['position'] = + [ + { + 'x': 118.45130738040707, + 'y': 38.97797099546754, + 'z': 0 + }, + { + 'x': 118.45106907549892, + 'y': 38.97796803056605, + 'z': 0 + }, + { + 'x': 118.45106610071397, + 'y': 38.97811344913565, + 'z': 0 + }, + { + 'x': 118.4513015613307, + 'y': 38.978115813757654, + 'z': 0 + } + ] + formData['color'] = 'rgba(255,240,0,0.4)' + formData['stretchHeight'] = 12// 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // 5#变电所 + formData = {} + formData['position'] = + [ + { + 'x': 118.43603395080952, + 'y': 38.97359160581587, + 'z': 0 + }, + { + 'x': 118.43580285775306, + 'y': 38.973593420472234, + 'z': 0 + }, + { + 'x': 118.43580210481892, + 'y': 38.97321857213371, + 'z': 0 + }, + { + 'x': 118.43603964470061, + 'y': 38.973215625514534, + 'z': 0 + } + ] + formData['color'] = 'rgba(255,240,0,0.4)' + formData['stretchHeight'] = 12 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // CD8电气室 + formData = {} + formData['position'] = + [ + { + 'x': 118.43587776860757, + 'y': 38.974451555934586, + 'z': 0 + }, + { + 'x': 118.43598046596607, + 'y': 38.974451152455735, + 'z': 0 + }, + { + 'x': 118.43597911073135, + 'y': 38.97490896596728, + 'z': 0 + }, + { + 'x': 118.43587633772498, + 'y': 38.974908592621226, + 'z': 0 + } + ] + formData['color'] = 'rgba(255,240,0,0.4)' + formData['stretchHeight'] = 12 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // CD9电气室 + formData = {} + formData['position'] = + [ + { + 'x': 118.43587771273357, + 'y': 38.974951837797796, + 'z': 0 + }, + { + 'x': 118.43597867001527, + 'y': 38.97495268221611, + 'z': 0 + }, + { + 'x': 118.43597829096899, + 'y': 38.97540943911833, + 'z': 0 + }, + { + 'x': 118.43587767643459, + 'y': 38.97540955803896, + 'z': 0 + } + ] + formData['color'] = 'rgba(255,240,0,0.4)' + formData['stretchHeight'] = 12 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // CD1电气室 + formData = {} + formData['position'] = + [ + { + 'x': 118.43663402110707, + 'y': 38.97495214361826, + 'z': 0 + }, + { + 'x': 118.43673385928963, + 'y': 38.97495233929888, + 'z': 0 + }, + { + 'x': 118.43673571047286, + 'y': 38.97540937785033, + 'z': 0 + }, + { + 'x': 118.43663250929741, + 'y': 38.97541094741884, + 'z': 0 + } + ] + formData['color'] = 'rgba(255,240,0,0.4)' + formData['stretchHeight'] = 12 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // 11KV变电站 + formData = {} + formData['position'] = + [ + { + 'x': 118.43983953504524, + 'y': 38.96990348322273, + 'z': 0 + }, + { + 'x': 118.44017642768476, + 'y': 38.970341175126165, + 'z': 0 + }, + { + 'x': 118.4404242732871, + 'y': 38.97022474670012, + 'z': 0 + }, + { + 'x': 118.44008446513408, + 'y': 38.96978851461851, + 'z': 0 + } + ] + formData['color'] = 'rgba(255,240,0,0.4)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // 3#变电所 + formData = {} + formData['position'] = + [ + { + 'x': 118.44972448112601, + 'y': 38.96626086875943, + 'z': 0 + }, + { + 'x': 118.44972196523011, + 'y': 38.9660968075815, + 'z': 0 + }, + { + 'x': 118.45024916284817, + 'y': 38.966094967065914, + 'z': 0 + }, + { + 'x': 118.45024776181515, + 'y': 38.966272419288124, + 'z': 0 + } + ] + formData['color'] = 'rgba(255,240,0,0.4)' + formData['stretchHeight'] = 12 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // 4#变电所 黄色 + formData = {} + formData['position'] = + [ + { + 'x': 118.45371313658056, + 'y': 38.966279590054945, + 'z': 0 + }, + { + 'x': 118.45345299394606, + 'y': 38.966279983269835, + 'z': 0 + }, + { + 'x': 118.45344964962355, + 'y': 38.96608674011788, + 'z': 0 + }, + { + 'x': 118.45370785705383, + 'y': 38.966088390858744, + 'z': 0 + } + ] + formData['color'] = 'rgba(255,240,0,0.4)' + formData['stretchHeight'] = 36 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // 堆场泵房-黄色 + formData = {} + formData['position'] = + [ + { + 'x': 118.44810850909023, + 'y': 38.978077442854755, + 'z': 0 + }, + { + 'x': 118.44810960069924, + 'y': 38.977969983662476, + 'z': 0 + }, + { + 'x': 118.44866012020086, + 'y': 38.97796743544993, + 'z': 0 + }, + { + 'x': 118.44866189211275, + 'y': 38.9780706361195, + 'z': 0 + } + ] + formData['color'] = 'rgba(255,240,0,0.4)' + formData['stretchHeight'] = 12 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // 2#变电所 + formData = {} + formData['position'] = + [ + { + 'x': 118.45047934536116, + 'y': 38.97814871513936, + 'z': 0 + }, + { + 'x': 118.45047438462865, + 'y': 38.97796566436581, + 'z': 0 + }, + { + 'x': 118.44984622498139, + 'y': 38.977969757294005, + 'z': 0 + }, + { + 'x': 118.44984508551426, + 'y': 38.97815056180021, + 'z': 0 + } + ] + formData['color'] = 'rgba(255,240,0,0.4)' + formData['stretchHeight'] = 12 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // 1#变电所 + formData = {} + formData['position'] = + [ + { + 'x': 118.45391498967159, + 'y': 38.978189080295785, + 'z': 0 + }, + { + 'x': 118.4539148433588, + 'y': 38.97796960716181, + 'z': 0 + }, + { + 'x': 118.45331652105497, + 'y': 38.97797271616076, + 'z': 0 + }, + { + 'x': 118.45331650229522, + 'y': 38.97818587367303, + 'z': 0 + } + ] + formData['color'] = 'rgba(255,240,0,0.4)' + formData['stretchHeight'] = 12 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + // 1#变电站边上的维修车间 + formData = {} + formData['position'] = + [ + { + 'x': 118.45302598288735, + 'y': 38.978068546212384, + 'z': 0 + }, + { + 'x': 118.45285014452516, + 'y': 38.9780701538756, + 'z': 0 + }, + { + 'x': 118.45284852664027, + 'y': 38.97794540907946, + 'z': 0 + }, + { + 'x': 118.45302528381559, + 'y': 38.97794544199758, + 'z': 0 + } + ] + formData['color'] = 'rgba(255,240,0,0.4)' + formData['stretchHeight'] = 18 // 拉伸高度 + formData['strokeColor'] = 'rgba(51,35,108,0.63)' // 边线颜色 + varList.push(formData) + + return varList +} + +/** + * 四色图(蓝) + */ +function initMapDataBlue() { + const varList = [] + // 食堂1 + let formData = {} + formData['position'] = + [ + { + 'x': 118.44166955429107, + 'y': 38.98182679307835, + 'z': 0 + }, + { + 'x': 118.44166863235604, + 'y': 38.98154939571505, + 'z': 0 + }, + { + 'x': 118.44148064735525, + 'y': 38.981546470312615, + 'z': 0 + }, + { + 'x': 118.44148403802664, + 'y': 38.981827026181236, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 15 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + // 食堂2 + formData = {} + formData['position'] = + [ + { + 'x': 118.44148515083845, + 'y': 38.98225626943295, + 'z': 0 + }, + { + 'x': 118.44148357227512, + 'y': 38.98199187334283, + 'z': 0 + }, + { + 'x': 118.44167252116473, + 'y': 38.98199336845894, + 'z': 0 + }, + { + 'x': 118.44167541667143, + 'y': 38.98225644697646, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 15 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 食堂3 + formData = {} + formData['position'] = + [ + { + 'x': 118.44166651238953, + 'y': 38.982655449768046, + 'z': 0 + }, + { + 'x': 118.44167147528447, + 'y': 38.98239209420949, + 'z': 0 + }, + { + 'x': 118.44148607137478, + 'y': 38.98239018762681, + 'z': 0 + }, + { + 'x': 118.44148552255483, + 'y': 38.9826543316454, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 15 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + // 生活污水处理厂 左边 + formData = {} + formData['position'] = + [ + { + 'x': 118.44374539093153, + 'y': 38.98264644237934, + 'z': 0 + }, + { + 'x': 118.44396898301656, + 'y': 38.982650595235505, + 'z': 0 + }, + { + 'x': 118.44396918798682, + 'y': 38.9827913795993, + 'z': 0 + }, + { + 'x': 118.4437391597207, + 'y': 38.982788004176925, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 10// 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 生活污水处理厂 右边 + formData = {} + formData['position'] = + [ + { + 'x': 118.44400359464382, + 'y': 38.98279581157546, + 'z': 0 + }, + { + 'x': 118.44411368603808, + 'y': 38.98279424883406, + 'z': 0 + }, + { + 'x': 118.44411330100934, + 'y': 38.9826546407027, + 'z': 0 + }, + { + 'x': 118.44400606541075, + 'y': 38.982653691147675, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 10 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 地源热泵房 + formData = {} + formData['position'] = + [ + { + 'x': 118.44416627249714, + 'y': 38.98209744567145, + 'z': 0 + }, + { + 'x': 118.44441325624598, + 'y': 38.982094737004104, + 'z': 0 + }, + { + 'x': 118.44441437407558, + 'y': 38.982240175044886, + 'z': 0 + }, + { + 'x': 118.44416266193849, + 'y': 38.982237777361654, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 10 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + // 供水池 + formData = {} + formData['position'] = + [ + { + 'x': 118.44448001797208, + 'y': 38.9827089533356, + 'z': 0 + }, + { + 'x': 118.44447271287598, + 'y': 38.98238811491803, + 'z': 0 + }, + { + 'x': 118.44517930330503, + 'y': 38.982386275904595, + 'z': 0 + }, + { + 'x': 118.44517727315545, + 'y': 38.982719400397734, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 10 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 供水调节站 + formData = {} + formData['position'] = + [ + { + 'x': 118.44460721032858, + 'y': 38.982813289265735, + 'z': 0 + }, + { + 'x': 118.44461292206482, + 'y': 38.9827125183, + 'z': 0 + }, + { + 'x': 118.44491533147163, + 'y': 38.982715857606784, + 'z': 0 + }, + { + 'x': 118.44491357455013, + 'y': 38.98281442511334, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 10 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 油品库 + formData = {} + formData['position'] = + [ + { + 'x': 118.44570732137456, + 'y': 38.982647559750326, + 'z': 0 + }, + { + 'x': 118.44594552723962, + 'y': 38.98264760434483, + 'z': 0 + }, + { + 'x': 118.44594381009605, + 'y': 38.98280508793967, + 'z': 0 + }, + { + 'x': 118.4457051688986, + 'y': 38.982805083222225, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 10 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 溢油库 + formData = {} + formData['position'] = + [ + { + 'x': 118.44602211629788, + 'y': 38.98263656754648, + 'z': 0 + }, + { + 'x': 118.44640165036542, + 'y': 38.98262850511268, + 'z': 0 + }, + { + 'x': 118.4464031626804, + 'y': 38.982794200606385, + 'z': 0 + }, + { + 'x': 118.4460153831427, + 'y': 38.98279739358728, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 10// 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 危险库 + formData = {} + formData['position'] = + [ + { + 'x': 118.44543748463214, + 'y': 38.98279290998409, + 'z': 0 + }, + { + 'x': 118.44555642593535, + 'y': 38.98279355991286, + 'z': 0 + }, + { + 'x': 118.44555423956365, + 'y': 38.98286325168242, + 'z': 0 + }, + { + 'x': 118.44543787290792, + 'y': 38.98286482033883, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 10 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + // 综合库 + formData = {} + formData['position'] = + [ + { + 'x': 118.44542858210723, + 'y': 38.98247597282814, + 'z': 0 + }, + { + 'x': 118.44542312177357, + 'y': 38.982008842185664, + 'z': 0 + }, + { + 'x': 118.4464046351389, + 'y': 38.982007453934294, + 'z': 0 + }, + { + 'x': 118.44640058908035, + 'y': 38.98248208894464, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 11 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 维修车间边上的办公楼 + formData = {} + formData['position'] = + [ + { + 'x': 118.44553005453038, + 'y': 38.98176851916028, + 'z': 0 + }, + { + 'x': 118.44542483263785, + 'y': 38.98176872945198, + 'z': 0 + }, + { + 'x': 118.44542523734445, + 'y': 38.98147317695785, + 'z': 0 + }, + { + 'x': 118.4455287940247, + 'y': 38.98147171553534, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 11 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 露天库 + formData = {} + formData['position'] = + [ + { + 'x': 118.43725690564722, + 'y': 38.97571338854602, + 'z': 0 + }, + { + 'x': 118.43693292319736, + 'y': 38.97571396244159, + 'z': 0 + }, + { + 'x': 118.43693361006838, + 'y': 38.97547256134827, + 'z': 0 + }, + { + 'x': 118.43727224633301, + 'y': 38.97547187464955, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 2 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 库房 + formData = {} + formData['position'] = + [ + { + 'x': 118.44597071387395, + 'y': 38.98147127822063, + 'z': 0 + }, + { + 'x': 118.44622899896109, + 'y': 38.981472861489635, + 'z': 0 + }, + { + 'x': 118.44622645235512, + 'y': 38.98176486113189, + 'z': 0 + }, + { + 'x': 118.44597524187401, + 'y': 38.98176558307976, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 12 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 车库 + formData = {} + formData['position'] = + [ + { + 'x': 118.44622457469589, + 'y': 38.98147198941105, + 'z': 0 + }, + { + 'x': 118.4464105399007, + 'y': 38.98147200113728, + 'z': 0 + }, + { + 'x': 118.44641107595449, + 'y': 38.98176241021534, + 'z': 0 + }, + { + 'x': 118.44622357048593, + 'y': 38.98176357238804, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 12 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + // 卸车候工楼 + formData = {} + formData['position'] = + [ + { + 'x': 118.43589886305283, + 'y': 38.975887154518276, + 'z': 0 + }, + { + 'x': 118.43577956615786, + 'y': 38.975887347165525, + 'z': 0 + }, + { + 'x': 118.43578792470264, + 'y': 38.975587956417094, + 'z': 0 + }, + { + 'x': 118.43590483933734, + 'y': 38.97559010194757, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 10 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 卸车部库房 + formData = {} + formData['position'] = + [ + { + 'x': 118.43661399260628, + 'y': 38.97571031861816, + 'z': 0 + }, + { + 'x': 118.43661608109367, + 'y': 38.97557583898876, + 'z': 0 + }, + { + 'x': 118.436931848216, + 'y': 38.97557846461047, + 'z': 0 + }, + { + 'x': 118.43693109323912, + 'y': 38.97571136787044, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 5 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // CD8翻控室 + formData = {} + formData['position'] = + [ + { + 'x': 118.436207255231, + 'y': 38.974575137267266, + 'z': 0 + }, + { + 'x': 118.43627867846855, + 'y': 38.97457545404922, + 'z': 0 + }, + { + 'x': 118.43627679376182, + 'y': 38.97478397140889, + 'z': 0 + }, + { + 'x': 118.43620726207328, + 'y': 38.974783192842345, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 12 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // CD9翻控室 + formData = {} + formData['position'] = + [ + { + 'x': 118.4364797634236, + 'y': 38.974785518768066, + 'z': 0 + }, + { + 'x': 118.43640816257248, + 'y': 38.97478569041389, + 'z': 0 + }, + { + 'x': 118.43640531813558, + 'y': 38.97457489775413, + 'z': 0 + }, + { + 'x': 118.43648428635531, + 'y': 38.97457485579656, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 12 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // CD01翻控室 + formData = {} + formData['position'] = + [ + { + 'x': 118.43666655762107, + 'y': 38.974788085512365, + 'z': 0 + }, + { + 'x': 118.43659628039673, + 'y': 38.9747879015865, + 'z': 0 + }, + { + 'x': 118.43659420996336, + 'y': 38.97457616410538, + 'z': 0 + }, + { + 'x': 118.43666721131603, + 'y': 38.974575998794165, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 12 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + // 5#边上 储水池 + formData = {} + formData['position'] = + [ + { + 'x': 118.43573570235789, + 'y': 38.97304610334609, + 'z': 0 + }, + { + 'x': 118.43574097765824, + 'y': 38.972628581691296, + 'z': 0 + }, + { + 'x': 118.43604300394288, + 'y': 38.972625308654266, + 'z': 0 + }, + { + 'x': 118.43604722478794, + 'y': 38.973062399654125, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 10 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 翻车机除尘泵房 + formData = {} + formData['position'] = + [ + { + 'x': 118.43594728842464, + 'y': 38.97252254614179, + 'z': 0 + }, + { + 'x': 118.43582639843831, + 'y': 38.97252714645671, + 'z': 0 + }, + { + 'x': 118.43583160408157, + 'y': 38.97221738876652, + 'z': 0 + }, + { + 'x': 118.4359503183164, + 'y': 38.97221816868133, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 10 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T1转接塔 + formData = {} + formData['position'] = + [ + { + 'x': 118.43615077285205, + 'y': 38.97158213984466, + 'z': 0 + }, + { + 'x': 118.43614735551863, + 'y': 38.97107583789083, + 'z': 0 + }, + { + 'x': 118.43609243843196, + 'y': 38.97107835386367, + 'z': 0 + }, + { + 'x': 118.43609359727633, + 'y': 38.97101750045944, + 'z': 0 + }, + { + 'x': 118.43628627410426, + 'y': 38.971016733179916, + 'z': 0 + }, + { + 'x': 118.43628856257945, + 'y': 38.97089331747796, + 'z': 0 + }, + { + 'x': 118.43652746257315, + 'y': 38.97089291539211, + 'z': 0 + }, + { + 'x': 118.43652730714993, + 'y': 38.97083108723389, + 'z': 0 + }, + { + 'x': 118.43672847155278, + 'y': 38.97083077947769, + 'z': 0 + }, + { + 'x': 118.43672067763958, + 'y': 38.971240418580685, + 'z': 0 + }, + { + 'x': 118.43663884936606, + 'y': 38.971244176953675, + 'z': 0 + }, + { + 'x': 118.43663051048469, + 'y': 38.971469295792474, + 'z': 0 + }, + { + 'x': 118.43635447975751, + 'y': 38.97147653105624, + 'z': 0 + }, + { + 'x': 118.43635375972812, + 'y': 38.97158304709108, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 30 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 固废库 + formData = {} + formData['position'] = + [ + { + 'x': 118.43663361727585, + 'y': 38.970768111099275, + 'z': 0 + }, + { + 'x': 118.43662578902027, + 'y': 38.970581239358886, + 'z': 0 + }, + { + 'x': 118.43687074121608, + 'y': 38.970464399704596, + 'z': 0 + }, + { + 'x': 118.43701301454189, + 'y': 38.97073867455528, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 3 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // BF1 + formData = {} + formData['position'] = + [ + { + 'x': 118.43621868753681, + 'y': 38.97241385238212, + 'z': 0 + }, + { + 'x': 118.43626774674954, + 'y': 38.97241202882116, + 'z': 0 + }, + { + 'x': 118.43627016378403, + 'y': 38.97158127880355, + 'z': 0 + }, + { + 'x': 118.43622096190337, + 'y': 38.971580259887745, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // BF2 + formData = {} + formData['position'] = + [ + { + 'x': 118.43642183221598, + 'y': 38.97241442974346, + 'z': 0 + }, + { + 'x': 118.43647077209735, + 'y': 38.97241263464797, + 'z': 0 + }, + { + 'x': 118.43646371241213, + 'y': 38.9714720292113, + 'z': 0 + }, + { + 'x': 118.4364208642533, + 'y': 38.9714718250374, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // BF3 + formData = {} + formData['position'] = + [ + { + 'x': 118.43648627325226, + 'y': 38.97241446516718, + 'z': 0 + }, + { + 'x': 118.43653537871452, + 'y': 38.97241265171473, + 'z': 0 + }, + { + 'x': 118.43653494287754, + 'y': 38.97147185319605, + 'z': 0 + }, + { + 'x': 118.43648155841218, + 'y': 38.97147182617507, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 卸车采样塔 + formData = {} + formData['position'] = + [ + { + 'x': 118.43941970841215, + 'y': 38.96953144726191, + 'z': 0 + }, + { + 'x': 118.4396130412136, + 'y': 38.969445150141375, + 'z': 0 + }, + { + 'x': 118.43977277502115, + 'y': 38.96964049510435, + 'z': 0 + }, + { + 'x': 118.43956859026538, + 'y': 38.96973724589601, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 卸车采样塔 BH1 + formData = {} + formData['position'] = + [ + { + 'x': 118.43669897243508, + 'y': 38.97084797734767, + 'z': 0 + }, + { + 'x': 118.43672127872549, + 'y': 38.97087326124729, + 'z': 0 + }, + { + 'x': 118.43946175544967, + 'y': 38.96958713518793, + 'z': 0 + }, + { + 'x': 118.43943399775637, + 'y': 38.96955111545324, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 卸车采样塔 BH2 + formData = {} + formData['position'] = + [ + { + 'x': 118.4367134203435, + 'y': 38.97089529073047, + 'z': 0 + }, + { + 'x': 118.43673489314527, + 'y': 38.97092489513455, + 'z': 0 + }, + { + 'x': 118.43948422832193, + 'y': 38.969620274280864, + 'z': 0 + }, + { + 'x': 118.4394658543905, + 'y': 38.96959510043603, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 卸车采样塔 BH3 + formData = {} + formData['position'] = + [ + { + 'x': 118.4367204283016, + 'y': 38.970938609282484, + 'z': 0 + }, + { + 'x': 118.43673229209608, + 'y': 38.970973249613785, + 'z': 0 + }, + { + 'x': 118.43951126677209, + 'y': 38.96965772629055, + 'z': 0 + }, + { + 'x': 118.43949146647734, + 'y': 38.969630742899554, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 堆场全景 + formData = {} + formData['position'] = + [ + { + 'x': 118.44705712472711, + 'y': 38.97761228389707, + 'z': 0 + }, + { + 'x': 118.45413365879368, + 'y': 38.97761316915661, + 'z': 0 + }, + { + 'x': 118.45414235465658, + 'y': 38.96633330452699, + 'z': 0 + }, + { + 'x': 118.44706301363834, + 'y': 38.96634939068105, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 18 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // BD1 + formData = {} + formData['position'] = + [ + { + 'x': 118.45405006693586, + 'y': 38.97761313932549, + 'z': 0 + }, + { + 'x': 118.45409203768205, + 'y': 38.97761313806462, + 'z': 0 + }, + { + 'x': 118.4540853070961, + 'y': 38.97804827240476, + 'z': 0 + }, + { + 'x': 118.45404548855065, + 'y': 38.97804895443955, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 4#变电所 蓝色 + formData = {} + formData['position'] = + [ + { + 'x': 118.45345323194279, + 'y': 38.96628004192987, + 'z': 0 + }, + { + 'x': 118.45311158580982, + 'y': 38.96627678279534, + 'z': 0 + }, + { + 'x': 118.4531093233491, + 'y': 38.96608970343862, + 'z': 0 + }, + { + 'x': 118.45345033520366, + 'y': 38.96608683047884, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 36 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 堆场泵房 蓝色 + formData = {} + formData['position'] = + [ + { + 'x': 118.44866142267031, + 'y': 38.97807291066897, + 'z': 0 + }, + { + 'x': 118.44866222306987, + 'y': 38.97815768492403, + 'z': 0 + }, + { + 'x': 118.44811067895728, + 'y': 38.978156567998994, + 'z': 0 + }, + { + 'x': 118.44810870196935, + 'y': 38.97807716187736, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 12 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + // T7转接塔 + formData = {} + formData['position'] = + [ + { + 'x': 118.45401166002068, + 'y': 38.96619901801844, + 'z': 0 + }, + { + 'x': 118.45413848289246, + 'y': 38.966199150508096, + 'z': 0 + }, + { + 'x': 118.45413933889361, + 'y': 38.96593177793553, + 'z': 0 + }, + { + 'x': 118.4540145436718, + 'y': 38.96592916695885, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T7连接线-1 + formData = {} + formData['position'] = + [ + { + 'x': 118.45401965571455, + 'y': 38.966053042241604, + 'z': 0 + }, + { + 'x': 118.45402032237558, + 'y': 38.96602783718346, + 'z': 0 + }, + { + 'x': 118.45255429154334, + 'y': 38.96601966316516, + 'z': 0 + }, + { + 'x': 118.45255308571595, + 'y': 38.96605184360487, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T7连接线-2 + formData = {} + formData['position'] = + [ + { + 'x': 118.4540135617269, + 'y': 38.96601740749464, + 'z': 0 + }, + { + 'x': 118.45401387540862, + 'y': 38.965986479752054, + 'z': 0 + }, + { + 'x': 118.45255369780556, + 'y': 38.965984668237965, + 'z': 0 + }, + { + 'x': 118.45255466661101, + 'y': 38.966017915316826, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T2转接塔 + formData = {} + formData['position'] = + [ + { + 'x': 118.44700602271118, + 'y': 38.9658964198577, + 'z': 0 + }, + { + 'x': 118.44738596901692, + 'y': 38.96589457740237, + 'z': 0 + }, + { + 'x': 118.44738135404893, + 'y': 38.966138714841804, + 'z': 0 + }, + { + 'x': 118.44699572734432, + 'y': 38.96613444813284, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T3转接塔 + formData = {} + formData['position'] = + [ + { + 'x': 118.44776962256195, + 'y': 38.965889370453574, + 'z': 0 + }, + { + 'x': 118.44809326264372, + 'y': 38.965889616570855, + 'z': 0 + }, + { + 'x': 118.44808780176668, + 'y': 38.96607316455951, + 'z': 0 + }, + { + 'x': 118.44794655215271, + 'y': 38.96607455491782, + 'z': 0 + }, + { + 'x': 118.44794146635401, + 'y': 38.96619641771001, + 'z': 0 + }, + { + 'x': 118.44776079113596, + 'y': 38.966194333858375, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T4转接塔 + formData = {} + formData['position'] = + [ + { + 'x': 118.44876146302641, + 'y': 38.965889546444586, + 'z': 0 + }, + { + 'x': 118.44909416244944, + 'y': 38.96588648743246, + 'z': 0 + }, + { + 'x': 118.44908860169758, + 'y': 38.96607601169582, + 'z': 0 + }, + { + 'x': 118.4489379722628, + 'y': 38.96607831631868, + 'z': 0 + }, + { + 'x': 118.44894116226713, + 'y': 38.966190866705055, + 'z': 0 + }, + { + 'x': 118.44875876429231, + 'y': 38.96619357731034, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T5转接塔 + formData = {} + formData['position'] = + [ + { + 'x': 118.45048975512684, + 'y': 38.96620089867923, + 'z': 0 + }, + { + 'x': 118.45048875084328, + 'y': 38.965847355249124, + 'z': 0 + }, + { + 'x': 118.45082290965152, + 'y': 38.96584963681194, + 'z': 0 + }, + { + 'x': 118.45083010261206, + 'y': 38.96607997936651, + 'z': 0 + }, + { + 'x': 118.45066855232696, + 'y': 38.966077577650495, + 'z': 0 + }, + { + 'x': 118.4506664625876, + 'y': 38.96619599566666, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T6转接塔 + formData = {} + formData['position'] = + [ + { + 'x': 118.45220758815368, + 'y': 38.96620105730172, + 'z': 0 + }, + { + 'x': 118.45221659340145, + 'y': 38.965870900750225, + 'z': 0 + }, + { + 'x': 118.45256352811573, + 'y': 38.96587061377404, + 'z': 0 + }, + { + 'x': 118.45256382683272, + 'y': 38.966082113167516, + 'z': 0 + }, + { + 'x': 118.45240729151034, + 'y': 38.96609180490225, + 'z': 0 + }, + { + 'x': 118.45241317153624, + 'y': 38.96620018575734, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T8转接塔 + formData = {} + formData['position'] = + [ + { + 'x': 118.44806863789408, + 'y': 38.97864988082857, + 'z': 0 + }, + { + 'x': 118.44783846500337, + 'y': 38.97864623525783, + 'z': 0 + }, + { + 'x': 118.44784044614049, + 'y': 38.97815433927587, + 'z': 0 + }, + { + 'x': 118.44797821472679, + 'y': 38.978156760016965, + 'z': 0 + }, + { + 'x': 118.44798183842993, + 'y': 38.97837572111025, + 'z': 0 + }, + { + 'x': 118.44807544334861, + 'y': 38.97837591529884, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T9转接塔 + formData = {} + formData['position'] = + [ + { + 'x': 118.44991614971256, + 'y': 38.97864352371008, + 'z': 0 + }, + { + 'x': 118.44964677600133, + 'y': 38.97863823373865, + 'z': 0 + }, + { + 'x': 118.44964596437266, + 'y': 38.97816183098262, + 'z': 0 + }, + { + 'x': 118.44984664127546, + 'y': 38.978161851110755, + 'z': 0 + }, + { + 'x': 118.4498482596399, + 'y': 38.97828599108857, + 'z': 0 + }, + { + 'x': 118.44992135976518, + 'y': 38.978298298430666, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T10转接塔 + formData = {} + formData['position'] = + [ + { + 'x': 118.45165402387089, + 'y': 38.97864303903659, + 'z': 0 + }, + { + 'x': 118.4513667415022, + 'y': 38.97864258243187, + 'z': 0 + }, + { + 'x': 118.45137346203241, + 'y': 38.978157614895615, + 'z': 0 + }, + { + 'x': 118.45157722926727, + 'y': 38.978163134366596, + 'z': 0 + }, + { + 'x': 118.45157923227242, + 'y': 38.97829241935612, + 'z': 0 + }, + { + 'x': 118.45164825451741, + 'y': 38.978304443731474, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 11转接塔 + formData = {} + formData['position'] = + [ + { + 'x': 118.45338192039759, + 'y': 38.978640066624834, + 'z': 0 + }, + { + 'x': 118.45310886225376, + 'y': 38.978642697900334, + 'z': 0 + }, + { + 'x': 118.45311183520704, + 'y': 38.978152489577056, + 'z': 0 + }, + { + 'x': 118.45329918075275, + 'y': 38.97815603366372, + 'z': 0 + }, + { + 'x': 118.45330041414067, + 'y': 38.97828838467808, + 'z': 0 + }, + { + 'x': 118.45338054329211, + 'y': 38.978296668305774, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 卸车采样到T2管道BH1 + formData = {} + formData['position'] = + [ + { + 'x': 118.44701208320626, + 'y': 38.96610474692541, + 'z': 0 + }, + { + 'x': 118.44699835547762, + 'y': 38.966073132991106, + 'z': 0 + }, + { + 'x': 118.43968975749961, + 'y': 38.9695368020723, + 'z': 0 + }, + { + 'x': 118.4397049633356, + 'y': 38.969562262612705, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 卸车采样到T2管道BH2 + formData = {} + formData['position'] = + [ + { + 'x': 118.44702177538612, + 'y': 38.966050830673886, + 'z': 0 + }, + { + 'x': 118.44700096273681, + 'y': 38.96602504287901, + 'z': 0 + }, + { + 'x': 118.43966154402057, + 'y': 38.969504417377564, + 'z': 0 + }, + { + 'x': 118.43968499186334, + 'y': 38.96953310003377, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 卸车采样到T2管道BH3 + formData = {} + formData['position'] = + [ + { + 'x': 118.44701596710544, + 'y': 38.96601499737981, + 'z': 0 + }, + { + 'x': 118.446998509874, + 'y': 38.96598779888063, + 'z': 0 + }, + { + 'x': 118.43963705969952, + 'y': 38.96947477495856, + 'z': 0 + }, + { + 'x': 118.43966039497597, + 'y': 38.96950311601454, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T2到T3转接塔管道BH1 + formData = {} + formData['position'] = + [ + { + 'x': 118.44776383455572, + 'y': 38.96604953087853, + 'z': 0 + }, + { + 'x': 118.44776575028665, + 'y': 38.966020405484656, + 'z': 0 + }, + { + 'x': 118.44738002896634, + 'y': 38.96602047040314, + 'z': 0 + }, + { + 'x': 118.44737911539887, + 'y': 38.96604975373439, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T2到T3转接塔管道BH2 + formData = {} + formData['position'] = + [ + { + 'x': 118.44776726642978, + 'y': 38.96601153133374, + 'z': 0 + }, + { + 'x': 118.44776686748042, + 'y': 38.965982864593975, + 'z': 0 + }, + { + 'x': 118.44737093558155, + 'y': 38.9659806906131, + 'z': 0 + }, + { + 'x': 118.44736900037059, + 'y': 38.966012502277025, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T2到T3转接塔管道BH3 + formData = {} + formData['position'] = + [ + { + 'x': 118.44776795176807, + 'y': 38.965977574855536, + 'z': 0 + }, + { + 'x': 118.44776869354826, + 'y': 38.965946011701824, + 'z': 0 + }, + { + 'x': 118.4473757742699, + 'y': 38.96594661887615, + 'z': 0 + }, + { + 'x': 118.44737633225658, + 'y': 38.96598060055609, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T3到T4转接塔管道BH1 + formData = {} + formData['position'] = + [ + { + 'x': 118.44876157623791, + 'y': 38.966051584504754, + 'z': 0 + }, + { + 'x': 118.44876024749608, + 'y': 38.966025065104134, + 'z': 0 + }, + { + 'x': 118.4480888835252, + 'y': 38.966016307450346, + 'z': 0 + }, + { + 'x': 118.4480884421606, + 'y': 38.966049451652864, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T3到T4转接塔管道BH2 + formData = {} + formData['position'] = + [ + { + 'x': 118.44876597374879, + 'y': 38.96601638753426, + 'z': 0 + }, + { + 'x': 118.44876813688957, + 'y': 38.9659842926509, + 'z': 0 + }, + { + 'x': 118.4480838618814, + 'y': 38.96598328834097, + 'z': 0 + }, + { + 'x': 118.44808375191263, + 'y': 38.966016243345535, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T3到T4转接塔管道BH3 + formData = {} + formData['position'] = + [ + { + 'x': 118.44876192534866, + 'y': 38.965973003223056, + 'z': 0 + }, + { + 'x': 118.44876353520759, + 'y': 38.96595194500588, + 'z': 0 + }, + { + 'x': 118.44807081708512, + 'y': 38.965954172036426, + 'z': 0 + }, + { + 'x': 118.44807462577427, + 'y': 38.965973703959584, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T4到T5转接塔管道BH1 + formData = {} + formData['position'] = + [ + { + 'x': 118.4504893682069, + 'y': 38.96605191646457, + 'z': 0 + }, + { + 'x': 118.45048920073471, + 'y': 38.96602070375045, + 'z': 0 + }, + { + 'x': 118.44909020127669, + 'y': 38.966020218614325, + 'z': 0 + }, + { + 'x': 118.44908948031846, + 'y': 38.96605047183339, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T4到T5转接塔管道BH2 + formData = {} + formData['position'] = + [ + { + 'x': 118.45048918578809, + 'y': 38.96601208729804, + 'z': 0 + }, + { + 'x': 118.45048911023251, + 'y': 38.9659866773233, + 'z': 0 + }, + { + 'x': 118.44908992611772, + 'y': 38.96598432341923, + 'z': 0 + }, + { + 'x': 118.44908957704946, + 'y': 38.96601423752728, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T4到T5转接塔管道BH3 + formData = {} + formData['position'] = + [ + { + 'x': 118.44909151857476, + 'y': 38.965976617768405, + 'z': 0 + }, + { + 'x': 118.4490922995692, + 'y': 38.96594826611271, + 'z': 0 + }, + { + 'x': 118.45048930835804, + 'y': 38.96594785599655, + 'z': 0 + }, + { + 'x': 118.45048919722822, + 'y': 38.965980144049134, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T5到T6转接塔管道BH1 + formData = {} + formData['position'] = + [ + { + 'x': 118.452211662001, + 'y': 38.96605114438069, + 'z': 0 + }, + { + 'x': 118.45221656109541, + 'y': 38.96602102554313, + 'z': 0 + }, + { + 'x': 118.45082276785232, + 'y': 38.966020944838434, + 'z': 0 + }, + { + 'x': 118.45082454546983, + 'y': 38.96605194627813, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T5到T6转接塔管道BH2 + formData = {} + formData['position'] = + [ + { + 'x': 118.45082706743769, + 'y': 38.96601719377588, + 'z': 0 + }, + { + 'x': 118.45082704020865, + 'y': 38.96598320087714, + 'z': 0 + }, + { + 'x': 118.45221341231034, + 'y': 38.965985919481724, + 'z': 0 + }, + { + 'x': 118.45221472284447, + 'y': 38.96601655546338, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T5到T6转接塔管道BH3 + formData = {} + formData['position'] = + [ + { + 'x': 118.45221370603228, + 'y': 38.96597675277101, + 'z': 0 + }, + { + 'x': 118.45221439797743, + 'y': 38.96595123225914, + 'z': 0 + }, + { + 'x': 118.45082312967799, + 'y': 38.965948018746076, + 'z': 0 + }, + { + 'x': 118.45082558552178, + 'y': 38.96597997542543, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T8到T9转接塔管道BH1 + formData = {} + formData['position'] = + [ + { + 'x': 118.44964664324172, + 'y': 38.978551077390655, + 'z': 0 + }, + { + 'x': 118.44964651584748, + 'y': 38.9785215787105, + 'z': 0 + }, + { + 'x': 118.44806120577788, + 'y': 38.97852110703929, + 'z': 0 + }, + { + 'x': 118.44806642499344, + 'y': 38.978551899642945, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T8到T9转接塔管道BH2 + formData = {} + formData['position'] = + [ + { + 'x': 118.4480718906012, + 'y': 38.97851554294562, + 'z': 0 + }, + { + 'x': 118.44807278405438, + 'y': 38.97848008423598, + 'z': 0 + }, + { + 'x': 118.44964642753223, + 'y': 38.97848396773047, + 'z': 0 + }, + { + 'x': 118.44964646937261, + 'y': 38.97851892698115, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T8到T9转接塔管道BH3 + formData = {} + formData['position'] = + [ + { + 'x': 118.44964643903913, + 'y': 38.97848188548225, + 'z': 0 + }, + { + 'x': 118.44964639790682, + 'y': 38.978448507628094, + 'z': 0 + }, + { + 'x': 118.44807282610674, + 'y': 38.97844586196081, + 'z': 0 + }, + { + 'x': 118.4480726905507, + 'y': 38.978479913452894, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T8到T9转接塔管道BH4 + formData = {} + formData['position'] = + [ + { + 'x': 118.44807361709839, + 'y': 38.97844373528499, + 'z': 0 + }, + { + 'x': 118.4480741195, + 'y': 38.978412078777396, + 'z': 0 + }, + { + 'x': 118.44964634892007, + 'y': 38.97841359870016, + 'z': 0 + }, + { + 'x': 118.44964639576358, + 'y': 38.978445947327415, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T9到T10转接塔管道BH1 + formData = {} + formData['position'] = + [ + { + 'x': 118.45136853739767, + 'y': 38.97855180794119, + 'z': 0 + }, + { + 'x': 118.45136835068661, + 'y': 38.97852486019318, + 'z': 0 + }, + { + 'x': 118.44991707998608, + 'y': 38.97852146569496, + 'z': 0 + }, + { + 'x': 118.44991647502427, + 'y': 38.978553194266176, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T9到T10转接塔管道BH2 + formData = {} + formData['position'] = + [ + { + 'x': 118.44991722000987, + 'y': 38.978517358129125, + 'z': 0 + }, + { + 'x': 118.44991852162872, + 'y': 38.97847969197024, + 'z': 0 + }, + { + 'x': 118.45136887200074, + 'y': 38.97848603241828, + 'z': 0 + }, + { + 'x': 118.45136840092681, + 'y': 38.97852103162728, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T9到T10转接塔管道BH3 + formData = {} + formData['position'] = + [ + { + 'x': 118.4513689443606, + 'y': 38.97848079841223, + 'z': 0 + }, + { + 'x': 118.45136936976213, + 'y': 38.978449499432465, + 'z': 0 + }, + { + 'x': 118.44991868950578, + 'y': 38.97844952294711, + 'z': 0 + }, + { + 'x': 118.44991855998951, + 'y': 38.97847951847576, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T9到T10转接塔管道BH4 + formData = {} + formData['position'] = + [ + { + 'x': 118.44991912788241, + 'y': 38.97844322139978, + 'z': 0 + }, + { + 'x': 118.44991955519663, + 'y': 38.97841315601602, + 'z': 0 + }, + { + 'x': 118.45136985064698, + 'y': 38.978414271771854, + 'z': 0 + }, + { + 'x': 118.45136940373483, + 'y': 38.97844788674043, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T10到T11转接塔管道BH1 + formData = {} + formData['position'] = + [ + { + 'x': 118.45311020209493, + 'y': 38.97855308045481, + 'z': 0 + }, + { + 'x': 118.45310951656143, + 'y': 38.97852317271364, + 'z': 0 + }, + { + 'x': 118.45164902146038, + 'y': 38.978522937897594, + 'z': 0 + }, + { + 'x': 118.45164932015386, + 'y': 38.978554561264, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T10到T11转接塔管道BH2 + formData = {} + formData['position'] = + [ + { + 'x': 118.45165144448588, + 'y': 38.97851781124157, + 'z': 0 + }, + { + 'x': 118.45164997116002, + 'y': 38.97848344008562, + 'z': 0 + }, + { + 'x': 118.45310994306267, + 'y': 38.97848702898752, + 'z': 0 + }, + { + 'x': 118.45310963773522, + 'y': 38.97851630241646, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T10到T11转接塔管道BH3 + formData = {} + formData['position'] = + [ + { + 'x': 118.45311018942492, + 'y': 38.978485069011064, + 'z': 0 + }, + { + 'x': 118.45311006587356, + 'y': 38.97844897976183, + 'z': 0 + }, + { + 'x': 118.4516504926968, + 'y': 38.97845219090819, + 'z': 0 + }, + { + 'x': 118.45165059000787, + 'y': 38.978480355148626, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T10到T11转接塔管道BH4 + formData = {} + formData['position'] = + [ + { + 'x': 118.45165040758363, + 'y': 38.97844472253516, + 'z': 0 + }, + { + 'x': 118.45164970958429, + 'y': 38.97841112166006, + 'z': 0 + }, + { + 'x': 118.45311041163265, + 'y': 38.97841482649097, + 'z': 0 + }, + { + 'x': 118.45311002997599, + 'y': 38.97844937500469, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T11-T8短管段-1 + formData = {} + formData['position'] = + [ + { + 'x': 118.45324601340354, + 'y': 38.977615878028715, + 'z': 0 + }, + { + 'x': 118.45320406739434, + 'y': 38.977616094841416, + 'z': 0 + }, + { + 'x': 118.45320369149404, + 'y': 38.97815488601482, + 'z': 0 + }, + { + 'x': 118.45324296133914, + 'y': 38.978155118631335, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T11-T8短管段-2 + formData = {} + formData['position'] = + [ + { + 'x': 118.45319993237835, + 'y': 38.97815455048977, + 'z': 0 + }, + { + 'x': 118.45315702465696, + 'y': 38.978153674531875, + 'z': 0 + }, + { + 'x': 118.45315827386564, + 'y': 38.97761567935095, + 'z': 0 + }, + { + 'x': 118.45320200955113, + 'y': 38.97761521126994, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T11-T8短管段-3 + formData = {} + formData['position'] = + [ + { + 'x': 118.45235432652262, + 'y': 38.97804641494594, + 'z': 0 + }, + { + 'x': 118.45231473966498, + 'y': 38.97804714070174, + 'z': 0 + }, + { + 'x': 118.45232211677381, + 'y': 38.97761555605033, + 'z': 0 + }, + { + 'x': 118.45236479829853, + 'y': 38.97761555075982, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T11-T8短管段-4 + formData = {} + formData['position'] = + [ + { + 'x': 118.45151156940642, + 'y': 38.977615128930914, + 'z': 0 + }, + { + 'x': 118.45147716366819, + 'y': 38.97761512882793, + 'z': 0 + }, + { + 'x': 118.45148095521435, + 'y': 38.978160569332466, + 'z': 0 + }, + { + 'x': 118.45151851387625, + 'y': 38.978161610922754, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T11-T8短管段-5 + formData = {} + formData['position'] = + [ + { + 'x': 118.45146506829845, + 'y': 38.97761512873593, + 'z': 0 + }, + { + 'x': 118.45142749417228, + 'y': 38.9776152020285, + 'z': 0 + }, + { + 'x': 118.4514270070005, + 'y': 38.97816164719619, + 'z': 0 + }, + { + 'x': 118.4514702467271, + 'y': 38.978161269651494, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T11-T8短管段-6 + formData = {} + formData['position'] = + [ + { + 'x': 118.4506375054877, + 'y': 38.97761028138528, + 'z': 0 + }, + { + 'x': 118.45058217577198, + 'y': 38.977610672368925, + 'z': 0 + }, + { + 'x': 118.45058565025582, + 'y': 38.97804526617509, + 'z': 0 + }, + { + 'x': 118.45062499915328, + 'y': 38.97804502178297, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T11-T8短管段-7 + formData = {} + formData['position'] = + [ + { + 'x': 118.44978611809402, + 'y': 38.97816189633577, + 'z': 0 + }, + { + 'x': 118.4497427132221, + 'y': 38.97816188913714, + 'z': 0 + }, + { + 'x': 118.44974248123884, + 'y': 38.97761421223596, + 'z': 0 + }, + { + 'x': 118.44978700009024, + 'y': 38.977614633491186, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T11-T8短管段-8 + formData = {} + formData['position'] = + [ + { + 'x': 118.44973594697677, + 'y': 38.97761458663673, + 'z': 0 + }, + { + 'x': 118.44969908776174, + 'y': 38.977614592520865, + 'z': 0 + }, + { + 'x': 118.44969660563713, + 'y': 38.97816205796606, + 'z': 0 + }, + { + 'x': 118.44973853179937, + 'y': 38.97816188528078, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T11-T8短管段-9 + formData = {} + formData['position'] = + [ + { + 'x': 118.44889729316841, + 'y': 38.97761418046365, + 'z': 0 + }, + { + 'x': 118.44886538143011, + 'y': 38.97761425828673, + 'z': 0 + }, + { + 'x': 118.44885567255632, + 'y': 38.97804497899378, + 'z': 0 + }, + { + 'x': 118.4488924279876, + 'y': 38.978043934302924, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T11-T8短管段-10 + formData = {} + formData['position'] = + [ + { + 'x': 118.44792303448537, + 'y': 38.97761287565204, + 'z': 0 + }, + { + 'x': 118.44788224541423, + 'y': 38.97761392206918, + 'z': 0 + }, + { + 'x': 118.44788369758601, + 'y': 38.97816011973279, + 'z': 0 + }, + { + 'x': 118.44792625565421, + 'y': 38.978159392145955, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T11-T8短管段-11 + formData = {} + formData['position'] = + [ + { + 'x': 118.44788153237583, + 'y': 38.9776132135235, + 'z': 0 + }, + { + 'x': 118.44783228427329, + 'y': 38.97761385341534, + 'z': 0 + }, + { + 'x': 118.44783510598519, + 'y': 38.97804837165928, + 'z': 0 + }, + { + 'x': 118.44787932204663, + 'y': 38.97804765835996, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T8附近储水池 + formData = {} + formData['position'] = + [ + { + 'x': 118.44718539416431, + 'y': 38.97787109723385, + 'z': 0 + }, + { + 'x': 118.44772118407043, + 'y': 38.97787685823234, + 'z': 0 + }, + { + 'x': 118.447726168146, + 'y': 38.97831864166656, + 'z': 0 + }, + { + 'x': 118.44717936435796, + 'y': 38.9783107109159, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 10 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T9附近储水池 + formData = {} + formData['position'] = + [ + { + 'x': 118.44901417497135, + 'y': 38.97788056190253, + 'z': 0 + }, + { + 'x': 118.44955086028163, + 'y': 38.977880940308424, + 'z': 0 + }, + { + 'x': 118.44955607941819, + 'y': 38.97831736975902, + 'z': 0 + }, + { + 'x': 118.44899730127072, + 'y': 38.978318297067126, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 10 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 煤污水处理厂 + formData = {} + formData['position'] = + [ + { + 'x': 118.45159430546872, + 'y': 38.97770411789006, + 'z': 0 + }, + { + 'x': 118.45207671872681, + 'y': 38.977705882668374, + 'z': 0 + }, + { + 'x': 118.45207567638042, + 'y': 38.97822498352003, + 'z': 0 + }, + { + 'x': 118.45159249676811, + 'y': 38.978223435519695, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 10 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T12转接塔 + formData = {} + formData['position'] = + [ + { + 'x': 118.45454494878516, + 'y': 38.978666073431974, + 'z': 0 + }, + { + 'x': 118.45454877334411, + 'y': 38.97827340973365, + 'z': 0 + }, + { + 'x': 118.45489257612584, + 'y': 38.97827901148382, + 'z': 0 + }, + { + 'x': 118.45489319459523, + 'y': 38.978663813698375, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 装船后工楼 + formData = {} + formData['position'] = + [ + { + 'x': 118.45285029681932, + 'y': 38.97807034908604, + 'z': 0 + }, + { + 'x': 118.45268955193532, + 'y': 38.978071568533736, + 'z': 0 + }, + { + 'x': 118.45269180054687, + 'y': 38.9782739801774, + 'z': 0 + }, + { + 'x': 118.45249654166457, + 'y': 38.97827499657158, + 'z': 0 + }, + { + 'x': 118.45249795536014, + 'y': 38.977940416956194, + 'z': 0 + }, + { + 'x': 118.45284869443816, + 'y': 38.977945790088086, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T12转接塔到装船采样台-1 + formData = {} + formData['position'] = + [ + { + 'x': 118.45456194916457, + 'y': 38.97852486231768, + 'z': 0 + }, + { + 'x': 118.45456139301362, + 'y': 38.97855461125936, + 'z': 0 + }, + { + 'x': 118.45338123981628, + 'y': 38.97855303018287, + 'z': 0 + }, + { + 'x': 118.45337856948838, + 'y': 38.978525195459554, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T12转接塔到装船采样台-2 + formData = {} + formData['position'] = + [ + { + 'x': 118.4545643074465, + 'y': 38.97851906021003, + 'z': 0 + }, + { + 'x': 118.45456541296737, + 'y': 38.97848787474575, + 'z': 0 + }, + { + 'x': 118.45337936898707, + 'y': 38.97848802566523, + 'z': 0 + }, + { + 'x': 118.4533801196405, + 'y': 38.9785179938507, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T12转接塔到装船采样台-3 + formData = {} + formData['position'] = + [ + { + 'x': 118.45456182174084, + 'y': 38.97848411323434, + 'z': 0 + }, + { + 'x': 118.45456162870875, + 'y': 38.97844881731705, + 'z': 0 + }, + { + 'x': 118.45337813999991, + 'y': 38.97845262501637, + 'z': 0 + }, + { + 'x': 118.45337993125752, + 'y': 38.97848343235468, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // T12转接塔到装船采样台-4 + formData = {} + formData['position'] = + [ + { + 'x': 118.45454491088014, + 'y': 38.97867240857839, + 'z': 0 + }, + { + 'x': 118.45454877334411, + 'y': 38.97827340973365, + 'z': 0 + }, + { + 'x': 118.45489257612584, + 'y': 38.97827901148382, + 'z': 0 + }, + { + 'x': 118.45489319459523, + 'y': 38.978663813698375, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + // T12转接塔到装船采样台-1 + formData = {} + formData['position'] = + [ + { + 'x': 118.45455801781031, + 'y': 38.978449817523725, + 'z': 0 + }, + { + 'x': 118.45455852230542, + 'y': 38.97841464262465, + 'z': 0 + }, + { + 'x': 118.45337817618062, + 'y': 38.97841160787686, + 'z': 0 + }, + { + 'x': 118.45337660197517, + 'y': 38.978446837055394, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // 预留线 + formData = {} + formData['position'] = + [ + { + 'x': 118.45459022154395, + 'y': 38.978273967169365, + 'z': 0 + }, + { + 'x': 118.45463485686226, + 'y': 38.978274722081906, + 'z': 0 + }, + { + 'x': 118.45465326928796, + 'y': 38.96574152169437, + 'z': 0 + }, + { + 'x': 118.45460806071517, + 'y': 38.96574070697139, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // BM4 + formData = {} + formData['position'] = + [ + { + 'x': 118.45464418430508, + 'y': 38.97827490267765, + 'z': 0 + }, + { + 'x': 118.45469102218843, + 'y': 38.97827565384618, + 'z': 0 + }, + { + 'x': 118.45469906847784, + 'y': 38.965740024597935, + 'z': 0 + }, + { + 'x': 118.45465582441282, + 'y': 38.96574167253614, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // BM3 + formData = {} + formData['position'] = + [ + { + 'x': 118.45469202079246, + 'y': 38.97827564329269, + 'z': 0 + }, + { + 'x': 118.45473570769691, + 'y': 38.97827635067656, + 'z': 0 + }, + { + 'x': 118.45474505144328, + 'y': 38.966146625822624, + 'z': 0 + }, + { + 'x': 118.45470301868865, + 'y': 38.96614697235462, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // BM2 + formData = {} + formData['position'] = + [ + { + 'x': 118.45473983501886, + 'y': 38.97827644802289, + 'z': 0 + }, + { + 'x': 118.45477972162033, + 'y': 38.97826988854391, + 'z': 0 + }, + { + 'x': 118.45478746433517, + 'y': 38.96841487318176, + 'z': 0 + }, + { + 'x': 118.45474718382881, + 'y': 38.968411932662455, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + // BM1 + formData = {} + formData['position'] = + [ + { + 'x': 118.4547885602939, + 'y': 38.978277239538684, + 'z': 0 + }, + { + 'x': 118.45482486545669, + 'y': 38.97827782849935, + 'z': 0 + }, + { + 'x': 118.45483419124878, + 'y': 38.9709392568471, + 'z': 0 + }, + { + 'x': 118.45479172438303, + 'y': 38.9709388473851, + 'z': 0 + } + ] + formData['color'] = 'rgba(31,15,221,0.44)' + formData['stretchHeight'] = 22 // 拉伸高度 + formData['strokeColor'] = 'rgba(150,221,15,0.5)' // 边线颜色 + varList.push(formData) + + return varList +} + +/** + * 边界 + */ +function initWallData() { + const varList = [] + // 左边边界点 + const formData = {} + formData['position'] = + [ + { + 'x': 118.44671375018376, + 'y': 38.97889478328093, + 'z': 0 + }, + { + 'x': 118.44671172328863, + 'y': 38.983021563460596, + 'z': 0 + }, + { + 'x': 118.44119168247931, + 'y': 38.98301785705107, + 'z': 0 + }, + { + 'x': 118.44118969124764, + 'y': 38.9812163374787, + 'z': 0 + }, + { + 'x': 118.44649853732912, + 'y': 38.98121953889335, + 'z': 0 + }, + { + 'x': 118.44650134365597, + 'y': 38.97875915992818, + 'z': 0 + }, + { + 'x': 118.4470637531886, + 'y': 38.97876017923315, + 'z': 0 + }, + { + 'x': 118.44706619500896, + 'y': 38.97868164469462, + 'z': 0 + }, + { + 'x': 118.44712789674165, + 'y': 38.97868185340563, + 'z': 0 + }, + { + 'x': 118.4471304201038, + 'y': 38.97871405171788, + 'z': 0 + }, + { + 'x': 118.4473051085244, + 'y': 38.97871207912992, + 'z': 0 + }, + { + 'x': 118.4473289786751, + 'y': 38.97841816252476, + 'z': 0 + }, + { + 'x': 118.44729548667289, + 'y': 38.97839018034534, + 'z': 0 + }, + { + 'x': 118.44707859188276, + 'y': 38.9783857145849, + 'z': 0 + }, + { + 'x': 118.4470629476726, + 'y': 38.96624162768212, + 'z': 0 + }, + { + 'x': 118.44698598652433, + 'y': 38.96614241527621, + 'z': 0 + }, + { + 'x': 118.43699256706036, + 'y': 38.97094584444521, + 'z': 0 + }, + { + 'x': 118.43698677434784, + 'y': 38.97113279616971, + 'z': 0 + }, + { + 'x': 118.4369247805723, + 'y': 38.9711762550468, + 'z': 0 + }, + { + 'x': 118.43686851087077, + 'y': 38.97122585515541, + 'z': 0 + }, + { + 'x': 118.4368228419735, + 'y': 38.971275979690986, + 'z': 0 + }, + { + 'x': 118.43678499681918, + 'y': 38.9713393298053, + 'z': 0 + }, + { + 'x': 118.43676875230953, + 'y': 38.97140289404229, + 'z': 0 + }, + { + 'x': 118.43676539323138, + 'y': 38.97146935570204, + 'z': 0 + }, + { + 'x': 118.43676685575419, + 'y': 38.97299994268132, + 'z': 0 + }, + { + 'x': 118.4369398307648, + 'y': 38.97300665619034, + 'z': 0 + }, + { + 'x': 118.43693443761649, + 'y': 38.97547585242228, + 'z': 0 + }, + { + 'x': 118.43726600378035, + 'y': 38.97547661818355, + 'z': 0 + }, + { + 'x': 118.4372542080076, + 'y': 38.97571064236701, + 'z': 0 + }, + { + 'x': 118.4360277513718, + 'y': 38.975712415404935, + 'z': 0 + }, + { + 'x': 118.43602632643315, + 'y': 38.97609960357418, + 'z': 0 + }, + { + 'x': 118.43570065408068, + 'y': 38.97609961401182, + 'z': 0 + }, + { + 'x': 118.43570597488815, + 'y': 38.973295238639196, + 'z': 0 + }, + { + 'x': 118.43567483777353, + 'y': 38.973257537936654, + 'z': 0 + }, + { + 'x': 118.43567525053884, + 'y': 38.972828759171634, + 'z': 0 + }, + { + 'x': 118.43591508391262, + 'y': 38.9709183309903, + 'z': 0 + }, + { + 'x': 118.43663163343234, + 'y': 38.97058321928959, + 'z': 0 + }, + { + 'x': 118.4366832177329, + 'y': 38.970559634008026, + 'z': 0 + }, + { + 'x': 118.43668250336033, + 'y': 38.970555908596815, + 'z': 0 + }, + { + 'x': 118.43674268877848, + 'y': 38.97052644073819, + 'z': 0 + }, + { + 'x': 118.43680726963413, + 'y': 38.97049554314058, + 'z': 0 + }, + { + 'x': 118.43686753266644, + 'y': 38.97046834579005, + 'z': 0 + }, + { + 'x': 118.43691280994368, + 'y': 38.97053942781709, + 'z': 0 + }, + { + 'x': 118.4369406186428, + 'y': 38.97059540177479, + 'z': 0 + }, + // 后期可能需要调整,编辑外围报废库点位 + { + 'x': 118.43698887173906, + 'y': 38.97070425315103, + 'z': 0 + }, + { + 'x': 118.43942895777559, + 'y': 38.96955035038816, + 'z': 0 + }, + { + 'x': 118.4394133363548, + 'y': 38.969530441712756, + 'z': 0 + }, + { + 'x': 118.43961153675725, + 'y': 38.969440060775426, + 'z': 0 + }, + { + 'x': 118.43963900609026, + 'y': 38.96947015709539, + 'z': 0 + }, + { + 'x': 118.44698697478312, + 'y': 38.96597559242543, + 'z': 0 + }, + { + 'x': 118.44698765347296, + 'y': 38.965890691222306, + 'z': 0 + }, + { + 'x': 118.44717169053938, + 'y': 38.965889876119526, + 'z': 0 + }, + { + 'x': 118.44717602969939, + 'y': 38.96563545967475, + 'z': 0 + }, + { + 'x': 118.45493631240893, + 'y': 38.965629070942995, + 'z': 0 + }, + { + 'x': 118.45493844375062, + 'y': 38.97874527269041, + 'z': 0 + }, + { + 'x': 118.45459786193378, + 'y': 38.97874735893536, + 'z': 0 + }, + { + 'x': 118.454597516194, + 'y': 38.978896745489095, + 'z': 0 + }, + { + 'x': 118.4467133204471, + 'y': 38.978894843186644, + 'z': 0 + } + ] + formData['color'] = 'rgba(201,118,243,0)' + formData['stretchHeight'] = 20 // 拉伸高度 + formData['strokeColor'] = 'rgba(201,118,243,1)' // 边线颜色 + varList.push(formData) + + // 边界1 + // formData = {} + // formData['position'] = [ + // ] + // formData['color'] = 'rgba(201,118,243,0)' + // formData['stretchHeight'] = 20 // 拉伸高度 + // formData['strokeColor'] = 'rgba(201,118,243,1)' // 边线颜色 + // varList.push(formData) + + return varList +} From 6656305cf7eeac84c708df051c44aafa7eeae4f7 Mon Sep 17 00:00:00 2001 From: guoyuepeng <770272267@qq.com> Date: Tue, 30 Apr 2024 11:48:59 +0800 Subject: [PATCH 10/10] =?UTF-8?q?1.=E5=88=A0=E9=99=A4=E4=B8=8D=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E5=BC=95=E7=94=A8=EF=BC=8C=E4=BC=98=E5=8C=96=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E6=89=93=E5=BC=80=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E6=85=A2=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- src/views/map/dialog/video_play_plat.vue | 28 +++++++-------- src/views/map/index.vue | 45 +----------------------- 3 files changed, 16 insertions(+), 59 deletions(-) diff --git a/index.html b/index.html index c2ee4ab..38ca04f 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,7 @@ <!-- <link href="./static/map/cesium109/Widgets/widgets.css" rel="stylesheet"/>--> <link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.16.0/skins/default/aliplayer-min.css" /> <script type="text/javascript" charset="utf-8" src="https://g.alicdn.com/de/prismplayer/2.16.0/aliplayer-min.js"></script> - <script type="text/javascript" charset="utf-8" src="http://10.30.20.54:8093/static/imosPlayer.min.js"></script> +<!-- <script type="text/javascript" charset="utf-8" src="http://10.30.20.54:8093/static/imosPlayer.min.js"></script>--> <script type="text/javascript" charset="utf-8" src="https://api.tianditu.gov.cn/api?v=4.0&tk=e8a16137fd226a62a23cc7ba5c9c78ce"></script> <script type="text/javascript" src="./static/map/cesium91/CesiumUnminified/Cesium.js"></script> diff --git a/src/views/map/dialog/video_play_plat.vue b/src/views/map/dialog/video_play_plat.vue index 422e14f..1b8d201 100644 --- a/src/views/map/dialog/video_play_plat.vue +++ b/src/views/map/dialog/video_play_plat.vue @@ -16,7 +16,7 @@ <script> import { requestFN } from '@/utils/request' -const imosPlayer = window.imosPlayer +// const imosPlayer = window.imosPlayer let iframeObj = null export default { @@ -65,19 +65,19 @@ export default { }, methods: { showYsVideo() { - iframeObj = imosPlayer.createPanelWindow() - var dom = document.getElementById('aLiVideoPlayer') - iframeObj.style.margin = 'auto' - dom.appendChild(iframeObj) - imosPlayer - .playLive(iframeObj.id, { - camera: this.id, - title: this.id, - stream: 1 - }) - .then((e) => { - console.log(e) - }) + // iframeObj = imosPlayer.createPanelWindow() + // var dom = document.getElementById('aLiVideoPlayer') + // iframeObj.style.margin = 'auto' + // dom.appendChild(iframeObj) + // imosPlayer + // .playLive(iframeObj.id, { + // camera: this.id, + // title: this.id, + // stream: 1 + // }) + // .then((e) => { + // console.log(e) + // }) }, showVideo() { let url = this.requestUrl diff --git a/src/views/map/index.vue b/src/views/map/index.vue index 7ca90f6..c7a0f65 100644 --- a/src/views/map/index.vue +++ b/src/views/map/index.vue @@ -296,7 +296,7 @@ import axios from 'axios' // md5加密 import md5 from 'md5' -const imosPlayer = window.imosPlayer +// const imosPlayer = window.imosPlayer var PI = 3.1415926535897932384626 var a = 6378245.0 // 卫星椭球坐标投影到平面地图坐标系的投影因子。 var ee = 0.00669342162296594323 // 椭球的偏心率。//判断是否在国内,在中国国内的经纬度才需要做偏移 @@ -1176,49 +1176,6 @@ export default { }) }, ysVideoInit() { - // 第二套方案 - var _this = this - requestFN( - '/map/loginOrKeepAlive', - { - } - ).then((data) => { - const token = data.token - var nbsp = String.fromCharCode(160) - var arr = [] - arr.length = 40 - const str = arr.fill(nbsp).join('') - const voidPath = imosPlayer.getUniqueID() - window.voidPath = voidPath - document.title = document.title + str + new Date().getTime() - _this.keepalive(token) - setInterval(_this.keepalive, 30000, token) - - window.videoWindow = 0 - imosPlayer.setLinkPort('8093') - imosPlayer - .init({ - ip: '172.14.0.54', - token: token, - title: document.title, - voidListenerPath: '\\' + voidPath - }) - .then(async(resr) => { - if (resr.ErrCode === 0) { - // imosPlayer.setLiveNetLinkMode(liveNetProtocol, liveByMS) - // imosPlayer.setReplayNetLinkMode(replayNetProtocol, replayByMS) - - // eslint-disable-next-line no-alert - console.info('登录成功') - } else { - // eslint-disable-next-line no-alert - console.info(resr.ErrMsg) - } - }) - .catch((err) => { - console.error(err) - }) - }) }, // keepalive(token) { // axios({