From 5d49c377895a2d2d88e794d6aae4bb309cbab0f3 Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期一, 30 六月 2025 11:17:09 +0800
Subject: [PATCH] art:删除MDC相关代码
---
/dev/null | 231 ----------------------------------------------
src/views/system/modules/UserModal.vue | 26 ++--
src/config/router.config.js | 4
3 files changed, 13 insertions(+), 248 deletions(-)
diff --git a/src/config/router.config.js b/src/config/router.config.js
index 2154e1f..f3b0f41 100644
--- a/src/config/router.config.js
+++ b/src/config/router.config.js
@@ -80,10 +80,6 @@
]
},
{
- path: '/MdcWorkshopSignage/:id',
- component: () => import('@/views/mdc/base/MdcWorkshopSignage.vue')
- },
- {
path: '/404',
component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
},
diff --git a/src/views/mdc/base/AlarmManager.vue b/src/views/mdc/base/AlarmManager.vue
deleted file mode 100644
index 04620a2..0000000
--- a/src/views/mdc/base/AlarmManager.vue
+++ /dev/null
@@ -1,396 +0,0 @@
-<template>
- <a-card :bordered="false">
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form
- layout="inline"
- @keyup.enter.native="searchQuery"
- >
- <a-row :gutter="24">
- <!--<a-col-->
- <!--:xl="4"-->
- <!--:lg="4"-->
- <!--:md="4"-->
- <!--:sm="24"-->
- <!-->-->
- <!--<a-form-item label="璁惧缂栧彿">-->
- <!--<a-input-->
- <!--placeholder="璇疯緭鍏ヨ澶囩紪鍙�"-->
- <!--v-model="queryParam.equipmentId"-->
- <!--></a-input>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <!--<a-col-->
- <!--:xl="4"-->
- <!--:lg="4"-->
- <!--:md="4"-->
- <!--:sm="24"-->
- <!-->-->
- <!--<a-form-item label="璁惧鍚嶇О">-->
- <!--<a-input-->
- <!--placeholder="璇疯緭鍏ヨ澶囧悕绉�"-->
- <!--v-model="queryParam.equipmentName"-->
- <!--></a-input>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <a-col
- :xl="6"
- :lg="7"
- :md="8"
- :sm="24"
- >
- <a-form-item label="鎺у埗绯荤粺绫诲瀷">
- <!--<j-dict-select-tag-->
- <!--placeholder="璇烽�夋嫨鎺у埗绯荤粺绫诲瀷"-->
- <!--v-model="queryParam.driveType"-->
- <!--dictCode="mdc_driveType"-->
- <!--/>-->
- <a-auto-complete
- v-model="queryParam.driveType"
- :data-source="driveTypeList"
- placeholder="璇烽�夋嫨鎺у埗绯荤粺绫诲瀷"
- :filter-option="filterOption"
- :allowClear="true"
- />
- </a-form-item>
- </a-col>
- <a-col
- :xl="4"
- :lg="4"
- :md="4"
- :sm="24"
- >
- <a-form-item label="鎶ヨ鍙�">
- <a-input
- placeholder="璇疯緭鍏ユ姤璀﹀彿"
- v-model="queryParam.alarmCode"
- ></a-input>
- </a-form-item>
- </a-col>
- <a-col
- :xl="4"
- :lg="4"
- :md="4"
- :sm="24"
- >
- <a-form-item label="鎶ヨ鍐呭">
- <a-input
- placeholder="璇疯緭鍏ユ姤璀﹀唴瀹�"
- v-model="queryParam.alarmContent"
- ></a-input>
- </a-form-item>
- </a-col>
-
- <a-col
- :xl="4"
- :lg="4"
- :md="4"
- :sm="24"
- >
- <span
- style="float: left;overflow: hidden;"
- class="table-page-search-submitButtons"
- >
- <a-button
- type="primary"
- @click="searchQuery"
- icon="search"
- >鏌ヨ</a-button>
- <a-button
- type="primary"
- @click="searchReset"
- icon="reload"
- style="margin-left: 8px"
- >閲嶇疆</a-button>
- <!--<a-->
- <!--@click="handleToggleSearch"-->
- <!--style="margin-left: 8px"-->
- <!-->-->
- <!--{{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }}-->
- <!--<a-icon :type="toggleSearchStatus ? 'up' : 'down'" />-->
- <!--</a>-->
- </span>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <!-- 鏌ヨ鍖哄煙-END -->
-
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator">
- <a-button
- @click="handleAddTRype"
- type="primary"
- icon="plus"
- >鏂板</a-button>
- <!--<a-button-->
- <!--@click="handleAdd"-->
- <!--type="primary"-->
- <!--icon="plus"-->
- <!-->璁惧鏂板</a-button>-->
- <!--<a-upload-->
- <!--name="file"-->
- <!--:showUploadList="false"-->
- <!--:multiple="false"-->
- <!--:headers="tokenHeader"-->
- <!--:action="importExcelUrl"-->
- <!--@change="handleImportExcel"-->
- <!-->-->
- <!--<a-button-->
- <!--type="primary"-->
- <!--icon="import"-->
- <!-->瀵煎叆</a-button>-->
- <!--</a-upload>-->
- <a-dropdown v-if="selectedRowKeys.length > 0">
- <a-menu slot="overlay">
- <a-menu-item
- key="1"
- @click="batchDel"
- >
- <a-icon type="delete" />鍒犻櫎
- </a-menu-item>
- </a-menu>
- <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔
- <a-icon type="down" />
- </a-button>
- </a-dropdown>
- </div>
-
- <!-- table鍖哄煙-begin -->
- <div>
- <div
- class="ant-alert ant-alert-info"
- style="margin-bottom: 16px;"
- >
- <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤�
- <a
- style="margin-left: 24px"
- @click="onClearSelected"
- >娓呯┖</a>
- </div>
-
- <a-table
- ref="table"
- size="middle"
- :scroll="{x:'max-content',y:465}"
- bordered
- rowKey="id"
- :columns="columns"
- :dataSource="dataSource"
- :pagination="ipagination"
- :loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
- class="j-table-force-nowrap"
- @change="handleTableChange"
- >
-
- <span
- slot="action"
- slot-scope="text, record"
- >
- <a @click="handleEdit(record)">缂栬緫</a>
-
- <a-divider type="vertical" />
- <a-popconfirm
- title="纭畾鍒犻櫎鍚�?"
- @confirm="() => handleDelete(record.id)"
- >
- <a>鍒犻櫎</a>
- </a-popconfirm>
- </span>
-
- </a-table>
- </div>
-
- <!--<alarm-manager-modal ref="modalForm" @ok="modalFormOk"></alarm-manager-modal>-->
- <alarm-manager-form ref="modalFormType" @ok="modalFormOk" :driveTypeList="driveTypeList" :filterOption="filterOption"></alarm-manager-form>
- <alarm-manager-edit ref="modalFormEdit" @ok="modalFormOk"></alarm-manager-edit>
- </a-card>
-</template>
-
-<script>
-
- import '@/assets/less/TableExpand.less'
- import { mixinDevice } from '@/utils/mixin'
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- // import MdcDriveTypeParamConfigModal from './modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigModal'
- import AlarmManagerModal from './modules/alarmManager/alarmManagerModal'
- import AlarmManagerForm from './modules/alarmManager/alarmManagerForm'
- import AlarmManagerEdit from './modules/alarmManager/alarmManagerEdit'
- import { filterMultiDictText } from '@/components/dict/JDictSelectUtil'
- import { filterObj } from '@/utils/util';
- import api from '@/api/mdc'
- export default {
- name: 'AlarmManager',
- mixins: [JeecgListMixin, mixinDevice],
- components: {
- AlarmManagerEdit,
- AlarmManagerForm,
- AlarmManagerModal
- },
- data() {
- return {
- description: '鎶ヨ鍙风鐞嗙晫闈�',
- /* 鍒嗛〉鍙傛暟 */
- ipagination:{
- current: 1,
- pageSize: 30,
- pageSizeOptions: ['30', '50', '100'],
- showTotal: (total, range) => {
- return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�"
- },
- showQuickJumper: true,
- showSizeChanger: true,
- total: 0
- },
- // 琛ㄥご
- columns: [
- {
- title: '#',
- dataIndex: '',
- key: 'rowIndex',
- width: 60,
- align: "center",
- customRender: function (t, r, index) {
- return parseInt(index) + 1;
- }
- },
- // {
- // title: '璁惧缂栧彿',
- // align: "center",
- // // sorter: true,
- // dataIndex: 'equipmentId'
- // },
- // {
- // title: '璁惧鍚嶇О',
- // align: "center",
- // // sorter: true,
- // dataIndex: 'equipmentName'
- // },
- {
- title: '鎶ヨ鍙�',
- align: "center",
- // sorter: true,
- dataIndex: 'alarmCode',
- width:400
- },
- {
- title: '鎶ヨ鍐呭',
- align: "center",
- // sorter: true,
- dataIndex: 'alarmContent',
- width:400
- },
-
- {
- title: '璁惧椹卞姩绫诲瀷',
- align: "center",
- // sorter: true,
- dataIndex: 'driveType',
- width:400
- },
- // {
- // title: '鏄惁杩囨护',
- // align: "center",
- // dataIndex: 'isUse',
- // customRender: (text) => (text ? filterMultiDictText(this.dictOptions['isUse'], text) : ''),
- // },
- {
- dataIndex:'isUse_dictText',
- title: '鏄惁鍚敤',
- align: "center",
- width:380
- // dictCode:'alarm_is_use'
- },
- {
- title: '鎿嶄綔',
- dataIndex: 'action',
- align: "center",
- fixed: "right",
- width: 150,
- scopedSlots: { customRender: 'action' }
- }
- ],
- url: {
- list: "/mdc/mdcAlarmInfo/list",
- delete: "/mdc/mdcAlarmInfo/delete",
- deleteBatch: "/mdc/mdcAlarmInfo/deleteBatch",
- importExcelUrl: "mdc/mdcDriveTypeParamConfig/importExcel",
-
- },
- dictOptions: {},
- superFieldList: [],
- driveTypeList:[]
- }
- },
- created() {
- this.$set(this.dictOptions, 'isUse', [{ text: '鏄�', value: '0' }, { text: '鍚�', value: '-1' }])
- this.getSuperFieldList();
- this.getDriveTypeByApi()
- },
- computed: {
- // importExcelUrl: function () {
- // return `${window._CONFIG['domianURL']}${this.url.importExcelUrl}`;
- // },
- },
- methods: {
- handleEdit: function (record) {
- this.$refs.modalFormEdit.edit(record);
- this.$refs.modalFormEdit.title = "缂栬緫";
- this.$refs.modalFormEdit.disableSubmit = false;
- },
- handleAddTRype(){
- this.$refs.modalFormType.add();
- this.$refs.modalFormType.title = "鏂板";
- this.$refs.modalFormType.disableSubmit = false
- },
- initDictConfig() {
- },
- getSuperFieldList() {
- let fieldList = [];
- fieldList.push({ type: 'string', value: 'alarmCode', text: '鎶ヨ鍙�', dictCode: '' })
- fieldList.push({ type: 'string', value: 'alarmDescription', text: '鎶ヨ鍐呭', dictCode: '' })
- fieldList.push({ type: 'int', value: 'driveType', text: '璁惧椹卞姩绫诲瀷', dictCode: '' })
- fieldList.push({ type: 'switch', value: 'isUse', text: '鏄惁鍚敤' })
- this.superFieldList = fieldList
- },
-
- getQueryParams() {
- // 閲嶅啓鏌ヨ鏉′欢
- let sqp = {}
- if (this.superQueryParams) {
- sqp['superQueryParams'] = encodeURI(this.superQueryParams)
- sqp['superQueryMatchType'] = this.superQueryMatchType
- }
- var param = Object.assign(sqp, this.queryParam, {}, this.filters)
- param.field = this.getQueryField()
- param.pageNo = this.ipagination.current
- param.pageSize = this.ipagination.pageSize
- return filterObj(param)
- },
- /**
- * 璋冪敤鎺ュ彛鑾峰彇鎺у埗绯荤粺绫诲瀷
- */
- getDriveTypeByApi(){
- api.getDriveTypeApi().then((res)=>{
- this.driveTypeList=res.result.map(item=>item.value)
- })
- },
- /**
- * 鑱旀兂杈撳叆妗嗙瓫閫夊姛鑳�
- * @param input 杈撳叆鐨勫唴瀹�
- * @param option 閰嶇疆
- * @returns {boolean} 鍒ゆ柇鏄惁绛涢��
- */
- filterOption(input, option) {
- return (
- option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0
- );
- },
-
- }
- }
-</script>
-<style scoped>
- @import '~@assets/less/common.less';
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/ContrastiveAnalysis.vue b/src/views/mdc/base/ContrastiveAnalysis.vue
deleted file mode 100644
index 5688466..0000000
--- a/src/views/mdc/base/ContrastiveAnalysis.vue
+++ /dev/null
@@ -1,91 +0,0 @@
-<template>
- <a-card :bordered="false">
- <div style="width: 100%; height: 100%;overflow: hidden">
- <a-row type="flex" :gutter="16">
- <a-col :md="5">
- <a-tabs :activeKey="activeKey" @change="tabChange">
- <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render>
- <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
- </a-tab-pane>
- <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">
- <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree>
- </a-tab-pane>
- </a-tabs>
- </a-col>
- <a-col :md="24-5" :sm="24">
- <ComparativeAnalysisMain ref="ComparativeAnalysisMain" :nodeTree='selectEquement' :nodePeople='selectPeople' :Type="slectTypeTree"></ComparativeAnalysisMain>
- </a-col>
- </a-row>
- </div>
- </a-card>
-</template>
-
-<script>
- import BaseTree from '../common/BaseTree'
- import ComparativeAnalysisMain from './modules/comparativeAnalysis/ComparativeAnalysisMain'
- import DepartTree from './modules/DepartList/DepartListTree/DepartTree'
- import {mapActions} from 'vuex'
- export default {
- name: 'comparativeAnalysis',
- components:{
- BaseTree,
- ComparativeAnalysisMain,
- DepartTree
- },
- data() {
- return {
- activeKey: '1',
- description: '璁惧淇℃伅',
- selectEquementId: '',
- selectEquement: {},
- selectPeople:{},
- slectTypeTree: '',
- url: {
- equipmentStatistics: '/mdc/equipment/equipmentStatistics'
- },
- isDepartType:'',
- }
- },
- created() {
- this.queryTreeData()
- },
- methods: {
- ...mapActions(['QueryDepartTree']),
- queryTreeData() {
- this.QueryDepartTree().then(res => {
- if (res.success) {
- this.isDepartType = res.result[0].value
- } else {
- // this.$message.warn(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() =>{
- })
- },
- tabChange(val) {
- // console.log(val)
- this.activeKey = val
- this.slectTypeTree = val
- },
- /* changeSelection(val) {
- this.selectEquementId = val
- this.$refs.DeviceRepairList.pQuery(val)
- },*/
- changeSelectionNode(val) {
- this.selectEquement = val
- this.slectTypeTree = '1'
- },
- changeSelectionNodedd(val) {
- this.selectPeople = val
- this.slectTypeTree = '2'
- }
- }
- }
-</script>
-
-<style scoped>
-
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/DeviceBaseInfo.vue b/src/views/mdc/base/DeviceBaseInfo.vue
deleted file mode 100644
index 0394307..0000000
--- a/src/views/mdc/base/DeviceBaseInfo.vue
+++ /dev/null
@@ -1,305 +0,0 @@
-<template>
- <a-card :bordered="false">
- <a-row type="flex" :gutter="16">
- <a-col :md="5" :sm="24">
- <base-tree @sendSelectBaseTree="changeSelection" @getCurrSelected="changeSelectionNode"></base-tree>
- </a-col>
- <a-col :md="24-5" :sm="24">
- <div class="device-status-info">
- <a-space v-for="item in deviceStatusList" :key="item.value" class="single-status-info">
- <template v-if="item.value!=99">
- <div>{{ item.label }}</div>
- <div class="status-square" :style="{ backgroundColor: item.color }"></div>
- <div>{{getDeviceNumberByStatus(item.value) }}</div>
- </template>
- <template v-else>
- <div>{{ item.label }}</div>
- <div>{{getDeviceNumberByStatus(item.value) }}</div>
- </template>
- </a-space>
- </div>
-
- <div>
- <a-tabs default-active-key="1">
- <a-tab-pane key="1" tab="甯冨眬鍥�">
- <equipment-layout :dataList="dataList" :equipmentId="selectEquipmentId"
- :node="selectEquipment"></equipment-layout>
- </a-tab-pane>
- <a-tab-pane key="2" tab="鍒楄〃" force-render>
- <equipment-list :dataSource="dataList" @editEquipmentStatus="editEquipmentStatus"></equipment-list>
- </a-tab-pane>
- </a-tabs>
- </div>
- </a-col>
- </a-row>
-
-
- </a-card>
-</template>
-
-<script>
- import { putAction, getAction } from '@/api/manage'
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import BaseTree from '../common/BaseTree'
- import EquipmentLayout from './modules/DeviceBaseInfo/EquipmentLayout'
- import EquipmentList from './modules/DeviceBaseInfo/EquipmentList'
-
- export default {
- name: 'DeviceBaseInfo',
- components: {
- BaseTree,
- EquipmentLayout,
- EquipmentList
- },
- data() {
- return {
- description: '璁惧淇℃伅',
- selectEquipmentId: '',
- selectEquipment: {},
- equipmentStatisticsInfo: {},
- dataList: [],
- standbyNumber: 0,
- offNumber: 0,
- warningNumber: 0,
- workNumber: 0,
- allNumber: 0,
- url: {
- list: '/mdc/mdcEquipment/queryEquipmentMonitorList',
- updateEquipmentStatus: '/mdc/mdcEquipment/updateEquipmentStatus'
- },
- param: {},
- timer: null,
- deviceStatusList: [
- {
- label: '鍏虫満',
- value: 0,
- color: '#A8A8A8'
- },
- {
- label: '寰呮満',
- value: 2,
- color: '#FFFF00'
- },
- {
- label: '杩愯',
- value: 3,
- color: '#00EE00'
- },
- {
- label: '鎶ヨ',
- value: 22,
- color: '#FF0000'
- },
- {
- label: '寮傚父',
- value: 33,
- color: '#FFA200'
- },
- {
- label: '鎬绘暟',
- value: 99,
- color: '#fff'
- }
- ]// 璁惧鐘舵�佹寚绀虹伅鍒楄〃锛�
- }
- },
- created() {
- const { productionId } = this.$route.params
- if (productionId) this.param.key = productionId
- },
- methods: {
- equipmentStatistics(param, resopnse = { key: false }) {
- getAction(this.url.list, param).then((res) => {
- this.dataList = []
- if (res.success) {
- if (res.result.length != 0) {
- this.standbyNumber = 0
- this.offNumber = 0
- this.warningNumber = 0
- this.workNumber = 0
- this.allNumber = 0
- this.dataList = res.result
- this.allNumber = this.dataList.length
- if (resopnse.key) {
- this.$notification.success({
- key: 'equipmentStatus',
- message: '娑堟伅',
- description: resopnse.message
- })
- }
- for (let i = 0; i < this.dataList.length; i++) {
- let item = this.dataList[i]
- switch (item.oporationDict) {
- case '寰呮満' :
- this.standbyNumber = this.standbyNumber + 1
- break
- case '杩愯' :
- this.workNumber = this.workNumber + 1
- break
- case '鍏虫満' :
- this.offNumber = this.offNumber + 1
- break
- case '鎶ヨ' :
- this.warningNumber = this.warningNumber + 1
- break
- default:
- break
- }
- }
-
- // 绛涢�変粠杞︽澘璺宠浆杩囨潵鐨勯渶姹傛暟鎹�
- const { signageData } = this.$route.params
- console.log('signageData', signageData)
- if (!signageData) return
- else this.filterDataList(signageData)
- } else {
- this.$notification.warning({
- message: '娑堟伅',
- description: '姝よ溅闂翠笅闈㈡棤璁惧锛侊紒'
- })
- }
- } else {
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- })
- },
-
- /**
- * 绛涢�夋弧瓒充粠鐪嬫澘璺宠浆杩囨潵鏃剁殑鏉′欢鐨勬暟鎹�
- * @param record
- */
- filterDataList(signageData) {
- this.dataList = this.dataList.filter(item => item.oporationDict === signageData.name)
- },
-
- changeSelection(val) {
- this.selectEquipmentId = val
- },
- changeSelectionNode(val) {
- this.selectEquipment = val.equipmentId
- clearInterval(this.timer)
- this.timer = null
- if (!val.equipmentId) {
- this.param.key = val.key
- this.equipmentStatistics(this.param)
- this.timer = setInterval(() => {
- setTimeout(this.equipmentStatistics(this.param), 0)
- }, 1000 * 10)
- } else {
- this.param.key = val.parentId
- this.equipmentStatistics(this.param)
- this.timer = setInterval(() => {
- setTimeout(this.equipmentStatistics(this.param), 0)
- }, 1000 * 10)
- }
- },
-
- /**
- * 鍗曞嚮鐘舵�佸弽棣堝悗瑙﹀彂
- * @param record
- */
- editEquipmentStatus(record) {
- const _this = this
- this.$notification.info({
- key: 'equipmentStatus',
- message: '娑堟伅',
- description: '鍙嶉涓�...'
- })
- getAction(this.url.updateEquipmentStatus, { id: record.id })
- .then(res => {
- if (res.success) {
- _this.equipmentStatistics(this.param, { key: true, message: res.message })
- } else {
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- })
- .catch(err => {
- this.$notification.error({
- message: '娑堟伅',
- description: err.message
- })
- })
- },
-
- /**
- * 鏍规嵁璁惧鐘舵�佸�艰幏鍙栧搴旇澶囨暟閲�
- * @param value 璁惧鐘舵�佸��
- * @returns {number} 璁惧鏁伴噺
- */
- getDeviceNumberByStatus(value) {
- if (value === 99) return this.dataList.length
- return this.dataList.filter((item) => item.oporation === 1 && value === 2 || item.oporation === value).length
- }
- },
- mounted() {
- this.equipmentStatistics(this.param)
- },
- beforeDestroy() {
- clearInterval(this.timer)
- this.timer = null
- }
- }
-</script>
-<style scoped lang="less">
- @import '~@assets/less/common.less';
-
- .equipMessage {
- width: 100%;
- height: 20px;
- }
-
- .equipMessage table {
- width: 60%;
- height: 100%;
- line-height: 50%;
- float: right;
- }
-
- .equipMessage table td {
- text-align: center;
- }
-
- .equipMessage table td span {
- display: inline-block;
- width: 15px;
- height: 15px;
- }
-
- .equipMessage table td .equipShutdown {
- background-color: #808080;
- }
-
- .equipMessage table td .standbyNumber {
- background-color: #ffbf37;
- }
-
- .equipMessage table td .equipRun {
- background-color: #19FE01;
- }
-
- .equipMessage table td .equipAlarm {
- background-color: #FD0008;
- }
-
- .device-status-info {
- display: flex;
- justify-content: flex-end;
- align-items: center;
-
- .single-status-info {
- margin: 10px;
- .status-square {
- width: 20px;
- height: 20px;
- border: 1px solid #ddd;
- border-radius: 3px;
- }
- }
- }
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/DeviceCalendar.vue b/src/views/mdc/base/DeviceCalendar.vue
deleted file mode 100644
index 743a60c..0000000
--- a/src/views/mdc/base/DeviceCalendar.vue
+++ /dev/null
@@ -1,127 +0,0 @@
-<template>
- <div style="width: 100%; height: 100%;">
- <a-card :bordered="false">
- <a-row type="flex" :gutter="16">
- <a-col :md="5">
- <a-tabs :activeKey="activeKey" @change="tabChange">
- <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render>
- <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
- </a-tab-pane>
- <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">
- <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree>
- </a-tab-pane>
- </a-tabs>
- </a-col>
- <a-col :md="19">
- <device-calendar-list ref="deviceList" :node='selectEquement' :Type="slectTypeTree"/>
- </a-col>
- </a-row>
- </a-card>
- </div>
-
-</template>
-
-<script>
- import { putAction, getAction } from '@/api/manage'
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import BaseTree from '../common/BaseTree'
- import DeviceCalendarList from './modules/deviceCalendar/DeviceCalendarList'
- import DepartTree from './modules/DepartList/DepartListTree/DepartTree'
- import {mapActions} from 'vuex'
-
- export default {
- name: 'DeviceCalendar',
- components: {
- BaseTree,
- DepartTree,
- DeviceCalendarList
- },
- data() {
- return {
- activeKey: '1',
- description: '璁惧淇℃伅',
- selectEquementId: '',
- selectEquement: {},
- slectTypeTree: '',
- url: {
- equipmentStatistics: '/mdc/equipment/equipmentStatistics'
- },
- isDepartType:'',
- }
- },
- created() {
- this.queryTreeData()
- },
- methods: {
- ...mapActions(['QueryDepartTree']),
- queryTreeData() {
- this.QueryDepartTree().then(res => {
- if (res.success) {
- this.isDepartType = res.result[0].value
- } else {
- // this.$message.warn(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() =>{
- })
- },
- tabChange(val) {
- // console.log(val)
- this.activeKey = val
- this.slectTypeTree = val
- },
- changeSelectionNode(val) {
- this.selectEquement = val
- this.slectTypeTree = '1'
- },
- changeSelectionNodedd(val) {
- this.selectEquement = val
- this.slectTypeTree = '2'
- }
- }
-
- }
-</script>
-<style scoped>
- @import '~@assets/less/common.less';
-
- .equipMessage {
- width: 100%;
- height: 10%;
- }
-
- .equipMessage table {
- width: 60%;
- height: 100%;
- line-height: 50%;
- }
-
- .equipMessage table td {
- text-align: center;
- }
-
- .equipMessage table td span {
- display: inline-block;
- width: 15px;
- height: 15px;
- }
-
- .equipMessage table td .equipShutdown {
- background-color: #808080;
- }
-
- .equipMessage table td .equipStandby {
- background-color: #ffbf37;
- }
-
- .equipMessage table td .equipRun {
- background-color: #19FE01;
- }
-
- .equipMessage table td .equipAlarm {
- background-color: #FD0008;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/DeviceLog.vue b/src/views/mdc/base/DeviceLog.vue
deleted file mode 100644
index 45817e3..0000000
--- a/src/views/mdc/base/DeviceLog.vue
+++ /dev/null
@@ -1,46 +0,0 @@
-<template>
- <a-card :bordered="false">
- <div style="width: 100%; height: 100%;overflow: hidden">
- <a-row type="flex" :gutter="16">
- <a-col :md="5" :sm="24">
- <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
- </a-col>
- <a-col :md="24-5" :sm="24">
- <log-info :equipment="selectEquipment"></log-info>
- </a-col>
- </a-row>
- </div>
- </a-card>
-</template>
-
-<script>
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import BaseTree from '../common/BaseTree'
- import LogInfo from './modules/DeviceLog/LogInfo'
-
- export default {
- name: 'DeviceLog',
- components: {
- BaseTree,
- LogInfo,
- },
- data() {
- return {
- description: '璁惧淇℃伅',
- selectEquipment:{},
- equipmentStatisticsInfo:{},
- url:{
- equipmentStatistics:"/mdc/equipment/equipmentStatistics"
- }
- }
- },
- created() {
- },
- methods: {
- changeSelectionNode(val){
- this.selectEquipment = val
- }
- }
-
- }
-</script>
diff --git a/src/views/mdc/base/DeviceParamThresholdManagement.vue b/src/views/mdc/base/DeviceParamThresholdManagement.vue
deleted file mode 100644
index 2ed2a2d..0000000
--- a/src/views/mdc/base/DeviceParamThresholdManagement.vue
+++ /dev/null
@@ -1,250 +0,0 @@
-<template>
- <a-card :bordered="false">
-
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
-
- <a-col :md="6" :sm="12">
- <a-form-item label="涓枃鍚�">
- <j-input placeholder="璇疯緭鍏ヤ腑鏂囧悕" v-model="queryParam.chineseName"></j-input>
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="8">
- <a-form-item label="鑻辨枃鍚�">
- <j-input placeholder="璇疯緭鍏ヨ嫳鏂囧悕" v-model="queryParam.englishName"></j-input>
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="8">
- <a-form-item label="椹卞姩绫诲瀷">
- <a-auto-complete
- v-model="queryParam.controlSystemType"
- :data-source="driveTypeList"
- placeholder="璇烽�夋嫨鎺у埗绯荤粺绫诲瀷"
- :filter-option="filterOption"
- :allowClear="true"
- />
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="8">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
- </a-col>
- </a-row>
- </a-form>
- </div>
-
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator" style="border-top: 5px">
- <a-button @click="handleAdd" type="primary" icon="plus">娣诲姞鍙傛暟闃堝��</a-button>
- <a-dropdown v-if="selectedRowKeys.length > 0">
- <a-menu slot="overlay" @click="handleMenuClick">
- <a-menu-item key="1">
- <a-icon type="delete" @click="batchDel"/>
- 鍒犻櫎
- </a-menu-item>
- </a-menu>
- <a-button style="margin-left: 8px">
- 鎵归噺鎿嶄綔
- <a-icon type="down"/>
- </a-button>
- </a-dropdown>
- </div>
-
- <!-- table鍖哄煙-begin -->
- <div>
- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
- <i class="anticon anticon-info-circle ant-alert-icon"></i>宸查�夋嫨 <a style="font-weight: 600">{{
- selectedRowKeys.length }}</a>椤�
- <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>
- </div>
-
- <a-table
- ref="table"
- bordered
- size="middle"
- rowKey="id"
- :scroll="{x:'max-content',y:600}"
- :columns="columns"
- :dataSource="dataSource"
- :pagination="ipagination"
- :loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
- @change="handleTableChange">
-
- <template slot="avatarslot" slot-scope="text, record, index">
- <div class="anty-img-wrap">
- <a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>
- </div>
- </template>
-
- <span slot="action" slot-scope="text, record">
- <a @click="handleEdit(record)">缂栬緫</a>
-
- <a-divider type="vertical"/>
-
- <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
- <a>鍒犻櫎</a>
- </a-popconfirm>
-
- </span>
-
-
- </a-table>
- </div>
- <!-- table鍖哄煙-end -->
-
- <ParamThresholdModal ref="modalForm" @ok="modalFormOk" :driveTypeList="driveTypeList"/>
- </a-card>
-</template>
-
-<script>
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import api from '@/api/mdc'
- import ParamThresholdModal from './modules/DeviceParamThresholdManagement/ParamThresholdModal'
-
- export default {
- name: 'EquipmentList',
- mixins: [JeecgListMixin],
- components: {
- ParamThresholdModal
- },
- data() {
- return {
- name: 'DeviceParamThresholdManagement',
- description: '杩欐槸璁惧鍙傛暟闃堝�肩鐞嗛〉闈�',
- queryParam: {},
- /* 鍒嗛〉鍙傛暟 */
- ipagination:{
- current: 1,
- pageSize: 30,
- pageSizeOptions: ['30', '50', '100'],
- showTotal: (total, range) => {
- return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�"
- },
- showQuickJumper: true,
- showSizeChanger: true,
- total: 0
- },
- columns: [
- {
- title: '#',
- dataIndex: '',
- key: 'rowIndex',
- width: 60,
- align: 'center',
- customRender: function(t, r, index) {
- return parseInt(index) + 1
- }
- },
- {
- title: '涓枃鍚�',
- align: 'center',
- dataIndex: 'chineseName',
- width: 350
- // sorter: true
- },
- {
- title: '鑻辨枃鍚�',
- align: 'center',
- width: 350,
- dataIndex: 'englishName'
- },
- {
- title: '椹卞姩绫诲瀷',
- align: 'center',
- width: 350,
- dataIndex: 'controlSystemType'
- },
- {
- title: '闃堝�间笂闄�',
- align: 'center',
- width: 270,
- dataIndex: 'maxThreshold'
- // scopedSlots: {customRender: "avatarslot"}
- },
- {
- title: '闃堝�间笅闄�',
- align: 'center',
- width: 270,
- dataIndex: 'minThreshold'
- // sorter: true
- },
- {
- title: '鎿嶄綔',
- dataIndex: 'action',
- scopedSlots: { customRender: 'action' },
- align: 'center',
- fixed: 'right',
- width: 150
- }
- ],
- driveTypeList: [],
- url: {
- list: '/mdc/mdcEquipmentThreshold/list',
- delete: '/mdc/mdcEquipmentThreshold/delete',
- deleteBatch: '/mdc/mdcEquipmentThreshold/deleteBatch'
- }
- }
- },
- created() {
- this.getDriveTypeByApi()
- },
- methods: {
- handleEdit: function(record) {
- this.$refs.modalForm.edit(record)
- this.$refs.modalForm.title = '缂栬緫'
-
- // 璋冪敤鎶藉眽琛ㄥ崟缁勪欢涓殑娓呴櫎琛ㄥ崟楠岃瘉鏂规硶
- this.$refs.modalForm.removeValidate()
- },
-
- handleAdd: function() {
- this.$refs.modalForm.add()
- this.$refs.modalForm.title = '鏂板'
-
- // 璋冪敤鎶藉眽琛ㄥ崟缁勪欢涓殑娓呴櫎琛ㄥ崟楠岃瘉鏂规硶
- this.$refs.modalForm.removeValidate()
- },
-
- handleMenuClick(e) {
- if (e.key == 1) {
- this.batchDel()
- } else if (e.key == 2) {
- this.batchFrozen(2)
- } else if (e.key == 3) {
- this.batchFrozen(1)
- }
- },
-
- /**
- * 璋冪敤鎺ュ彛鑾峰彇鎺у埗绯荤粺绫诲瀷
- */
- getDriveTypeByApi() {
- api.getDriveTypeApi().then((res) => {
- this.driveTypeList = res.result.map(item => item.value)
- })
- },
-
- /**
- * 鑱旀兂杈撳叆妗嗙瓫閫夊姛鑳�
- * @param input 杈撳叆鐨勫唴瀹�
- * @param option 閰嶇疆
- * @returns {boolean} 鍒ゆ柇鏄惁绛涢��
- */
- filterOption(input, option) {
- return (
- option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0
- )
- }
- }
-
- }
-</script>
-<style scoped>
- @import '~@assets/less/common.less'
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/DeviceRepair.vue b/src/views/mdc/base/DeviceRepair.vue
deleted file mode 100644
index adc416c..0000000
--- a/src/views/mdc/base/DeviceRepair.vue
+++ /dev/null
@@ -1,141 +0,0 @@
-<template>
- <div style="width: 100%; height: 100%;">
- <a-card :bordered="false">
- <a-row type="flex" :gutter="16">
- <a-col :md="5">
- <a-tabs :activeKey="activeKey" @change="tabChange">
- <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render>
- <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
- </a-tab-pane>
- <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">
- <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree>
- </a-tab-pane>
- </a-tabs>
- </a-col>
- <a-col :md="19">
- <device-repair-list ref="DeviceRepairList" :nodeTree='selectEquement' :nodePeople='selectPeople' :Type="slectTypeTree" />
- </a-col>
- </a-row>
-
- </a-card>
- </div>
-
-</template>
-
-<script>
- import { putAction, getAction } from '@/api/manage'
- import { frozenBatch } from '@/api/api'
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import JInput from '@/components/jeecg/JInput'
- import BaseTree from '../common/BaseTree'
- import DeviceRepairList from './modules/deviceRepair/DeviceRepairList'
- import JSuperQuery from '@/components/jeecg/JSuperQuery'
- import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton'
- import DepartTree from './modules/DepartList/DepartListTree/DepartTree'
- import {mapActions} from 'vuex'
-
- export default {
- name: 'DeviceRepair',
- components: {
- JThirdAppButton,
- JInput,
- BaseTree,
- JSuperQuery,
- DepartTree,
- DeviceRepairList
- },
- data() {
- return {
- activeKey: '1',
- description: '璁惧淇℃伅',
- selectEquementId: '',
- selectEquement: {},
- selectPeople:{},
- slectTypeTree: '',
- url: {
- equipmentStatistics: '/mdc/equipment/equipmentStatistics'
- },
- isDepartType:'',
- }
- },
- created() {
- this.queryTreeData()
- },
- methods: {
- ...mapActions(['QueryDepartTree']),
- queryTreeData() {
- this.QueryDepartTree().then(res => {
- if (res.success) {
- this.isDepartType = res.result[0].value
- } else {
- // this.$message.warn(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
-
- }
- }).finally(() =>{
- })
- },
- tabChange(val) {
- // console.log(val)
- this.activeKey = val
- this.slectTypeTree = val
- },
- /* changeSelection(val) {
- this.selectEquementId = val
- this.$refs.DeviceRepairList.pQuery(val)
- },*/
- changeSelectionNode(val) {
- this.selectEquement = val
- this.slectTypeTree = '1'
- },
- changeSelectionNodedd(val) {
- this.selectPeople = val
- this.slectTypeTree = '2'
- }
- }
-
- }
-</script>
-<style scoped>
- @import '~@assets/less/common.less';
-
- .equipMessage {
- width: 100%;
- height: 10%;
- }
-
- .equipMessage table {
- width: 60%;
- height: 100%;
- line-height: 50%;
- }
-
- .equipMessage table td {
- text-align: center;
- }
-
- .equipMessage table td span {
- display: inline-block;
- width: 15px;
- height: 15px;
- }
-
- .equipMessage table td .equipShutdown {
- background-color: #808080;
- }
-
- .equipMessage table td .equipStandby {
- background-color: #ffbf37;
- }
-
- .equipMessage table td .equipRun {
- background-color: #19FE01;
- }
-
- .equipMessage table td .equipAlarm {
- background-color: #FD0008;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/EfficiencyPOReport.vue b/src/views/mdc/base/EfficiencyPOReport.vue
deleted file mode 100644
index b9749d0..0000000
--- a/src/views/mdc/base/EfficiencyPOReport.vue
+++ /dev/null
@@ -1,140 +0,0 @@
-<template>
- <div style="width: 100%; height: 100%;">
- <a-card :bordered="false">
- <a-row type="flex" :gutter="16">
- <a-col :md="5">
- <a-tabs :activeKey="activeKey" @change="tabChange">
- <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render>
- <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
- </a-tab-pane>
- <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">,
- <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree>
- </a-tab-pane>
- </a-tabs>
- </a-col>
- <a-col :md="19">
- <efficiencyPO-list ref="EfficiencyPOList" :nodeTree='selectEquement' :nodePeople='selectPeople' :Type="slectTypeTree"/>
- </a-col>
- </a-row>
- </a-card>
- </div>
-
-</template>
-
-<script>
-import { putAction, getAction } from '@/api/manage'
-import { frozenBatch } from '@/api/api'
-import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-import JInput from '@/components/jeecg/JInput'
-import BaseTree from '../common/BaseTree'
-import EfficiencyPOList from './modules/efficiencyPOReport/EfficiencyPOList'
-import JSuperQuery from '@/components/jeecg/JSuperQuery'
-import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton'
-import DepartTree from './modules/DepartList/DepartListTree/DepartTree'
-import {mapActions} from 'vuex'
-export default {
- name: 'EfficiencyPOReport',
- components: {
- JThirdAppButton,
- JInput,
- BaseTree,
- JSuperQuery,
- DepartTree,
- EfficiencyPOList
- },
- data() {
- return {
- activeKey: '1',
- description: '璁惧淇℃伅',
- selectEquementId: '',
- selectEquement: {},
- selectPeople:{},
- slectTypeTree:"",
- url: {
- equipmentStatistics: '/mdc/equipment/equipmentStatistics'
- },
- isDepartType:'',
- }
- },
- created() {
- this.queryTreeData()
- },
- methods: {
- ...mapActions(['QueryDepartTree']),
- queryTreeData() {
- this.QueryDepartTree().then(res => {
- if (res.success) {
- this.isDepartType = res.result[0].value
- } else {
- // this.$message.warn(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
-
- }
- }).finally(() =>{
- })
- },
- tabChange(val) {
- // console.log(val);
- this.activeKey = val
- this.slectTypeTree = val
- },
- // changeSelection(val) {
- // this.selectEquementId = val
- // this.$refs.efficiencyList.pQuery(val)
- // this.$refs.efficiencyList.searchQuery()
- // },
- changeSelectionNode(val) {
- this.selectEquement = val
- this.slectTypeTree = "1"
- },
- changeSelectionNodedd(val) {
- this.selectPeople = val
- this.slectTypeTree = "2"
- }
- }
-
-}
-</script>
-<style scoped>
-@import '~@assets/less/common.less';
-
-.equipMessage {
- width: 100%;
- height: 10%;
-}
-
-.equipMessage table {
- width: 60%;
- height: 100%;
- line-height: 50%;
-}
-
-.equipMessage table td {
- text-align: center;
-}
-
-.equipMessage table td span {
- display: inline-block;
- width: 15px;
- height: 15px;
-}
-
-.equipMessage table td .equipShutdown {
- background-color: #808080;
-}
-
-.equipMessage table td .equipStandby {
- background-color: #ffbf37;
-}
-
-.equipMessage table td .equipRun {
- background-color: #19FE01;
-}
-
-.equipMessage table td .equipAlarm {
- background-color: #FD0008;
-}
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/EfficiencyReport.vue b/src/views/mdc/base/EfficiencyReport.vue
deleted file mode 100644
index e1f4add..0000000
--- a/src/views/mdc/base/EfficiencyReport.vue
+++ /dev/null
@@ -1,87 +0,0 @@
-<template>
- <div style="width: 100%; height: 100%;">
- <a-card :bordered="false">
- <a-row type="flex" :gutter="16">
- <a-col :md="5">
- <a-tabs :activeKey="activeKey" @change="tabChange">
- <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render>
- <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
- </a-tab-pane>
- <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">,
- <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree>
- </a-tab-pane>
- </a-tabs>
- </a-col>
- <a-col :md="19">
- <EfficiencyList ref="EfficiencyList" :nodePeople='selectPeople' :nodeTree='selectEquipment'
- :Type="selectTypeTree"></EfficiencyList>
- </a-col>
- </a-row>
- </a-card>
- </div>
-
-</template>
-
-<script>
- import { putAction, getAction } from '@/api/manage'
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import BaseTree from '../common/BaseTree'
- import EfficiencyList from './modules/efficiencyReport/EfficiencyList'
- import DepartTree from './modules/DepartList/DepartListTree/DepartTree'
- import { mapActions } from 'vuex'
-
- export default {
- name: 'efficiencyReport',
- components: {
- BaseTree,
- DepartTree,
- EfficiencyList
- },
- data() {
- return {
- activeKey: '1',
- description: '璁惧淇℃伅',
- selectEquipmentId: '',
- selectEquipment: {},
- selectPeople: {},
- selectTypeTree: '',
- url: {
- equipmentStatistics: '/mdc/equipment/equipmentStatistics'
- },
- isDepartType: ''
- }
- },
- created() {
- this.queryTreeData()
- },
- methods: {
- ...mapActions(['QueryDepartTree']),
- queryTreeData() {
- this.QueryDepartTree().then(res => {
- if (res.success) {
- this.isDepartType = res.result[0].value
- } else {
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- })
- },
- tabChange(val) {
- this.activeKey = val
- this.selectTypeTree = val
- },
- changeSelectionNode(val) {
- this.selectEquipment = val
- this.selectTypeTree = '1'
- },
- changeSelectionNodedd(val) {
- this.selectPeople = val
- this.selectTypeTree = '2'
- }
- }
-
- }
-</script>
diff --git a/src/views/mdc/base/EfficiencyShiftReport.vue b/src/views/mdc/base/EfficiencyShiftReport.vue
deleted file mode 100644
index c332e51..0000000
--- a/src/views/mdc/base/EfficiencyShiftReport.vue
+++ /dev/null
@@ -1,88 +0,0 @@
-<template>
- <div style="width: 100%; height: 100%;">
- <a-card :bordered="false">
- <a-row type="flex" :gutter="16">
- <a-col :md="5">
- <a-tabs :activeKey="activeKey" @change="tabChange">
- <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render>
- <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
- </a-tab-pane>
- <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">
- <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree>
- </a-tab-pane>
- </a-tabs>
- </a-col>
-
- <a-col :md="19">
- <efficiencyShift-list ref="deviceList" :nodeTree='selectEquipment' :nodePeople='selectPeople' :Type="selectTypeTree"/>
- </a-col>
- </a-row>
- </a-card>
- </div>
-
-</template>
-
-<script>
- import { putAction, getAction } from '@/api/manage'
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import BaseTree from '../common/BaseTree'
- import EfficiencyShiftList from './modules/efficiencyShiftReport/EfficiencyShiftList'
- import DepartTree from './modules/DepartList/DepartListTree/DepartTree'
- import {mapActions} from 'vuex'
- export default {
- name: 'EfficiencyShiftReport',
- components: {
- BaseTree,
- DepartTree,
- EfficiencyShiftList
- },
- data() {
- return {
- activeKey: '1',
- description: '璁惧淇℃伅',
- selectEquipmentId: '',
- selectEquipment: {},
- selectTypeTree:"",
- selectPeople:{},
- url: {
- equipmentStatistics: '/mdc/equipment/equipmentStatistics'
- },
- isDepartType:'',
- }
- },
- created() {
- this.queryTreeData()
- },
- methods: {
- ...mapActions(['QueryDepartTree']),
- queryTreeData() {
- this.QueryDepartTree().then(res => {
- if (res.success) {
- this.isDepartType = res.result[0].value
- } else {
- // this.$message.warn(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() =>{
- })
- },
- tabChange(val) {
- // console.log(val);
- this.activeKey = val
- this.selectTypeTree = val
- },
- changeSelectionNode(val) {
- this.selectEquipment = val
- this.selectTypeTree = "1"
- },
- changeSelectionNodedd(val) {
- this.selectPeople = val
- this.selectTypeTree = "2"
- },
- }
-
- }
-</script>
\ No newline at end of file
diff --git a/src/views/mdc/base/EquipmentList.vue b/src/views/mdc/base/EquipmentList.vue
deleted file mode 100644
index 6cc55f5..0000000
--- a/src/views/mdc/base/EquipmentList.vue
+++ /dev/null
@@ -1,447 +0,0 @@
-<template>
- <a-card :bordered="false">
-
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
-
- <a-col :md="4" :sm="4">
- <a-form-item label="璁惧缂栧彿">
- <a-input placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-model="queryParam.equipmentId"></a-input>
- </a-form-item>
- </a-col>
-
- <a-col :md="4" :sm="4">
- <a-form-item label="璁惧鍚嶇О">
- <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉�" v-model="queryParam.equipmentName"></a-input>
- </a-form-item>
- </a-col>
-
- <a-col :md="4" :sm="4">
- <a-form-item label="杞﹂棿鍚嶇О">
- <!--<a-input placeholder="璇疯緭鍏ヨ溅闂村悕绉�" v-model="queryParam.productionName"></a-input>-->
- <a-tree-select v-model="queryParam.productionName" :treeData="workshopTreeData" placeholder="璇烽�夋嫨杞﹂棿"
- :treeDefaultExpandedKeys="treeDefaultExpandedKeys"></a-tree-select>
- </a-form-item>
- </a-col>
-
- <a-col :md="4" :sm="4">
- <a-form-item label="璁惧绾у埆">
- <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绾у埆" dictCode="device_level" v-model="queryParam.deviceLevel"
- allow-clear/>
- </a-form-item>
- </a-col>
-
- <a-col :md="4" :sm="4">
- <a-form-item label="璁惧绉嶇被">
- <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绉嶇被" dictCode="device_category" v-model="queryParam.deviceCategory"
- allow-clear/>
- </a-form-item>
- </a-col>
-
- <a-col :md="4" :sm="4">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
- </a-col>
- </a-row>
- </a-form>
- </div>
-
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator" style="border-top: 5px">
- <a-button @click="handleAdd" type="primary" icon="plus">娣诲姞璁惧</a-button>
- <a-button type="primary" icon="download" @click="handleExportXls('璁惧淇℃伅')">瀵煎嚭</a-button>
- <a-dropdown v-if="selectedRowKeys.length > 0">
- <a-menu slot="overlay" @click="handleMenuClick">
- <a-menu-item key="1">
- <a-icon type="delete" @click="batchDel"/>
- 鍒犻櫎
- </a-menu-item>
- </a-menu>
- <a-button style="margin-left: 8px">
- 鎵归噺鎿嶄綔
- <a-icon type="down"/>
- </a-button>
- </a-dropdown>
- </div>
-
- <!-- table鍖哄煙-begin -->
- <div>
- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
- <i class="anticon anticon-info-circle ant-alert-icon"></i>宸查�夋嫨 <a style="font-weight: 600">{{
- selectedRowKeys.length }}</a>椤�
- <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>
- </div>
-
- <a-table
- ref="table"
- bordered
- size="middle"
- rowKey="id"
- :scroll="{x:'max-content',y:465}"
- :columns="columns"
- :dataSource="dataSource"
- :pagination="ipagination"
- :loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
- @change="handleTableChange">
- <span slot="action" slot-scope="text, record">
- <a @click="handleEdit(record)">缂栬緫</a>
-
- <a-divider type="vertical"/>
-
- <a-dropdown>
- <a class="ant-dropdown-link">
- 鏇村 <a-icon type="down"/>
- </a>
- <a-menu slot="overlay">
- <a-menu-item>
- <a href="javascript:;" @click="handleDetail(record)">璇︽儏</a>
- </a-menu-item>
-
- <a-menu-item>
- <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
- <a>鍒犻櫎</a>
- </a-popconfirm>
- </a-menu-item>
- </a-menu>
- </a-dropdown>
- </span>
-
-
- </a-table>
- </div>
- <!-- table鍖哄煙-end -->
-
- <user-modal ref="modalForm" @ok="modalFormOk"></user-modal>
- </a-card>
-</template>
-
-<script>
- import UserModal from './modules/EquipmentList/UserModal'
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import { queryProductionTreeList } from '@/api/api'
- import { mapActions } from 'vuex'
-
- export default {
- name: 'EquipmentList',
- mixins: [JeecgListMixin],
- components: {
- UserModal
- },
- data() {
- return {
- description: '杩欐槸璁惧绠$悊椤甸潰',
- queryParam: {},
- recycleBinVisible: false,
- /* 鍒嗛〉鍙傛暟 */
- ipagination: {
- current: 1,
- pageSize: 30,
- pageSizeOptions: ['30', '50', '100'],
- showTotal: (total, range) => {
- return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�'
- },
- showQuickJumper: true,
- showSizeChanger: true,
- total: 0
- },
- columns: [
- {
- title: '#',
- dataIndex: '',
- key: 'rowIndex',
- width: 60,
- align: 'center',
- customRender: function(t, r, index) {
- return parseInt(index) + 1
- }
- },
- {
- title: '璁惧缂栧彿',
- align: 'center',
- dataIndex: 'equipmentId',
- width: 200
- },
- {
- title: '璁惧鍚嶇О',
- align: 'center',
- width: 200,
- dataIndex: 'equipmentName'
- },
- {
- title: '杞﹂棿',
- align: 'center',
- width: 200,
- dataIndex: 'productionName'
- },
- {
- title: '璁惧绫诲瀷',
- align: 'center',
- width: 200,
- dataIndex: 'equipmentType'
- },
- {
- title: '椹卞姩绫诲瀷',
- align: 'center',
- width: 200,
- dataIndex: 'driveType'
- },
- {
- title: '鏈哄簥IP',
- align: 'center',
- width: 200,
- dataIndex: 'equipmentIp'
- },
- {
- title: '璁惧鍔熺巼',
- align: 'center',
- width: 200,
- dataIndex: 'devicePower'
- },
- {
- title: '閮ㄩ棬',
- align: 'center',
- width: 200,
- dataIndex: 'orgCodeTxt'
- },
-
- {
- title: '绯荤粺鐗堟湰',
- align: 'center',
- width: 200,
- dataIndex: 'systemVersion'
- },
- {
- title: '鎿嶄綔',
- dataIndex: 'action',
- scopedSlots: { customRender: 'action' },
- align: 'center',
- width: 150,
- fixed: 'right'
- }
-
- ],
- url: {
- list: '/mdc/mdcEquipment/list',
- delete: '/mdc/mdcEquipment/delete',
- deleteBatch: '/mdc/mdcEquipment/deleteBatch',
- exportXlsUrl: '/mdc/mdcEquipment/exportXls'
- },
- isDepartType: '',
- workshopTreeData: [],
- treeDefaultExpandedKeys: []
- }
- },
- created() {
- this.queryTreeData()
- this.getWorkshopListByApi()
- },
- methods: {
- ...mapActions(['QueryDepartTree']),
- queryTreeData() {
- this.QueryDepartTree().then(res => {
- if (res.success) {
- this.isDepartType = res.result[0].value
- if (this.isDepartType == -1) {
- this.columns = [
- {
- title: '#',
- dataIndex: '',
- key: 'rowIndex',
- width: 60,
- align: 'center',
- customRender: function(t, r, index) {
- return parseInt(index) + 1
- }
- },
- {
- title: '璁惧缂栧彿',
- align: 'center',
- dataIndex: 'equipmentId',
- width: 200
- // sorter: true
- },
- {
- title: '璁惧鍚嶇О',
- align: 'center',
- width: 200,
- dataIndex: 'equipmentName'
- },
- {
- title: '杞﹂棿',
- align: 'center',
- width: 200,
- dataIndex: 'productionName'
- },
- {
- title: '璁惧绫诲瀷',
- align: 'center',
- width: 200,
- dataIndex: 'equipmentType'
- },
-
- {
- title: '椹卞姩绫诲瀷',
- align: 'center',
- width: 200,
- dataIndex: 'driveType'
- // sorter: true
- },
- {
- title: '鏈哄簥IP',
- align: 'center',
- width: 200,
- dataIndex: 'equipmentIp'
- },
- {
- title: '璁惧鍔熺巼',
- align: 'center',
- width: 200,
- dataIndex: 'devicePower'
- },
- {
- title: '绯荤粺鐗堟湰',
- align: 'center',
- width: 200,
- dataIndex: 'systemVersion'
- },
- {
- title: '鎿嶄綔',
- dataIndex: 'action',
- scopedSlots: { customRender: 'action' },
- align: 'center',
- width: 150,
- fixed: 'right'
- }
-
- ]
- } else {
- this.columns = [
- {
- title: '#',
- dataIndex: '',
- key: 'rowIndex',
- width: 60,
- align: 'center',
- customRender: function(t, r, index) {
- return parseInt(index) + 1
- }
- },
- {
- title: '璁惧缂栧彿',
- align: 'center',
- dataIndex: 'equipmentId',
- width: 200
- // sorter: true
- },
- {
- title: '璁惧鍚嶇О',
- align: 'center',
- width: 200,
- dataIndex: 'equipmentName'
- },
- {
- title: '杞﹂棿',
- align: 'center',
- width: 200,
- dataIndex: 'productionName'
- },
- {
- title: '璁惧绫诲瀷',
- align: 'center',
- width: 200,
- dataIndex: 'equipmentType'
- },
-
- {
- title: '椹卞姩绫诲瀷',
- align: 'center',
- width: 200,
- dataIndex: 'driveType'
- // sorter: true
- },
- {
- title: '鏈哄簥IP',
- align: 'center',
- width: 200,
- dataIndex: 'equipmentIp'
- },
- {
- title: '璁惧鍔熺巼',
- align: 'center',
- width: 200,
- dataIndex: 'devicePower'
- },
- {
- title: '閮ㄩ棬',
- align: 'center',
- width: 200,
- dataIndex: 'orgCodeTxt'
- },
-
- {
- title: '绯荤粺鐗堟湰',
- align: 'center',
- width: 200,
- dataIndex: 'systemVersion'
- },
- {
- title: '鎿嶄綔',
- dataIndex: 'action',
- scopedSlots: { customRender: 'action' },
- align: 'center',
- width: 150,
- fixed: 'right'
- }
-
- ]
- }
-
- } else {
- // this.$message.warn(res.message)
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- })
- },
- /**
- * 璋冪敤鎺ュ彛鑾峰彇鏌ヨ鍖哄煙杞﹂棿鏍戝垪琛�
- */
- getWorkshopListByApi() {
- queryProductionTreeList().then(res => {
- if (res.success) {
- this.workshopTreeData = res.result
- this.treeDefaultExpandedKeys = [...res.result].map(item => item.key)
- }
- })
- },
- handleEdit: function(record) {
- this.$refs.modalForm.edit(record)
- this.$refs.modalForm.title = '缂栬緫'
- this.$refs.modalForm.disableSubmit = false
- this.$refs.modalForm.disSeach = true
- // 璋冪敤鎶藉眽琛ㄥ崟缁勪欢涓殑娓呴櫎琛ㄥ崟楠岃瘉鏂规硶
- this.$refs.modalForm.removeValidate()
- },
- handleAdd: function() {
- this.$refs.modalForm.add()
- this.$refs.modalForm.title = '鏂板'
- this.$refs.modalForm.disableSubmit = false
- this.$refs.modalForm.disSeach = false
- },
- handleMenuClick(e) {
- if (e.key == 1) {
- this.batchDel()
- }
- }
- }
- }
-</script>
-<style scoped>
- @import '~@assets/less/common.less'
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/MdcDriveTypeParamConfigList.vue b/src/views/mdc/base/MdcDriveTypeParamConfigList.vue
deleted file mode 100644
index f154978..0000000
--- a/src/views/mdc/base/MdcDriveTypeParamConfigList.vue
+++ /dev/null
@@ -1,435 +0,0 @@
-<template>
- <a-card :bordered="false">
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form
- layout="inline"
- @keyup.enter.native="searchQuery"
- >
- <a-row :gutter="24">
- <a-col
- :xl="6"
- :lg="7"
- :md="8"
- :sm="24"
- >
- <a-form-item label="鎺у埗绯荤粺绫诲瀷">
- <a-auto-complete
- v-model="queryParam.controlSystemType"
- :data-source="driveTypeList"
- placeholder="璇烽�夋嫨鎺у埗绯荤粺绫诲瀷"
- :filter-option="filterOption"
- :allowClear="true"
- />
- </a-form-item>
- </a-col>
- <a-col
- :xl="6"
- :lg="7"
- :md="8"
- :sm="24"
- >
- <a-form-item label="涓枃鍚嶇О">
- <a-input
- placeholder="璇疯緭鍏ヤ腑鏂囧悕绉�"
- v-model="queryParam.chineseName"
- ></a-input>
- </a-form-item>
- </a-col>
- <template v-if="toggleSearchStatus">
- <a-col
- :xl="6"
- :lg="7"
- :md="8"
- :sm="24"
- >
- <a-form-item label="鑻辨枃鍚嶇О">
- <a-input
- placeholder="璇疯緭鍏ヨ嫳鏂囧悕绉�"
- v-model="queryParam.englishName"
- ></a-input>
- </a-form-item>
- </a-col>
- <a-col
- :xl="6"
- :lg="7"
- :md="8"
- :sm="24"
- >
- <a-form-item label="鏄剧ず鏍囧織">
- <a-select v-model='queryParam.showFlag' placeholder="璇烽�夋嫨鏄剧ず鏍囧織">
- <a-select-option value="Y">鏄�</a-select-option>
- <a-select-option value="N">鍚�</a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <a-col
- :xl="6"
- :lg="7"
- :md="8"
- :sm="24"
- >
- <a-form-item label="宸ヤ綔鏇茬嚎鏍囧織">
- <a-select v-model='queryParam.curveGenerationFlags' placeholder="璇烽�夋嫨宸ヤ綔鏇茬嚎鏍囧織">
- <a-select-option value="Y">鏄�</a-select-option>
- <a-select-option value="N">鍚�</a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- </template>
- <a-col
- :xl="6"
- :lg="7"
- :md="8"
- :sm="24"
- >
- <span
- style="float: left;overflow: hidden;"
- class="table-page-search-submitButtons"
- >
- <a-button
- type="primary"
- @click="searchQuery"
- icon="search"
- >鏌ヨ</a-button>
- <a-button
- type="primary"
- @click="searchReset"
- icon="reload"
- style="margin-left: 8px"
- >閲嶇疆</a-button>
- <a
- @click="handleToggleSearch"
- style="margin-left: 8px"
- >
- {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }}
- <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
- </a>
- </span>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <!-- 鏌ヨ鍖哄煙-END -->
-
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator">
- <a-button
- @click="handleAdd"
- type="primary"
- icon="plus"
- >鏂板</a-button>
- <a-button
- type="primary"
- icon="download"
- @click="handleExportXls('椹卞姩鍙傛暟绠$悊')"
- >瀵煎嚭</a-button>
- <a-upload
- name="file"
- :showUploadList="false"
- :multiple="false"
- :headers="tokenHeader"
- :action="importExcelUrl"
- @change="handleImportExcel"
- >
- <a-button
- type="primary"
- icon="import"
- >瀵煎叆</a-button>
- </a-upload>
- <a-dropdown v-if="selectedRowKeys.length > 0">
- <a-menu slot="overlay">
- <a-menu-item
- key="1"
- @click="batchDel"
- >
- <a-icon type="delete" />鍒犻櫎
- </a-menu-item>
- </a-menu>
- <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔
- <a-icon type="down" />
- </a-button>
- </a-dropdown>
- </div>
-
- <!-- table鍖哄煙-begin -->
- <div>
- <div
- class="ant-alert ant-alert-info"
- style="margin-bottom: 16px;"
- >
- <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤�
- <a
- style="margin-left: 24px"
- @click="onClearSelected"
- >娓呯┖</a>
- </div>
-
- <a-table
- ref="table"
- size="middle"
- :scroll="{x:'max-content',y:465}"
- bordered
- rowKey="id"
- :columns="columns"
- :dataSource="dataSource"
- :pagination="ipagination"
- :loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
- @change="handleTableChange"
- >
-
- <template
- slot="htmlSlot"
- slot-scope="text"
- >
- <div v-html="text"></div>
- </template>
- <template
- slot="imgSlot"
- slot-scope="text"
- >
- <span
- v-if="!text"
- style="font-size: 12px;font-style: italic;"
- >鏃犲浘鐗�</span>
- <img
- v-else
- :src="getImgView(text)"
- height="25px"
- alt=""
- style="max-width:80px;font-size: 12px;font-style: italic;"
- />
- </template>
- <template
- slot="fileSlot"
- slot-scope="text"
- >
- <span
- v-if="!text"
- style="font-size: 12px;font-style: italic;"
- >鏃犳枃浠�</span>
- <a-button
- v-else
- :ghost="true"
- type="primary"
- icon="download"
- size="small"
- @click="downloadFile(text)"
- >
- 涓嬭浇
- </a-button>
- </template>
-
- <span
- slot="action"
- slot-scope="text, record"
- >
- <a @click="handleEdit(record)">缂栬緫</a>
-
- <a-divider type="vertical" />
- <a-dropdown>
- <a class="ant-dropdown-link">鏇村
- <a-icon type="down" />
- </a>
- <a-menu slot="overlay">
- <a-menu-item>
- <a @click="handleDetail(record)">璇︽儏</a>
- </a-menu-item>
- <a-menu-item>
- <a-popconfirm
- title="纭畾鍒犻櫎鍚�?"
- @confirm="() => handleDelete(record.id)"
- >
- <a>鍒犻櫎</a>
- </a-popconfirm>
- </a-menu-item>
- </a-menu>
- </a-dropdown>
- </span>
-
- </a-table>
- </div>
-
- <mdc-drive-type-param-config-modal
- ref="modalForm"
- @ok="modalFormOk"
- :driveTypeList="driveTypeList"
- ></mdc-drive-type-param-config-modal>
- </a-card>
-</template>
-
-<script>
-
-import '@/assets/less/TableExpand.less'
-import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-import MdcDriveTypeParamConfigModal from './modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigModal'
-import { filterMultiDictText } from '@/components/dict/JDictSelectUtil'
-import { filterObj } from '@/utils/util';
-import api from '@/api/mdc'
-
-export default {
- name: 'MdcDriveTypeParamConfigList',
- mixins: [JeecgListMixin,],
- components: {
- MdcDriveTypeParamConfigModal
- },
- data() {
- return {
- description: '璁惧椹卞姩鍙傛暟閰嶇疆绠$悊椤甸潰',
- /* 鍒嗛〉鍙傛暟 */
- ipagination:{
- current: 1,
- pageSize: 30,
- pageSizeOptions: ['30', '50', '100'],
- showTotal: (total, range) => {
- return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�"
- },
- showQuickJumper: true,
- showSizeChanger: true,
- total: 0
- },
- // 琛ㄥご
- columns: [
- {
- title: '#',
- dataIndex: '',
- key: 'rowIndex',
- width: 60,
- align: "center",
- customRender: function (t, r, index) {
- return parseInt(index) + 1;
- }
- },
- {
- title: '鎺у埗绯荤粺绫诲瀷',
- align: "center",
- // sorter: true,
- dataIndex: 'controlSystemType',
- width: 300,
- },
- {
- title: '涓枃鍚嶇О',
- align: "center",
- // sorter: true,
- dataIndex: 'chineseName',
- width: 300,
- },
- {
- title: '鑻辨枃鍚嶇О',
- align: "center",
- // sorter: true,
- dataIndex: 'englishName',
- width: 300,
- },
- {
- title: '搴忓彿',
- align: "center",
- // sorter: true,
- dataIndex: 'sortNo',
- width:100
- },
- {
- title: '鏄剧ず鏍囧織',
- align: "center",
- dataIndex: 'showFlag',
- customRender: (text) => (text ? filterMultiDictText(this.dictOptions['showFlag'], text) : ''),
- width: 300,
- },
- {
- title:'宸ヤ綔鏇茬嚎鏍囧織',
- align: "center",
- dataIndex: 'curveGenerationFlags',
- customRender: (text) => (text ? filterMultiDictText(this.dictOptions['curveGenerationFlags'], text) : ''),
- width: 300,
- },
- {
- title: '鎿嶄綔',
- dataIndex: 'action',
- align: "center",
- width: 150,
- fixed:'right',
- scopedSlots: { customRender: 'action' }
- }
- ],
- url: {
- list: "/mdc/mdcDriveTypeParamConfig/list",
- delete: "/mdc/mdcDriveTypeParamConfig/delete",
- deleteBatch: "/mdc/mdcDriveTypeParamConfig/deleteBatch",
- exportXlsUrl: "/mdc/mdcDriveTypeParamConfig/exportXls",
- importExcelUrl: "mdc/mdcDriveTypeParamConfig/importExcel",
- },
- dictOptions: {},
- superFieldList: [],
- driveTypeList:[]
- }
- },
- provide(){
- return {
- driveTypeList:this.driveTypeList
- }
- },
- created() {
- this.$set(this.dictOptions, 'showFlag', [{ text: '鏄�', value: 'Y' }, { text: '鍚�', value: 'N' }])
- this.$set(this.dictOptions, 'curveGenerationFlags', [{ text: '鏄�', value: 'Y' }, { text: '鍚�', value: 'N' }])
- this.getSuperFieldList();
- this.getDriveTypeByApi()
- },
- computed: {
- importExcelUrl: function () {
- return `${window._CONFIG['domianURL']}${this.url.importExcelUrl}`;
- },
- },
- methods: {
- initDictConfig() {
- },
- getSuperFieldList() {
- let fieldList = [];
- fieldList.push({ type: 'string', value: 'controlSystemType', text: '鎺у埗绯荤粺绫诲瀷', dictCode: 'mdc_driveType' })
- fieldList.push({ type: 'string', value: 'chineseName', text: '涓枃鍚嶇О', dictCode: '' })
- fieldList.push({ type: 'string', value: 'englishName', text: '鑻辨枃鍚嶇О', dictCode: '' })
- fieldList.push({ type: 'int', value: 'sortNo', text: '搴忓彿', dictCode: '' })
- fieldList.push({ type: 'switch', value: 'showFlag', text: '鏄剧ず鏍囧織' })
- fieldList.push({ type: 'switch', value: 'curveGenerationFlags', text: '宸ヤ綔鏇茬嚎鏍囧織' })
- this.superFieldList = fieldList
- },
-
- getQueryParams() {
- // 閲嶅啓鏌ヨ鏉′欢
- let sqp = {}
- if (this.superQueryParams) {
- sqp['superQueryParams'] = encodeURI(this.superQueryParams)
- sqp['superQueryMatchType'] = this.superQueryMatchType
- }
- var param = Object.assign(sqp, this.queryParam, {}, this.filters)
- param.field = this.getQueryField()
- param.pageNo = this.ipagination.current
- param.pageSize = this.ipagination.pageSize
- return filterObj(param)
- },
- /**
- * 璋冪敤鎺ュ彛鑾峰彇鎺у埗绯荤粺绫诲瀷
- */
- getDriveTypeByApi(){
- api.getDriveTypeApi().then((res)=>{
- this.driveTypeList=res.result.map(item=>item.value)
- })
- },
- /**
- * 鑱旀兂杈撳叆妗嗙瓫閫夊姛鑳�
- * @param input 杈撳叆鐨勫唴瀹�
- * @param option 閰嶇疆
- * @returns {boolean} 鍒ゆ柇鏄惁绛涢��
- */
- filterOption(input, option) {
- return (
- option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0
- );
- },
-
- }
-}
-</script>
-<style scoped>
-@import '~@assets/less/common.less';
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/MdcEquipmentTypeList.vue b/src/views/mdc/base/MdcEquipmentTypeList.vue
deleted file mode 100644
index 3f6577e..0000000
--- a/src/views/mdc/base/MdcEquipmentTypeList.vue
+++ /dev/null
@@ -1,218 +0,0 @@
-<template>
- <a-card :bordered="false">
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <a-form-item label="璁惧绫诲瀷鍚嶇О">
- <a-input placeholder="璇疯緭鍏ヨ澶囩被鍨嬪悕绉�" v-model="queryParam.equipmentTypeName"></a-input>
- </a-form-item>
- </a-col>
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
- <!--<a @click="handleToggleSearch" style="margin-left: 8px">-->
- <!--{{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }}-->
- <!--<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
- <!--</a>-->
- </span>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <!-- 鏌ヨ鍖哄煙-END -->
-
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator">
- <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
- <!--<a-button type="primary" icon="download" @click="handleExportXls('璁惧绫诲瀷')">瀵煎嚭</a-button>-->
- <!--<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
- <!--<a-button type="primary" icon="import">瀵煎叆</a-button>-->
- <!--</a-upload>-->
- <!-- 楂樼骇鏌ヨ鍖哄煙 -->
- <!--<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
- <a-dropdown v-if="selectedRowKeys.length > 0">
- <a-menu slot="overlay">
- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item>
- </a-menu>
- <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button>
- </a-dropdown>
- </div>
-
- <!-- table鍖哄煙-begin -->
- <div>
- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
- <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤�
- <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>
- </div>
-
- <a-table
- ref="table"
- size="middle"
- bordered
- rowKey="id"
- :columns="columns"
- :dataSource="dataSource"
- :pagination="ipagination"
- :loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
- class="j-table-force-nowrap"
- @change="handleTableChange"
- :scroll="{x:'max-content',y:465}"
- >
-
- <template slot="htmlSlot" slot-scope="text">
- <div v-html="text"></div>
- </template>
- <template slot="imgSlot" slot-scope="text,record">
- <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span>
- <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
- </template>
- <template slot="fileSlot" slot-scope="text">
- <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span>
- <a-button
- v-else
- :ghost="true"
- type="primary"
- icon="download"
- size="small"
- @click="downloadFile(text)">
- 涓嬭浇
- </a-button>
- </template>
-
- <span slot="action" slot-scope="text, record">
- <a @click="handleEdit(record)">缂栬緫</a>
-
- <a-divider type="vertical" />
- <a-dropdown>
- <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
- <a-menu slot="overlay">
- <a-menu-item>
- <a @click="handleDetail(record)">璇︽儏</a>
- </a-menu-item>
- <a-menu-item>
- <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
- <a>鍒犻櫎</a>
- </a-popconfirm>
- </a-menu-item>
- </a-menu>
- </a-dropdown>
- </span>
-
- </a-table>
- </div>
-
- <mdc-equipment-type-modal ref="modalForm" @ok="modalFormOk"></mdc-equipment-type-modal>
- </a-card>
-</template>
-
-<script>
-
- import '@/assets/less/TableExpand.less'
- import { mixinDevice } from '@/utils/mixin'
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import MdcEquipmentTypeModal from './modules/EquipmentTypeList/MdcEquipmentTypeModal'
- import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
-
- export default {
- name: 'MdcEquipmentTypeList',
- mixins:[JeecgListMixin, mixinDevice],
- components: {
- MdcEquipmentTypeModal
- },
- data () {
- return {
- description: '璁惧绫诲瀷绠$悊椤甸潰',
- /* 鍒嗛〉鍙傛暟 */
- ipagination:{
- current: 1,
- pageSize: 30,
- pageSizeOptions: ['30', '50', '100'],
- showTotal: (total, range) => {
- return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�"
- },
- showQuickJumper: true,
- showSizeChanger: true,
- total: 0
- },
- // 琛ㄥご
- columns: [
- {
- title: '#',
- dataIndex: '',
- key:'rowIndex',
- width:60,
- align:"center",
- customRender:function (t,r,index) {
- return parseInt(index)+1;
- }
- },
- {
- title:'璁惧绫诲瀷鍚嶇О',
- align:"center",
- dataIndex: 'equipmentTypeName',
- width:530
- },
- {
- title:'璁惧绫诲瀷鍥剧墖',
- align:"center",
- dataIndex: 'equipmentTypePictures',
- scopedSlots: {customRender: 'imgSlot'},
- width:530
- },
- {
- title:'璁惧绫诲瀷鐘舵��',
- align:"center",
- dataIndex: 'equipmentTypeStates',
- customRender: (text) => (text ? filterMultiDictText(this.dictOptions['equipmentTypeStates'], text) : ''),
- width:530
- },
- {
- title: '鎿嶄綔',
- dataIndex: 'action',
- align:"center",
- scopedSlots: { customRender: 'action' },
- width:150,
- fixed:'right'
- }
- ],
- url: {
- list: "/mdc/mdcEquipmentType/queryWrapper",
- delete: "/mdc/mdcEquipmentType/deleteEquipmentType",
- deleteBatch: "/mdc/mdcEquipmentType/deleteBatchEquipmentType",
- exportXlsUrl: "/mdcequipmenttype/mdcEquipmentType/exportXls",
- importExcelUrl: "mdcequipmenttype/mdcEquipmentType/importExcel",
-
- },
- dictOptions:{},
- superFieldList:[],
- }
- },
- created() {
- this.$set(this.dictOptions, 'equipmentTypeStates', [{text:'鏄�',value:'Y'},{text:'鍚�',value:'N'}])
- this.getSuperFieldList();
- },
- computed: {
- importExcelUrl: function(){
- return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
- },
- },
- methods: {
- initDictConfig(){
- },
- getSuperFieldList(){
- let fieldList=[];
- fieldList.push({type:'string',value:'equipmentTypeName',text:'璁惧绫诲瀷鍚嶇О',dictCode:''})
- fieldList.push({type:'string',value:'equipmentTypePictures',text:'璁惧绫诲瀷鍥剧墖',dictCode:''})
- fieldList.push({type:'switch',value:'equipmentTypeStates',text:'璁惧绫诲瀷鐘舵��'})
- this.superFieldList = fieldList
- }
- }
- }
-</script>
-<style scoped>
- @import '~@assets/less/common.less';
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/MdcUtilizationRateList.vue b/src/views/mdc/base/MdcUtilizationRateList.vue
deleted file mode 100644
index 896efef..0000000
--- a/src/views/mdc/base/MdcUtilizationRateList.vue
+++ /dev/null
@@ -1,209 +0,0 @@
-<template>
- <a-card :bordered="false" class="mdcutilization_list">
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="6" :sm="8">
- <a-form-item label="绫诲埆">
- <a-input placeholder="璇疯緭鍏ョ被鍒�" v-model="queryParam.rateParameterCategory"></a-input>
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="8">
- <a-space>
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
- </a-space>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <!--<div class="table-operator">-->
- <!--<a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>-->
- <!--<a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>-->
- <!--</div>-->
-
- <!-- table鍖哄煙-begin -->
- <div>
- <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
- :pagination="ipagination" :loading="loading"
- @change="handleTableChange">
- <span slot="rateParameterColor" slot-scope="text, record">
- <div :style="{background:record.rateParameterColor}"> </div>
- </span>
- <span slot="action" slot-scope="text, record">
- <a href="javascript:;" @click="handleEdit(record)">缂栬緫</a>
- </span>
- <!--<span slot="action1" slot-scope="text,record">-->
- <!--<span><=</span>-->
- <!--</span>-->
- </a-table>
- </div>
- <!-- table鍖哄煙-end -->
- <mdc-utilization-rate-model ref="formModel" @ok="modalFormOk"></mdc-utilization-rate-model>
- </a-card>
-</template>
-
-<script>
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
- import JDictSelectTag from '@/components/dict/JDictSelectTag'
- import {
- initDictOptions,
- filterDictText
- } from '@/components/dict/JDictSelectUtil'
- import {
- requestPut
- } from '@/api/manage'
- import JInput from '@/components/jeecg/JInput'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import JDate from '@/components/jeecg/JDate'
- import moment from 'moment'
- import {
- getAction,
- postAction,
- deleteAction
- } from '@/api/manage'
- import MdcUtilizationRateModel from './modules/mdcUtilizationRate/MdcUtilizationRateModel'
-
- export default {
- name: 'MdcUtilizationRateList',
- mixins: [JeecgListMixin],
-
- components: {
- JDictSelectTag,
- JInput,
- JEllipsis,
- JDate,
- MdcUtilizationRateModel
- },
- data() {
- return {
- /* 鍒嗛〉鍙傛暟 */
- ipagination:{
- current: 1,
- pageSize: 30,
- pageSizeOptions: ['30', '50', '100'],
- showTotal: (total, range) => {
- return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�"
- },
- showQuickJumper: true,
- showSizeChanger: true,
- total: 0
- },
- columns: [{
- title: '绫诲埆',
- align: 'center',
- dataIndex: 'rateParameterCategory'
- },
- {
- title: '棰滆壊',
- align: 'center',
- dataIndex: 'rateParameterColor',
- scopedSlots: {
- customRender: 'rateParameterColor'
- }
- },
- {
- title: '鏈�灏忚寖鍥达紙鍗曚綅锛�%锛�',
- align: 'center',
- dataIndex: 'minimumRange'
- },
- // {
- // title:'',
- // dataIndex:'action1',
- // align:'center',
- // scopedSlots: {
- // customRender: 'action1'
- // }
- // },
- {
- title: '鏈�澶ц寖鍥达紙鍗曚綅锛�%锛�',
- align: 'center',
- dataIndex: 'maximumRange'
- },
- {
- title: '绛夌骇',
- align: 'center',
- dataIndex: 'rateParameterLevel'
- },
- {
- title: '鎿嶄綔',
- dataIndex: 'action',
- align: 'center',
- scopedSlots: {
- customRender: 'action'
- }
- }
- ],
- url: {
- list: '/mdc/MdcUtilizationRate/queryWrapper'
- }
- }
- },
- created() {
- this.loadData()
- },
- methods: {
- searchReset() {
- this.queryParam = {}
- this.loadData()
- this.onClearSelected()
- },
- searchQuery() {
- this.loadData()
- this.onClearSelected()
- },
- modalFormOk(val) {
- // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- this.loadData()
- this.selectedRowKeys = [val.borrowSubId]
- },
- onSelectChange(selectedRowKeys, selectionRows) {
- this.selectedRowKeys = selectedRowKeys
- this.selectionRows = selectionRows
- },
- handleEdit(record) {
- this.$refs.formModel.edit(record)
- this.$refs.formModel.title = '缂栬緫'
- this.$refs.formModel.disableSubmit = false
- }
- }
- }
-</script>
-<style>
- @import '~@assets/less/common.less';
- @media screen and (min-width: 1920px){
- .mdcutilization_list{
- height: 825px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1680px) and (max-width: 1920px){
- .mdcutilization_list{
- height: 825px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1400px) and (max-width: 1680px){
- .mdcutilization_list{
- height: 655px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1280px) and (max-width: 1400px){
- .mdcutilization_list{
- height: 552px!important;
- overflow: scroll;
- }
- }
- @media screen and (max-width: 1280px){
- .mdcutilization_list{
- height: 552px!important;
- overflow: scroll;
- }
- }
-</style>
diff --git a/src/views/mdc/base/MdcWorkshopSignage.vue b/src/views/mdc/base/MdcWorkshopSignage.vue
deleted file mode 100644
index 3a90188..0000000
--- a/src/views/mdc/base/MdcWorkshopSignage.vue
+++ /dev/null
@@ -1,566 +0,0 @@
-<template>
- <dv-full-screen-container class="full-screen-container">
- <div>
- <!--椤靛ご鍖哄煙-->
- <header class="page-header" :style="{height: pageHeaderHeight+'px'}">
- <a-row style="height: 100%">
- <a-col :span="7" class="header-left">
- <a-space>
- <span v-if="!isSwitchChecked">寮�鍚姛鑳�</span>
- <span v-else>鍏抽棴鍔熻兘</span>
- <a-switch
- checked-children="寮�"
- un-checked-children="鍏�"
- @change="handleSwitchChange"
- v-model="isSwitchChecked"
- :disabled="isSwitchChecked"
- />
- <a-button type="primary" icon="save" size="large" @click="saveDevicePositionAndSizeByApi">淇濆瓨浣嶇疆</a-button>
- </a-space>
- </a-col>
-
- <a-col :span="10" class="workshop-name">{{ workshopDetails.workshopName }}</a-col>
-
- <a-col :span="7" class="device-status-info">
- <!--<a-space v-for="item in deviceStatusList" :key="item.value" class="single-status-info"-->
- <!--@click="handleScreenDevive(item)">-->
- <!--<div :style="{color:item.checked?'#1890FF':'#fff'}">{{ item.label }}</div>-->
- <!--<div class="status-square" :style="{ backgroundColor: item.color }"></div>-->
- <!--<!–<a-checkbox :checked="item.checked" @change="checkboxChange(item)"></a-checkbox>–>-->
- <!--<div>{{getDeviceNumberByStatus(item.value) }}</div>-->
- <!--</a-space>-->
- <a-space v-for="item in deviceStatusList" :key="item.value" class="single-status-info">
- <div :style="{color:item.checked?'#1890FF':'#fff'}">{{ item.label }}</div>
- <div class="status-square" :style="{ backgroundColor: item.color }"></div>
- <!--<a-checkbox :checked="item.checked" @change="checkboxChange(item)"></a-checkbox>-->
- <div>{{getDeviceNumberByStatus(item.value) }}</div>
- </a-space>
- </a-col>
- </a-row>
- </header>
-
- <!--鎷栨嫿璁惧鍖哄煙-->
- <div class="content-container" ref="deviceContainerRef" style="overflow: auto">
- <img :src="imgSrc" width="1920" height="900">
- <div class="guideline guidelineX" :style="{top:guidelineXTop+'px',display:showGuideline}"></div>
- <div class="guideline guidelineY" :style="{left:guidelineYLeft+'px',display:showGuideline}"></div>
- <VueDragResize
- v-for="(item, index) in deviceList"
- :key="item.equipmentId"
- :w="item.vw"
- :h="item.vh"
- :x="item.coordinateLeft"
- :y="item.coordinateTop"
- v-on:resizing="resize($event, index)"
- v-on:dragging="resize($event, index)"
- :parentLimitation="parentLimitation"
- :parentH="parentH"
- :parentW="parentW"
- :minw="70"
- :minh="70"
- :isDraggable="isDraggable"
- :isResizable="isResizable"
- :stickSize="6"
- @deactivated="showGuideline = 'none'"
- >
- <div class="single-device" :style="{ width: item.vw + 'px', height: item.vh + 'px' }"
- @click="openDetail(item)">
- <div class="device-status">
- <div
- v-if="item.equipmentStatus == 2 || item.equipmentStatus == 1"
- :style="{ backgroundImage: `url(${require('@/assets/yellow.png')})` }"
- class="status-image"
- ></div>
- <div
- v-if="item.equipmentStatus == 22"
- :style="{ backgroundImage: `url(${require('@/assets/red.png')})` }"
- class="status-image"
- ></div>
- <div
- v-if="item.equipmentStatus == 0"
- :style="{ backgroundImage: `url(${require('@/assets/gray.png')})` }"
- class="status-image"
- ></div>
- <div
- v-if="item.equipmentStatus == 3"
- :style="{ backgroundImage: `url(${require('@/assets/green.png')})` }"
- class="status-image"
- ></div>
- <div
- :style="{ backgroundImage: `url(${getImgView(item.equipmentImage)})` }"
- class="device-image"
- ></div>
- </div>
- <div class="device-id" id="deviceId"
- :style="{ color:workshopDetails.equipmentIdColor }">
- {{ item.equipmentId }}
- </div>
- </div>
- </VueDragResize>
- </div>
-
- <EquipmentDetailModal ref="EquipmentDetailModal"></EquipmentDetailModal>
- </div>
- </dv-full-screen-container>
-</template>
-
-<script>
- import VueDragResize from 'vue-drag-resize'
- import api from '@/api/mdc'
- import { getFileAccessHttpUrl } from '@/api/manage'
- import EquipmentDetailModal from './modules/WorkshopSignage/EquipmentDetailModal'
- import { message } from 'ant-design-vue'
-
- message.config({
- maxCount: 3
- })
-
- export default {
- components: {
- VueDragResize,
- EquipmentDetailModal
- },
- data() {
- return {
- pageHeaderHeight: 80,// 椤靛ご楂樺害
- workshopDetails: {}, // 杞﹂棿璇︾粏淇℃伅,
- isDraggable: false, // 鏄惁寮�鍚嫋鎷�
- isResizable: false, // 鏄惁寮�鍚缉鏀�
- isSwitchChecked: false, // 鏄惁寮�鍚姛鑳�
- timingAcquisition: null, // 瀹氭椂鍒锋柊鏄惁寮�鍚�
- parentH: 5000,//鐖剁骇楂樺害
- parentW: 1920,//鐖剁骇瀹藉害
- showGuideline: 'none',
- guidelineXTop: 0,
- guidelineYLeft: 0,
- deviceList: [
- // {
- // equipmentId: '123213213123232',// 璁惧ID
- // equipmentImage: require('@/assets/8.png'), // 璁惧鍥剧墖
- // coordinateTop: 200, // 鎷栨嫿鍏冪礌璺濈洅瀛愰《璺濈
- // coordinateLeft: 100, // 鎷栨嫿鍏冪礌璺濈洅瀛愬乏渚ц窛绂�
- // vw: 100, // 缂╂斁鍏冪礌瀹藉害
- // vh: 100, // 缂╂斁鍏冪礌楂樺害
- // equipmentStatus: 1 // 璁惧鐘舵�� 0:鍏虫満 22:鎶ヨ 2:寰呮満 3:杩愯 寮�鏈�:1锛堟病鏈夊洓鑹茬伅鏍囪瘑褰掍负寰呮満锛�
- // }
- ], // 璁惧淇℃伅鍒楄〃
- deviceList_copy: [],
- deviceStatusList: [
- // {
- // label: '鍏ㄩ儴',
- // value: 99,
- // color: '#fff',
- // checked: true
- // },
- {
- label: '鍏虫満',
- value: 0,
- color: '#A8A8A8',
- checked: false
- },
- {
- label: '寰呮満',
- value: 2,
- color: '#FFFF00',
- checked: false
- },
- {
- label: '杩愯',
- value: 3,
- color: '#00EE00',
- checked: false
- },
- {
- label: '鎶ヨ',
- value: 22,
- color: '#FF0000',
- checked: false
- }
- ],// 璁惧鐘舵�佹寚绀虹伅鍒楄〃锛�
- windowHeight: null,// 褰撳墠娴忚鍣ㄥ彲瑙嗗尯鍩熼珮搴︼紙锛堜笉鍖呮嫭宸ュ叿鏍忋�佷功绛俱�佸簳閮ㄤ换鍔℃爮锛�
- isFullScreen: false,// 杩涘叆鐪嬫澘椤甸潰鏃舵槸鍚︿负鍏ㄥ睆妯″紡锛屼笉鍖呮嫭姝e父妯″紡杩涘叆鍚庡垏鎹负鍏ㄥ睆妯″紡
- parentLimitation: false,// 鎷栨嫿鍖哄煙鏄惁闄愬埗鍦ㄧ埗鍏冪礌鍖哄煙鍐�,
- checkedStatusCount: null,// 宸插嬀閫夌瓫閫夌姸鎬佷釜鏁�
- imgSrc: ''// 杞﹂棿鍥剧焊鍦板潃
- }
- },
- watch: {
- isSwitchChecked: {
- handler(newVal) {
- if (!newVal) {
- console.log('瀹氭椂鍣ㄥ紑鍚腑')
- this.timingAcquisition = setInterval(() => {
- this.getDeviceListByApi(this.$route.params.id)
- }, 2000)
- } else {
- console.log('鍏抽棴瀹氭椂鍣�')
- clearInterval(this.timingAcquisition)
- this.timingAcquisition = null
- }
- },
- immediate: true
- }
- },
- methods: {
- /**
- * 閫氳繃杞﹂棿Id璋冪敤鎺ュ彛鑾峰彇璁惧淇℃伅鍒楄〃
- * @param id 杞﹂棿Id
- */
- getDeviceListByApi(id) {
- console.log('閲嶆柊鍒锋柊')
- api.getDeviceListInWorkshopSignagePageApi(id).then((res) => {
- if (res.result && res.result.length > 0) {
- this.deviceList = res.result
- this.deviceList_copy = res.result
- }
- })
- },
-
- /**
- * 閫氳繃杞﹂棿Id璋冪敤鎺ュ彛鑾峰彇杞﹂棿璇︾粏淇℃伅
- * @param id 杞﹂棿Id
- */
- getWorkshopDetailsByApi(id) {
- api.getWorkshopDetailByWorkshopIdApi(id).then((res) => {
- this.workshopDetails = res.result
- // this.$refs.deviceContainerRef.style.backgroundImage = `url(${this.getImgView(
- // this.workshopDetails.backgroundImage
- // )})`
- this.imgSrc = this.getImgView(this.workshopDetails.backgroundImage)
- this.$refs.deviceContainerRef.style.height = (this.windowHeight - this.pageHeaderHeight) + 'px'
- // this.parentH = this.windowHeight - this.pageHeaderHeight
- this.parentH = 900
- this.parentLimitation = true // 鍦ㄧ埗鍏冪礌楂樺害璁剧疆鍚庡啀璁剧疆闄愬埗鎷栨嫿鍖哄煙锛屼笉杩欐牱鏈夋鐜囧鑷寸埗鍏冪礌楂樺害鏈缃氨闄愬埗鎷栨嫿
- })
- },
-
- /**
- * 鍥剧墖棰勮
- * @param text 鍥剧墖鍦板潃
- */
- getImgView(text) {
- if (text && text.indexOf(',') > 0) {
- text = text.substring(0, text.indexOf(','))
- }
- return getFileAccessHttpUrl(text)
- },
-
- /**
- * 鐐瑰嚮淇濆瓨鎸夐挳璋冪敤鎺ュ彛淇濆瓨鎷栨嫿鍚庣殑浣嶇疆涓庤澶囧浘鏍囧昂瀵�
- */
- saveDevicePositionAndSizeByApi() {
- console.log('瑙﹀彂淇濆瓨')
- if (this.isOperatingDevice) {
- api.saveDevicePositionAndSizeApi(this.deviceList).then((res) => {
- if (res.code === 200) {
- this.$notification.success({
- message: '娑堟伅',
- description: res.message
- })
- this.isOperatingDevice = false
- if (this.isSwitchChecked) {
- this.isSwitchChecked = false
- this.isResizable = !this.isResizable
- this.isDraggable = !this.isDraggable
- }
- this.getDeviceListByApi(this.$route.params.id)
- }
- })
- } else {
- this.$notification.warning({
- message: '娑堟伅',
- description: '璇峰紑鍚姛鑳藉悗鍐嶈繘琛屼繚瀛�'
- })
- }
- },
-
- /**
- * 璁惧鎷栨嫿鎴栫缉鏀炬椂瑙﹀彂浜嬩欢
- * @param newRect 鎷栨嫿鎴栫缉鏀惧悗鐨勫昂瀵稿強璺濈
- * @param index 鎷栨嫿璁惧鍦ㄦ暟缁勪腑鐨勪笅鏍�
- */
- resize(newRect, index) {
- // if (newRect.width > 100) {
- // if (newRect.width / newRect.height < 2) {
- // this.deviceList[index].fontSize = newRect.width / 10
- // } else {
- // this.deviceList[index].fontSize = newRect.height / 5
- // }
- // } else {
- // this.deviceList[index].fontSize = 12
- // }
- this.showGuideline = 'block'
- this.deviceList[index].vw = newRect.width
- this.deviceList[index].vh = newRect.height
- this.deviceList[index].coordinateTop = newRect.top
- this.deviceList[index].coordinateLeft = newRect.left
- this.guidelineXTop = newRect.top + newRect.height / 2
- this.guidelineYLeft = newRect.left + newRect.width / 2
- },
-
- /**
- * 鏍规嵁璁惧鐘舵�佸�艰幏鍙栧搴旇澶囨暟閲�
- * @param value 璁惧鐘舵�佸��
- * @returns {number} 璁惧鏁伴噺
- */
- getDeviceNumberByStatus(value) {
- if (value === 99) return this.deviceList_copy.length
- return this.deviceList_copy.filter((item) => item.equipmentStatus === value).length
- },
-
- /**
- * 寮�鍚姛鑳借Е鍙戜簨浠�
- * @param checked 褰撳墠switch鐘舵�侊紝鏄惁寮�鍚紝鍒濆涓篺alse
- */
- handleSwitchChange(checked) {
- this.isOperatingDevice = true
- this.isResizable = !this.isResizable
- this.isDraggable = !this.isDraggable
- },
-
- openDetail(item) {
- if (!this.isSwitchChecked) {
- if (item.equipmentStatus == 0) {
- this.$message.warning('璁惧澶勪簬鍏虫満鐘舵�侊紒')
- return false
- }
- console.log(item)
- console.log(this.$refs.EquipmentDetailModal)
- this.$refs.EquipmentDetailModal.initData(item.equId)
- this.$refs.EquipmentDetailModal.timerModel(item.equId)
- // this.equipMessageTimer = setInterval(() => {
- // setTimeout( this.$refs.equmentDetaiModel.initData(item.equipmentId),0)
- // },1000*10)
- }
- },
-
- /**
- * 娴忚鍣ㄥ昂瀵稿彂鐢熸敼鍙樻椂瑙﹀彂
- */
- handleWindowSizeChange() {
- // this.isFullScreen = !this.isFullScreen
- // if (!this.isFullScreen) location.reload() // 濡傛灉涓哄叏灞忔ā寮忥紝鍒欏湪鍒囨崲妯″紡鏃堕噸鏂板姞杞介〉闈互閲嶆柊鑾峰彇娴忚鍣ㄥ彲瑙嗗尯鍩熼珮搴�
- const windowHeight =
- window.innerHeight ||
- document.documentElement.clientHeight ||
- document.body.clientHeight
- // this.parentH = 99999
- // const scaleRate = windowHeight / this.windowHeight
- // this.windowHeight = windowHeight
- this.$refs.deviceContainerRef.style.height = (windowHeight - this.pageHeaderHeight) + 'px'
- // const timer = setTimeout(() => {
- // this.deviceList.forEach(item => {
- // item.coordinateTop = item.coordinateTop * scaleRate
- // item.vh = item.vh * scaleRate
- // console.log('vh', item.vh)
- // })
- // this.parentH = windowHeight - this.pageHeaderHeight
- // console.log('changeDeviceList', this.deviceList)
- // }, 500)
- // console.log('scaleRate', scaleRate)
- },
-
- checkboxChange(obj) {
- //闇�瑕佸垽鏂槸鍚﹀紑鍚姛鑳斤紝鐩殑鏄负浜嗗叧闂畾鏃跺櫒閬垮厤绛涢�夊悗璁惧琚畾鏃跺埛鏂扮殑鏂拌澶囪鐩�
- if (this.isOperatingDevice) {
- obj.checked = !obj.checked
- if (obj.value !== 99) {
- if (obj.checked) this.checkedStatusCount++
- else this.checkedStatusCount--
- }
-
- if (obj.value == 99) {
- this.deviceStatusList.forEach(item => {
- if (item.value !== obj.value) item.checked = obj.checked
- })
- if (obj.checked) {
- this.deviceList = this.deviceList_copy
- this.checkedStatusCount = this.deviceStatusList.length - 1
- } else {
- this.deviceList = []
- this.checkedStatusCount = 0
- }
- } else {
- this.deviceStatusList.forEach(item => {
- if (item.value === 99) {
- if (this.checkedStatusCount !== this.deviceStatusList.length - 1 || this.checkedStatusCount === 0) item.checked = false
- if (this.checkedStatusCount === this.deviceStatusList.length - 1) item.checked = true
- }
- })
- if (obj.checked) {
- this.deviceList.push(...this.deviceList_copy.filter(item => item.equipmentStatus === obj.value))
- } else {
- this.deviceList = this.deviceList.filter(item => item.equipmentStatus !== obj.value)
- }
- }
- } else {
- this.$notification.warning({
- message: '娑堟伅',
- description: '璇峰紑鍚姛鑳藉悗鍐嶈繘琛岀瓫閫�'
- })
- }
- },
-
- handleScreenDevive(obj) {
- //闇�瑕佸垽鏂槸鍚﹀紑鍚姛鑳斤紝鐩殑鏄负浜嗗叧闂畾鏃跺櫒閬垮厤绛涢�夊悗璁惧琚畾鏃跺埛鏂扮殑鏂拌澶囪鐩�
- if (this.isOperatingDevice) {
- obj.checked = true
- this.deviceList = this.deviceList_copy
- this.deviceStatusList.forEach(item => {
- if (item.value !== obj.value) item.checked = false
- })
-
- if (obj.value == 99) this.deviceList = this.deviceList_copy
- else this.deviceList = this.deviceList.filter(item => item.equipmentStatus === obj.value)
-
- } else {
- this.$notification.warning({
- message: '娑堟伅',
- description: '璇峰紑鍚姛鑳藉悗鍐嶈繘琛岀瓫閫�'
- })
- }
- }
- },
- created() {
- if (this.$route.params.id) {
- this.getDeviceListByApi(this.$route.params.id)
- this.getWorkshopDetailsByApi(this.$route.params.id)
- }
- this.checkedStatusCount = this.deviceStatusList.length - 1
- },
- mounted() {
- // 绂佹鐢ㄦ埛閫変腑鍐呭
- document.onselectstart = () => false
-
- this.windowHeight =
- window.innerHeight ||
- document.documentElement.clientHeight ||
- document.body.clientHeight
-
- // 鍒ゆ柇娴忚鍣ㄥ彲瑙嗗尯鍩熼珮搴︽槸鍚︾瓑浜庡垎杈ㄧ巼锛岃嫢鐩哥瓑鍒欒〃绀鸿繘鍏ユ椂娴忚鍣ㄤ负鍏ㄥ睆妯″紡
- // if (this.windowHeight === screen.height) this.isFullScreen = true
-
- window.addEventListener('resize', this.handleWindowSizeChange)
- },
- beforeDestroy() {
- // 纭繚閿�姣佸畾鏃跺櫒銆佷簨浠跺強鍥炴敹璧勬簮
- clearInterval(this.timingAcquisition)
- this.timingAcquisition = null
- }
- }
-</script>
-
-<style scoped lang="less">
- .full-screen-container {
- background-image: url('../../../assets/Bj.jpg');
- background-size: 100% 100%;
- color: #fff;
-
- .page-header {
- /*font-size: 50px;*/
- /*text-align: center;*/
- /*position: relative;*/
-
- .header-left {
- height: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- padding-top: 20px;
- }
-
- .workshop-name {
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 50px;
- }
-
- .device-status-info {
- height: 100%;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- padding-top: 20px;
-
- .single-status-info {
- margin: 10px;
- cursor: pointer;
-
- .status-square {
- width: 14px;
- height: 14px;
- border: 1px solid #fff;
- border-radius: 3px;
- }
- }
- }
- }
-
- .content-container {
- width: 100%;
- background-repeat: no-repeat;
- background-size: 100% 100%;
- position: relative;
-
- .guideline {
- position: absolute;
- border: 1px dashed #ccc;
- }
-
- .guidelineX {
- width: 1920px;
- left: 0;
- }
-
- .guidelineY {
- top: 0;
- height: 900px;
- }
-
- .single-device {
- position: absolute;
- border: 1px solid transparent;
- padding: 10px;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: space-between;
- cursor: default;
-
- &:active {
- border: 1px solid #1890ff;
- }
-
- .device-status {
- width: 100%;
- height: 100%;
- display: flex;
- -webkit-align-items: flex-end;
- -moz-align-items: flex-end;
- -ms-align-items: flex-end;
-
- .status-image {
- background-size: 100% 100%;
- background-repeat: no-repeat;
- width: 10px;
- height: 60%;
- margin-right: 5px;
- }
-
- .device-image {
- background-size: 100% 100%;
- background-repeat: no-repeat;
- width: 100%;
- height: 100%;
- }
- }
- }
- }
- }
-
- /deep/ .ant-checkbox-inner {
- background-color: transparent;
- border-color: #fff;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/StatisticalAnalysis.vue b/src/views/mdc/base/StatisticalAnalysis.vue
deleted file mode 100644
index c5b8308..0000000
--- a/src/views/mdc/base/StatisticalAnalysis.vue
+++ /dev/null
@@ -1,45 +0,0 @@
-<template>
- <a-card :bordered="false">
- <div style="width: 100%; height: 100%;overflow: hidden">
- <a-row type="flex" :gutter="16">
- <a-col :md="5" :sm="24">
- <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
- </a-col>
- <a-col :md="24-5" :sm="24">
- <statistical-analysis-main :equip="selectEquementnode"></statistical-analysis-main>
- </a-col>
- </a-row>
- </div>
- </a-card>
-</template>
-
-<script>
- import BaseTree from '../common/BaseTree'
- import StatisticalAnalysisMain from './modules/StatisticalAnalysis/StatisticalAnalysisMain'
- export default {
- name: 'StatisticalAnalysis',
- components:{
- BaseTree,
- StatisticalAnalysisMain
- },
- data() {
- return {
- description: '璁惧淇℃伅',
- selectEquementnode:{},
- equipmentStatisticsInfo:{},
- url:{
- equipmentStatistics:"/mdc/equipment/equipmentStatistics"
- }
- }
- },
- methods: {
- changeSelectionNode(val){
- this.selectEquementnode = val
- }
- }
- }
-</script>
-
-<style scoped>
-
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/StatisticsChart.vue b/src/views/mdc/base/StatisticsChart.vue
deleted file mode 100644
index ddea5ef..0000000
--- a/src/views/mdc/base/StatisticsChart.vue
+++ /dev/null
@@ -1,45 +0,0 @@
-<template>
- <a-card :bordered="false">
- <div style="width: 100%; height: 100%;overflow: hidden">
- <a-row type="flex" :gutter="16">
- <a-col :md="5" :sm="24">
- <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
- </a-col>
- <a-col :md="24-5" :sm="24">
- <statistics-legend :equip="selectEquementnode"></statistics-legend>
- </a-col>
- </a-row>
- </div>
- </a-card>
-</template>
-
-<script>
- import BaseTree from '../common/BaseTree'
- import StatisticsLegend from './modules/StatisticsChart/StatisticsLegend'
- export default {
- name: 'StatisticsChart',
- components:{
- BaseTree,
- StatisticsLegend
- },
- data() {
- return {
- description: '璁惧淇℃伅',
- selectEquementnode:{},
- equipmentStatisticsInfo:{},
- url:{
- equipmentStatistics:"/mdc/equipment/equipmentStatistics"
- }
- }
- },
- methods: {
- changeSelectionNode(val){
- this.selectEquementnode = val
- }
- }
- }
-</script>
-
-<style scoped>
-
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/Torqueconfiguration.vue b/src/views/mdc/base/Torqueconfiguration.vue
deleted file mode 100644
index be23e7e..0000000
--- a/src/views/mdc/base/Torqueconfiguration.vue
+++ /dev/null
@@ -1,139 +0,0 @@
-<template>
- <div style="width: 100%; height: 100%;">
- <a-card :bordered="false">
- <a-row type="flex" :gutter="16">
- <a-col :md="5">
- <a-tabs :activeKey="activeKey" @change="tabChange">
- <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render>
- <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
- </a-tab-pane>
- <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">,
- <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree>
- </a-tab-pane>
- </a-tabs>
- </a-col>
- <a-col :md="19">
- <torqueconfiguration-list ref="TorqueconfigurationList" :nodePeople='selectPeople' :nodeTree = 'selectEquement' :Type="slectTypeTree"></torqueconfiguration-list>
- </a-col>
- </a-row>
- </a-card>
- </div>
-
-</template>
-
-<script>
- import { putAction, getAction } from '@/api/manage'
- import { frozenBatch } from '@/api/api'
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import JInput from '@/components/jeecg/JInput'
- import BaseTree from '../common/BaseTree'
- import TorqueconfigurationList from './modules/TorqueconfigurationList/TorqueconfigurationList'
- import JSuperQuery from '@/components/jeecg/JSuperQuery'
- import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton'
- import DepartTree from './modules/DepartList/DepartListTree/DepartTree'
- import {mapActions} from 'vuex'
- export default {
- name: 'Torqueconfiguration',
- components: {
- JThirdAppButton,
- JInput,
- BaseTree,
- JSuperQuery,
- DepartTree,
- TorqueconfigurationList
- },
- data() {
- return {
- activeKey: '1',
- description: '璁惧淇℃伅',
- selectEquementId: '',
- selectEquement: {},
- selectPeople:{},
- slectTypeTree:"",
- url: {
- equipmentStatistics: '/mdc/equipment/equipmentStatistics'
- },
- isDepartType:'',
- }
- },
- created() {
- this.queryTreeData()
- },
- methods: {
- ...mapActions(['QueryDepartTree']),
- queryTreeData() {
- this.QueryDepartTree().then(res => {
- if (res.success) {
- this.isDepartType = res.result[0].value
- } else {
- // this.$message.warn(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() =>{
- })
- },
- tabChange(val) {
- // console.log(val);
- this.activeKey = val
- this.slectTypeTree = val
- },
- // changeSelection(val) {
- // this.selectEquementId = val
- // this.$refs.efficiencyList.pQuery(val)
- // this.$refs.efficiencyList.searchQuery()
- // },
- changeSelectionNode(val) {
- this.selectEquement = val
- this.slectTypeTree = "1"
- },
- changeSelectionNodedd(val) {
- this.selectPeople = val
- this.slectTypeTree = "2"
- }
- }
-
- }
-</script>
-<style scoped>
- @import '~@assets/less/common.less';
-
- .equipMessage {
- width: 100%;
- height: 10%;
- }
-
- .equipMessage table {
- width: 60%;
- height: 100%;
- line-height: 50%;
- }
-
- .equipMessage table td {
- text-align: center;
- }
-
- .equipMessage table td span {
- display: inline-block;
- width: 15px;
- height: 15px;
- }
-
- .equipMessage table td .equipShutdown {
- background-color: #808080;
- }
-
- .equipMessage table td .equipStandby {
- background-color: #ffbf37;
- }
-
- .equipMessage table td .equipRun {
- background-color: #19FE01;
- }
-
- .equipMessage table td .equipAlarm {
- background-color: #FD0008;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/WorkshopSignageEntrance.vue b/src/views/mdc/base/WorkshopSignageEntrance.vue
deleted file mode 100644
index 05b5f38..0000000
--- a/src/views/mdc/base/WorkshopSignageEntrance.vue
+++ /dev/null
@@ -1,69 +0,0 @@
-<template>
- <div class="page-container">
- <a-list
- :grid="{ gutter: [{xs: 0, sm: 24, md: 24, lg: 56, xl: 64, xxl: 80},20], xs: 1, sm: 2, md: 2, lg: 3, xl: 4, xxl: 4 }"
- :data-source="workshopList">
- <a-list-item slot="renderItem" slot-scope="item, index">
- <div class="workshop-name" @click="navigateToWorkshopSignage(item.id)">{{item.workshopName}}</div>
- </a-list-item>
- </a-list>
- </div>
-</template>
-
-<script>
- import api from '@/api/mdc'
-
- export default {
- name: 'WorkshopSignageEntrance',
- data() {
- return {
- indexStyle: 1,
- workshopList: []
- }
- },
- created() {
- this.getWorkshopListByApi()
- },
- methods: {
- /**
- * 閫氳繃杞﹂棿Id璺宠浆鑷崇浉搴旇溅闂村ぇ灞忕湅鏉�
- * @param id 杞﹂棿Id
- */
- navigateToWorkshopSignage(id) {
- const url = this.$router.resolve(`/MdcWorkshopSignage/${id}`).href
- window.open(url, '_blank')
- },
- /**
- * 鑾峰彇杞﹂棿鍒楄〃
- */
- getWorkshopListByApi() {
- api.getWorkshopListInHomePageApi().then(res => {
- console.log('res', res)
- if (res.result && res.result.length > 0) {
- this.workshopList = res.result
- }
- })
- }
- }
- }
-</script>
-
-<style lang="less" scoped>
- .page-container {
- padding: 30px 30px 0;
-
- .workshop-name {
- width: 100%;
- background: #fff;
- padding: 55px 0;
- border-radius: 20px;
- text-align: center;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-size: 30px;
- cursor: pointer;
- }
- }
-
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/alarmAnalysis.vue b/src/views/mdc/base/alarmAnalysis.vue
deleted file mode 100644
index ba83a02..0000000
--- a/src/views/mdc/base/alarmAnalysis.vue
+++ /dev/null
@@ -1,139 +0,0 @@
-<template>
- <div style="width: 100%; height: 100%;">
- <a-card :bordered="false">
- <a-row type="flex" :gutter="16">
- <a-col :md="5">
- <a-tabs :activeKey="activeKey" @change="tabChange">
- <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render>
- <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
- </a-tab-pane>
- <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">,
- <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree>
- </a-tab-pane>
- </a-tabs>
- </a-col>
- <a-col :md="19">
- <alarm-analysis-main ref="alarmAnalysisMain" :nodePeople='selectPeople' :nodeTree = 'selectEquement' :Type="slectTypeTree"></alarm-analysis-main>
- </a-col>
- </a-row>
- </a-card>
- </div>
-
-</template>
-
-<script>
- import { putAction, getAction } from '@/api/manage'
- import { frozenBatch } from '@/api/api'
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import JInput from '@/components/jeecg/JInput'
- import BaseTree from '../common/BaseTree'
- import alarmAnalysisMain from './modules/alarmAnalysis/alarmAnalysisMain'
- import JSuperQuery from '@/components/jeecg/JSuperQuery'
- import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton'
- import DepartTree from './modules/DepartList/DepartListTree/DepartTree'
- import {mapActions} from 'vuex'
- export default {
- name: 'alarmAnalysis',
- components: {
- JThirdAppButton,
- JInput,
- BaseTree,
- JSuperQuery,
- DepartTree,
- alarmAnalysisMain
- },
- data() {
- return {
- activeKey: '1',
- description: '璁惧淇℃伅',
- selectEquementId: '',
- selectEquement: {},
- selectPeople:{},
- slectTypeTree:"",
- url: {
- equipmentStatistics: '/mdc/equipment/equipmentStatistics'
- },
- isDepartType:'',
- }
- },
- created() {
- this.queryTreeData()
- },
- methods: {
- ...mapActions(['QueryDepartTree']),
- queryTreeData() {
- this.QueryDepartTree().then(res => {
- if (res.success) {
- this.isDepartType = res.result[0].value
- } else {
- // this.$message.warn(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() =>{
- })
- },
- tabChange(val) {
- // console.log(val);
- this.activeKey = val
- this.slectTypeTree = val
- },
- // changeSelection(val) {
- // this.selectEquementId = val
- // this.$refs.efficiencyList.pQuery(val)
- // this.$refs.efficiencyList.searchQuery()
- // },
- changeSelectionNode(val) {
- this.selectEquement = val
- this.slectTypeTree = "1"
- },
- changeSelectionNodedd(val) {
- this.selectPeople = val
- this.slectTypeTree = "2"
- }
- }
-
- }
-</script>
-<style scoped>
- @import '~@assets/less/common.less';
-
- .equipMessage {
- width: 100%;
- height: 10%;
- }
-
- .equipMessage table {
- width: 60%;
- height: 100%;
- line-height: 50%;
- }
-
- .equipMessage table td {
- text-align: center;
- }
-
- .equipMessage table td span {
- display: inline-block;
- width: 15px;
- height: 15px;
- }
-
- .equipMessage table td .equipShutdown {
- background-color: #808080;
- }
-
- .equipMessage table td .equipStandby {
- background-color: #ffbf37;
- }
-
- .equipMessage table td .equipRun {
- background-color: #19FE01;
- }
-
- .equipMessage table td .equipAlarm {
- background-color: #FD0008;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/equipmentAvailCompare.vue b/src/views/mdc/base/equipmentAvailCompare.vue
deleted file mode 100644
index 53ec061..0000000
--- a/src/views/mdc/base/equipmentAvailCompare.vue
+++ /dev/null
@@ -1,84 +0,0 @@
-<template>
- <a-card :bordered="false">
- <div style="width: 100%; height: 100%;overflow: hidden">
- <a-row type="flex" :gutter="16">
- <a-col :md="5">
- <a-tabs :activeKey="activeKey" @change="tabChange">
- <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render>
- <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
- </a-tab-pane>
- <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">
- <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree>
- </a-tab-pane>
- </a-tabs>
- </a-col>
- <a-col :md="24-5" :sm="24">
- <equipment-avail-compare-main ref="equipmentDayAvailMain" :nodeTree='selectEquipment'
- :nodePeople='selectPeople'
- :Type="selectTypeTree"></equipment-avail-compare-main>
- </a-col>
- </a-row>
- </div>
- </a-card>
-</template>
-
-<script>
- import BaseTree from '../common/BaseTree'
- import EquipmentAvailCompareMain from './modules/EquipmentAvailCompare/EquipmentAvailCompareMain'
- import DepartTree from './modules/DepartList/DepartListTree/DepartTree'
- import { mapActions } from 'vuex'
-
- export default {
- name: 'EquipmentAvailCompare',
- components: {
- BaseTree,
- EquipmentAvailCompareMain,
- DepartTree
- },
- data() {
- return {
- activeKey: '1',
- description: '璁惧淇℃伅',
- selectEquipmentId: '',
- selectEquipment: {},
- selectPeople: {},
- selectTypeTree: '',
- url: {
- equipmentStatistics: '/mdc/equipment/equipmentStatistics'
- },
- isDepartType: ''
- }
- },
- created() {
- this.queryTreeData()
- },
- methods: {
- ...mapActions(['QueryDepartTree']),
- queryTreeData() {
- this.QueryDepartTree().then(res => {
- if (res.success) {
- this.isDepartType = res.result[0].value
- } else {
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- })
- },
- tabChange(val) {
- this.activeKey = val
- this.selectTypeTree = val
- },
- changeSelectionNode(val) {
- this.selectEquipment = val
- this.selectTypeTree = '1'
- },
- changeSelectionNodedd(val) {
- this.selectPeople = val
- this.selectTypeTree = '2'
- }
- }
- }
-</script>
diff --git a/src/views/mdc/base/equipmentDayAvail.vue b/src/views/mdc/base/equipmentDayAvail.vue
deleted file mode 100644
index 02baad8..0000000
--- a/src/views/mdc/base/equipmentDayAvail.vue
+++ /dev/null
@@ -1,88 +0,0 @@
-<template>
- <a-card :bordered="false">
- <div style="width: 100%; height: 100%;overflow: hidden">
- <a-row type="flex" :gutter="16">
- <a-col :md="5">
- <a-tabs :activeKey="activeKey" @change="tabChange">
- <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render>
- <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
- </a-tab-pane>
- <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">
- <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree>
- </a-tab-pane>
- </a-tabs>
- </a-col>
- <a-col :md="24-5" :sm="24">
- <equipment-day-avail-main ref="equipmentDayAvailMain" :nodeTree='selectEquipment' :nodePeople='selectPeople' :Type="selectTypeTree"></equipment-day-avail-main>
- </a-col>
- </a-row>
- </div>
- </a-card>
-</template>
-
-<script>
- import BaseTree from '../common/BaseTree'
- import EquipmentDayAvailMain from './modules/EquipmentDayAvail/EquipmentDayAvailMain'
- import DepartTree from './modules/DepartList/DepartListTree/DepartTree'
- import {mapActions} from 'vuex'
-
- export default {
- name: 'EquipmentDayAvail',
- components:{
- BaseTree,
- EquipmentDayAvailMain,
- DepartTree
- },
- data() {
- return {
- activeKey: '1',
- description: '璁惧淇℃伅',
- selectEquipmentId: '',
- selectEquipment: {},
- selectPeople:{},
- selectTypeTree: '',
- url: {
- equipmentStatistics: '/mdc/equipment/equipmentStatistics'
- },
- isDepartType:'',
- }
- },
- created() {
- this.queryTreeData()
- },
- methods: {
- ...mapActions(['QueryDepartTree']),
- queryTreeData() {
- this.QueryDepartTree().then(res => {
- if (res.success) {
- this.isDepartType = res.result[0].value
- } else {
- // this.$message.warn(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() =>{
- })
- },
- tabChange(val) {
- // console.log(val)
- this.activeKey = val
- this.selectTypeTree = val
- },
- changeSelectionNode(val) {
- this.selectEquipment = val
- this.selectTypeTree = '1'
- },
- changeSelectionNodedd(val) {
- this.selectPeople = val
- this.selectTypeTree = '2'
- }
- }
- }
-</script>
-
-<style scoped>
-
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/DepartList/DepartAuthModal.vue b/src/views/mdc/base/modules/DepartList/DepartAuthModal.vue
deleted file mode 100644
index d629a37..0000000
--- a/src/views/mdc/base/modules/DepartList/DepartAuthModal.vue
+++ /dev/null
@@ -1,200 +0,0 @@
-<template>
- <a-card :bordered="false">
- <template v-if="this.departId">
- <a-spin :spinning="loading">
- <a-form>
- <a-form-item label='鎵�鎷ユ湁鐨勬潈闄�'>
- <a-tree
- checkable
- @check="onCheck"
- :checkedKeys="checkedKeys"
- :treeData="treeData"
- @expand="onExpand"
- @select="onTreeNodeSelect"
- :selectedKeys="selectedKeys"
- :expandedKeys="expandedKeysss"
- :checkStrictly="checkStrictly"
- style="height:500px;overflow: auto;">
- <span slot="hasDatarule" slot-scope="{slotTitle,ruleFlag}">
- {{ slotTitle }}
- <a-icon v-if="ruleFlag" type="align-left" style="margin-left:5px;color: red;"></a-icon>
- </span>
- </a-tree>
- </a-form-item>
- </a-form>
- </a-spin>
- <div class="anty-form-btn">
- <a-dropdown style="float: left" :trigger="['click']" placement="topCenter">
- <a-menu slot="overlay">
- <!-- 绠�鍖朤ree閫昏緫锛屼娇鐢ㄩ粯璁heckStrictly涓篺alse鐨勮涓猴紝鍗抽粯璁ょ埗瀛愬叧鑱�
- <a-menu-item key="1" @click="switchCheckStrictly(1)">鐖跺瓙鍏宠仈</a-menu-item>
- <a-menu-item key="2" @click="switchCheckStrictly(2)">鍙栨秷鍏宠仈</a-menu-item>
- -->
- <a-menu-item key="3" @click="checkALL">鍏ㄩ儴鍕鹃��</a-menu-item>
- <a-menu-item key="4" @click="cancelCheckALL">鍙栨秷鍏ㄩ��</a-menu-item>
- <a-menu-item key="5" @click="expandAll">灞曞紑鎵�鏈�</a-menu-item>
- <a-menu-item key="6" @click="closeAll">鍚堝苟鎵�鏈�</a-menu-item>
- </a-menu>
- <a-button>
- 鏍戞搷浣� <a-icon type="up" />
- </a-button>
- </a-dropdown>
- <a-button style="float: right" @click="handleSubmit" type="primary" htmlType="button" icon="form">淇濆瓨</a-button>
- </div>
- </template>
- <a-card v-else :bordered="false" style="height:200px">
- <a-empty>
- <span slot="description"> 璇峰厛閫夋嫨涓�涓儴闂�! </span>
- </a-empty>
- </a-card>
- <depart-datarule-modal ref="datarule"/>
- </a-card>
-</template>
-
-<script>
- import {queryTreeListForRole,queryDepartPermission,saveDepartPermission} from '@/api/api'
- import DepartDataruleModal from './DepartDataruleModal'
-
- export default {
- name: 'DepartAuthModal',
- components: { DepartDataruleModal },
- data(){
- return {
- departId:"",
- treeData: [],
- defaultCheckedKeys:[],
- checkedKeys:[],
- halfCheckedKeys:[],
- expandedKeysss:[],
- allTreeKeys:[],
- autoExpandParent: true,
- checkStrictly: false,
- title:"閮ㄩ棬鏉冮檺閰嶇疆",
- visible: false,
- loading: false,
- selectedKeys:[]
- }
- },
- methods: {
- onTreeNodeSelect(id){
- if(id && id.length>0){
- this.selectedKeys = id
- }
- this.$refs.datarule.show(this.selectedKeys[0],this.departId)
- },
- onCheck (checkedKeys, { halfCheckedKeys }) {
- // 淇濆瓨閫変腑鐨勫拰鍗婇�変腑鐨勶紝鍚庨潰淇濆瓨鐨勬椂鍊欏悎骞舵彁浜�
- this.checkedKeys = checkedKeys
- this.halfCheckedKeys = halfCheckedKeys
- },
- show(departId){
- this.departId=departId
- this.loadData();
- },
- close () {
- this.reset()
- this.$emit('close');
- this.visible = false;
- },
- onExpand(expandedKeys){
- this.expandedKeysss = expandedKeys;
- this.autoExpandParent = false
- },
- reset () {
- this.expandedKeysss = []
- this.checkedKeys = []
- this.defaultCheckedKeys = []
- this.loading = false
- },
- expandAll () {
- this.expandedKeysss = this.allTreeKeys
- },
- closeAll () {
- this.expandedKeysss = []
- },
- checkALL () {
- this.checkedKeys = this.allTreeKeys
- },
- cancelCheckALL () {
- this.checkedKeys = []
- },
- handleCancel () {
- this.close()
- },
- handleSubmit() {
- let that = this;
- if(!that.departId){
- this.$message.warning('璇风偣鍑婚�夋嫨涓�涓儴闂�!')
- }
- let checkedKeys = [...that.checkedKeys, ...that.halfCheckedKeys]
- const permissionIds = checkedKeys.join(",")
- let params = {
- departId:that.departId,
- permissionIds,
- lastpermissionIds:that.defaultCheckedKeys.join(","),
- };
- that.loading = true;
- saveDepartPermission(params).then((res)=>{
- if(res.success){
- // that.$message.success(res.message);
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- that.loading = false;
- that.loadData();
- }else {
- // that.$message.error(res.message);
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- that.loading = false;
- }
- })
- },
- convertTreeListToKeyLeafPairs(treeList, keyLeafPair = []) {
- for(const {key, isLeaf, children} of treeList) {
- keyLeafPair.push({key, isLeaf})
- if(children && children.length > 0) {
- this.convertTreeListToKeyLeafPairs(children, keyLeafPair)
- }
- }
- return keyLeafPair;
- },
- emptyCurrForm() {
- this.form.resetFields()
- },
- loadData(){
- this.loading = true;
- queryTreeListForRole().then((res) => {
- this.treeData = res.result.treeList
- this.allTreeKeys = res.result.ids
- const keyLeafPairs = this.convertTreeListToKeyLeafPairs(this.treeData)
- queryDepartPermission({departId:this.departId}).then((res)=>{
- // 杩囨护鍑� leaf node 鍗冲彲锛屽嵆閫変腑鐨�
- // Tree缁勪欢涓璫heckStrictly榛樿涓篺alse鐨勬椂鍊欙紝閫変腑瀛愯妭鐐癸紝鐖惰妭鐐逛細鑷姩璁剧疆閫変腑鎴栧崐閫変腑
- // 淇濆瓨 checkedKeys 浠ュ強 halfCheckedKeys 浠ヤ究浜庢湭鍋氫换浣曟搷浣滄椂鎻愪氦琛ㄥ崟鏁版嵁
- const checkedKeys = [...res.result].filter(key => {
- const keyLeafPair = keyLeafPairs.filter(item => item.key === key)[0]
- return keyLeafPair && keyLeafPair.isLeaf
- })
- const halfCheckedKeys = [...res.result].filter(key => {
- const keyLeafPair = keyLeafPairs.filter(item => item.key === key)[0]
- return keyLeafPair && !keyLeafPair.isLeaf
- })
- this.checkedKeys = [...checkedKeys];
- this.halfCheckedKeys = [...halfCheckedKeys]
- this.defaultCheckedKeys = [...halfCheckedKeys, ...checkedKeys];
- this.expandedKeysss = this.allTreeKeys;
- this.loading = false;
- })
- })
- }
- },
- }
-</script>
-
-<style scoped>
-
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/DepartList/DepartDataruleModal.vue b/src/views/mdc/base/modules/DepartList/DepartDataruleModal.vue
deleted file mode 100644
index b43f9d0..0000000
--- a/src/views/mdc/base/modules/DepartList/DepartDataruleModal.vue
+++ /dev/null
@@ -1,124 +0,0 @@
-<template>
- <a-drawer
- title="鏁版嵁瑙勫垯/鎸夐挳鏉冮檺閰嶇疆"
- width="365"
- :closable="false"
- @close="onClose"
- :visible="visible"
- >
- <a-tabs defaultActiveKey="1">
- <a-tab-pane tab="鏁版嵁瑙勫垯" key="1">
-
- <a-checkbox-group v-model="dataruleChecked" v-if="dataruleList.length>0">
- <a-row>
- <a-col :span="24" v-for="(item,index) in dataruleList" :key=" 'dr'+index ">
- <a-checkbox :value="item.id">{{ item.ruleName }}</a-checkbox>
- </a-col>
-
- <a-col :span="24">
- <div style="width: 100%;margin-top: 15px">
- <a-button @click="saveDataruleForRole" type="primary" size="small" icon="save">鐐瑰嚮淇濆瓨</a-button>
- </div>
- </a-col>
- </a-row>
- </a-checkbox-group>
- <div v-else><h3>鏃犻厤缃俊鎭�!</h3></div>
-
- </a-tab-pane>
- </a-tabs>
-
- </a-drawer>
-</template>
-
-<script>
- import ARow from 'ant-design-vue/es/grid/Row'
- import ACol from 'ant-design-vue/es/grid/Col'
- import { getAction,postAction } from '@/api/manage'
-
- export default {
- name: 'DepartDataruleModal',
- components: { ACol, ARow },
- data(){
- return {
- functionId:'',
- departId:'',
- visible:false,
- tabList: [{
- key: '1',
- tab: '鏁版嵁瑙勫垯',
- }, {
- key: '2',
- tab: '鎸夐挳鏉冮檺',
- }],
- activeTabKey: '1',
- url:{
- datarule:"/sys/sysDepartPermission/datarule",
- },
- dataruleList:[],
- dataruleChecked:[]
- }
- },
- methods:{
- loadData(){
- getAction(`${this.url.datarule}/${this.functionId}/${this.departId}`).then(res=>{
- if(res.success){
- this.dataruleList = res.result.datarule
- let drChecked = res.result.drChecked
- if(drChecked){
- this.dataruleChecked = drChecked.split(",")
- }
- }
- })
- },
- saveDataruleForRole(){
- if(!this.dataruleChecked || this.dataruleChecked.length==0){
- this.$message.warning("璇锋敞鎰忥紝鐜版湭鍕鹃�変换浣曟暟鎹潈闄�!")
- }
- let params = {
- permissionId:this.functionId,
- departId:this.departId,
- dataRuleIds:this.dataruleChecked.join(",")
- }
- postAction(this.url.datarule,params).then(res=>{
- if(res.success){
- // this.$message.success(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }else{
- // this.$message.error(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- })
- },
- show(functionId,departId){
- this.onReset()
- this.functionId = functionId
- this.departId = departId
- this.visible=true
- this.loadData()
- },
- onClose(){
- this.visible=false
- this.onReset()
- },
- onTabChange (key) {
- this.activeTabKey = key
- },
- onReset(){
- this.functionId=''
- this.departId=''
- this.dataruleList=[]
- this.dataruleChecked=[]
- }
- }
- }
-</script>
-
-<style scoped>
-
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/DepartList/DepartEquipment.vue b/src/views/mdc/base/modules/DepartList/DepartEquipment.vue
deleted file mode 100644
index 94aa7db..0000000
--- a/src/views/mdc/base/modules/DepartList/DepartEquipment.vue
+++ /dev/null
@@ -1,13 +0,0 @@
-<template>
- <div>鍒楄〃淇℃伅</div>
-</template>
-
-<script>
- export default {
- name: 'DepartEquipment'
- }
-</script>
-
-<style scoped>
-
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/DepartList/DepartListContent/DepartList.vue b/src/views/mdc/base/modules/DepartList/DepartListContent/DepartList.vue
deleted file mode 100644
index b35b021..0000000
--- a/src/views/mdc/base/modules/DepartList/DepartListContent/DepartList.vue
+++ /dev/null
@@ -1,622 +0,0 @@
-<template>
- <div class="device_list">
- <a-row>
- <a-col :md="leftColMd" :sm="24">
- <a-card :bordered="false">
-
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator">
- <a-button @click="handleAddTier" type="primary" icon="plus">鏂板閮ㄩ棬
- </a-button>
- <!--<a-button @click="handleAdd" type="primary" icon="plus">鏂板浜哄憳-->
- <!--</a-button>-->
- <!--<a-button @click="handleEdit" v-if="selectedRowKeys.length ==1" icon="edit">缂栬緫-->
- <!--</a-button>-->
- <a-button @click="deviceSearch" v-if="selectedRowKeys.length ==1" type="primary" icon="search">閫夋嫨璁惧
- </a-button>
- <!--<a-button @click="batchDelll" v-if="selectedRowKeys.length >0" icon="delete">鍒犻櫎-->
- <!--</a-button>-->
- </div>
- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
- <i class="anticon anticon-info-circle ant-alert-icon">
- </i> 宸查�夋嫨 <a><b>{{ selectedRowKeys.length }}</b></a>椤�
- <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>
- </div>
-
- <!-- table鍖哄煙-begin -->
- <div>
- <a-table ref="table" bordered size="middle" rowKey="id" :columns="columns"
- :scroll="{x: 400}" :dataSource="dataSource" :pagination="ipagination" :loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}"
- @change="handleTableChange">
- <span slot="action" slot-scope="text, record">
- <a @click="handleEdit(record)">缂栬緫</a>
- <a-divider type="vertical"/>
- <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
- <a>鍒犻櫎</a>
- </a-popconfirm>
- </span>
-
- <!--瀛楃涓茶秴闀挎埅鍙栫渷鐣ュ彿鏄剧ず-->
- <span slot="num" slot-scope="text" style="font-weight: bold">
- <j-ellipsis :value="text" :length="8"/>
- </span>
- <span slot="name" slot-scope="text" style="font-weight: bold">
- <j-ellipsis :value="text" :length="8"/>
- </span>
- <span slot="model" slot-scope="text" style="font-weight: bold">
- <j-ellipsis :value="text" :length="8"/>
- </span>
- </a-table>
- </div>
- <!-- table鍖哄煙-end -->
- <depart-model ref="modalForm" @ok="modalFormOk"></depart-model>
- <tier-model ref="tierModalForm" @ok="modalFormOk"></tier-model>
- <depart-list-seach-list ref="seachModalForm" @ok="modalFormOk" @sendSelectionRows="getDeviceRows"></depart-list-seach-list>
- </a-card>
- </a-col>
- <a-col :md="rightColMd" :sm="24" v-if="selectedRowKeys.length == 1">
- <a-table
- ref="table2"
- bordered
- size="middle"
- rowKey="id"
- :columns="columns2"
- :dataSource="dataSource2"
- :pagination="ipagination2"
- :loading="loading2"
- @change="handleTableChange2">
- <span slot="action" slot-scope="text, record">
- <!--<a @click="handleEdit(record)">缂栬緫</a>-->
- <!--<a-divider type="vertical"/>-->
- <a-popconfirm title="纭畾绉婚櫎鍚�?" @confirm="() => handleDeleteZi(record.id)">
- <a>绉婚櫎</a>
- </a-popconfirm>
- </span>
- </a-table>
-
- </a-col>
- </a-row>
- </div>
-
-
-</template>
-
-<script>
- import JDictSelectTag from '@/components/dict/JDictSelectTag'
- import {
- requestPut,
- deleteAction,
- getAction,
- postAction,
- putAction
- } from '@/api/manage'
- import DepartModel from './DepartModel'
- import TierModel from './TierModel'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
- import JInput from '@/components/jeecg/JInput'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import Tooltip from 'ant-design-vue/es/tooltip'
- import DepartListSeachList from './DepartListSeachList'
- import { filterObj } from '@/utils/util'
- export default {
- name: 'DepartList',
- mixins: [JeecgListMixin],
- components: {
- Tooltip,
- DepartModel,
- TierModel,
- DepartListSeachList,
- JDictSelectTag,
- JInput,
- JEllipsis
- },
- props: { node: '' },
- data() {
- return {
- sectionId:"",
- queryParam: {},
- dataStartsoucre:[],
- columns: [
- // {
- // title: '灞傜骇缂栫爜',
- // align: 'center',
- // dataIndex: 'sectionNumber'
- // },
- {
- title: '鍚嶇О',
- align: 'center',
- dataIndex: 'sectionName'
- },
- // {
- // title: '鐖剁骇',
- // align: 'center',
- // dataIndex: 'parentId'
- // },
- // {
- // title: '灞傜骇',
- // align: 'center',
- // dataIndex: 'sectionRank'
- // },
- {
- title: '鎺掑簭',
- align: 'center',
- dataIndex: 'sortNo'
- },
- {
- title: '鎿嶄綔',
- dataIndex: 'action',
- scopedSlots: {customRender: 'action'},
- align: "center",
- width: 150
- }
- ],
- dataSource2:[],
- ipagination2: {
- current: 1,
- pageSize: 10,
- pageSizeOptions: ['10', '20', '30'],
- showTotal: (total, range) => {
- return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�'
- },
- showQuickJumper: true,
- showSizeChanger: true,
- total: 0
- },
- isorter2: {
- column: 'createTime',
- order: 'desc'
- },
- filters2: {},
- loading2: false,
- columns2: [
- {
- title: '#',
- dataIndex: '',
- key: 'rowIndex',
- width: 60,
- align: "center",
- customRender: function (t, r, index) {
- return parseInt(index) + 1;
- }
- },{
-
- title: '缁熶竴缂栫爜',
- align: 'center',
- dataIndex: 'equipmentId',
- },
- {
- title: '璁惧鍚嶇О',
- align: 'center',
- dataIndex: 'equipmentName',
- },
- {
- title: '椹卞姩绫诲瀷',
- align: 'center',
- dataIndex: 'driveType'
- },
- // {
- // title: '璁惧鍨嬪彿',
- // align: 'center',
- // dataIndex: 'equipmentModel'
- // },
- {
- title: '璁惧绫诲瀷',
- align: 'center',
- dataIndex: 'equipmentType_dictText'
- },
- {
- title: '鎿嶄綔',
- dataIndex: 'action',
- scopedSlots: {customRender: 'action'},
- align: "center",
- width: 150
- }
- ],
- url: {
- list: '/mdc/sectionEquipment/pageList',
- delete: '/mdc/sectionEquipment/deleteBatch',
- list2: '/mdc/mdcequipment/pageListEquipments',
- updateEquipment:'/mdc/sectionEquipment/updateEquipment',
- updateBatchSection:'/mdc/mdcequipment/updateBatchSection'
- },
- mapDateList:{}
- }
- },
- watch:{
- node(val) {
- // console.log(val);
- this.selectedRowKeys = [];
- if (val.entity) {
-
- // if(val.entity.id == "1528990384565837826"){
- // this.columns = this.columns1
- // }else{
- // this.columns = this.columns2
- // }
- // this.$set(this.queryParams, 'equipmentName', val.entity.equipmentName)
- // this.$set(this.queryParams, 'equipmentId', val.entity.equipmentId)
- // this.equipment = val.entity
-
- } else {
- // this.initEquipment(val.entity.id)
- }
- }
- },
- computed: {
- leftColMd() {
- return this.selectedRowKeys.length === 0 ? 24 : 8
- },
- rightColMd() {
- return this.selectedRowKeys.length === 0 ? 0 : 16
- }
- },
- methods: {
- deviceSearch() {
- // console.log(this.selectionRows)
- // console.log(this.selectionRows.id)
- // console.log(this.selectedRowKeys)
- this.$refs.seachModalForm.openPage(this.selectedRowKeys)
- this.$refs.seachModalForm.title = '閫夋嫨璁惧'
- this.$refs.seachModalForm.disableSubmit = false
- },
- getDeviceRows(val) {
- // console.log(val)
- // let map = {}
- // val.forEach(item => {
- // let key = item.equipmentId;
- // if(!map[key]){
- // let list = [];
- // list.push(item);
- // map[key] = list;
- // }else {
- // map[key].push(item);
- // }
- // });
- // this.mapDateList = map;
- // console.log(this.mapDateList);
- var equipmentIds;
- for(var i = 0;i<val.length;i++){
- if (i == 0) {
- equipmentIds = val[i].equipmentId;
- } else {
- equipmentIds = equipmentIds + "," + val[i].equipmentId;
- }
- }
- let obj = {
- id:this.sectionId,
- equipmentId:equipmentIds
- }
- var param = Object.assign(obj)
- putAction(this.url.updateEquipment,param).then(res=>{
- // console.log(res);
- if(res.success){
- this.loadData2();
- }
- })
- // console.log("========",equipmentIds);
- // this.form.setFieldsValue({
- // equipmentId: equipmentIds,
- // })
- },
- onClearSelected() {
- this.selectedRowKeys = []
- this.selectionRows = []
- },
- loadData(arg) {
- if(!this.url.list){
- this.$message.error("璇疯缃畊rl.list灞炴��!")
- return
- }
- //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
- if (arg === 1) {
- this.ipagination.current = 1;
- }
- var params = this.getQueryParams();//鏌ヨ鏉′欢
-
- if(!params){
- return false;
- }
- this.loading = true;
- console.log(params);
- getAction(this.url.list, params).then((res) => {
- if (res.success) {
- this.dataSource = res.result.records;
- //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- // this.dataSource = res.result.records||res.result;
- if(res.result.total)
- {
- this.ipagination.total = res.result.total;
- }else{
- this.ipagination.total = 0;
- }
- //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- }else{
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- })
- },
- batchDelll: function () {
- if(!this.url.deleteBatch){
- this.$message.error("璇疯缃畊rl.deleteBatch灞炴��!")
- return
- }
- if (this.selectedRowKeys.length <= 0) {
- // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒');
- this.$notification.warning({
- message:'娑堟伅',
- description:"璇烽�夋嫨涓�鏉¤褰�"
- });
- return;
- } else {
- var ids = "";
- for (var a = 0; a < this.selectedRowKeys.length; a++) {
- ids += this.selectedRowKeys[a] + ",";
- }
- var that = this;
- this.$confirm({
- title: "纭鍒犻櫎",
- content: "鏄惁鍒犻櫎閫変腑鏁版嵁?",
- onOk: function () {
- that.loading = true;
- deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => {
- if (res.success) {
- //閲嶆柊璁$畻鍒嗛〉闂
- that.reCalculatePage(that.selectedRowKeys.length)
- // that.$message.success(res.message);
- that.$notification.success({
- message:'娑堟伅',
- description:res.message
- });
- that.loadData();
- that.onClearSelected();
- that.$emit('delectTree','')
- } else {
- // that.$message.warning(res.message);
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- that.loading = false;
- });
- }
- });
- }
- },
- handleDelete: function (id) {
- if(!this.url.delete){
- this.$message.error("璇疯缃畊rl.delete灞炴��!")
- return
- }
- var that = this;
- deleteAction(that.url.delete, {ids: id}).then((res) => {
- if (res.success) {
- //閲嶆柊璁$畻鍒嗛〉闂
- that.reCalculatePage(1)
- // that.$message.success(res.message);
- that.$notification.success({
- message:'娑堟伅',
- description:res.message
- });
- that.loadData();
- that.onClearSelected();
- that.$emit('delectTree','')
- } else {
- // that.$message.warning(res.message);
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- })
- },
- handleDeleteZi: function (id) {
- if(!this.url.delete){
- this.$message.error("璇疯缃畊rl.delete灞炴��!")
- return
- }
- let that = this;
- getAction(that.url.updateBatchSection, {ids: id}).then((res) => {
- if (res.success) {
- //閲嶆柊璁$畻鍒嗛〉闂
- that.reCalculatePage(1)
- // that.$message.success(res.message);
- that.$notification.success({
- message:'娑堟伅',
- description:res.message
- });
- that.loadData2();
- // that.onClearSelected();
- // that.$emit('delectTree','')
- } else {
- // that.$message.warning(res.message);
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- })
- },
- getQueryParams2() {
- //鑾峰彇鏌ヨ鏉′欢
- let sqp = {}
- if (this.superQueryParams2) {
- sqp['superQueryParams'] = encodeURI(this.superQueryParams2)
- sqp['superQueryMatchType'] = this.superQueryMatchType2
- }
- var param = Object.assign(sqp, this.queryParam2, this.isorter2, this.filters2)
- param.field = this.getQueryField2()
- param.pageNo = this.ipagination2.current
- param.pageSize = this.ipagination2.pageSize
- param.sectionId = this.sectionId
- return filterObj(param)
- },
- loadData2(arg) {
- if (!this.url.list2) {
- this.$message.error('璇疯缃畊rl.list2灞炴��!')
- return
- }
- //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
- if (arg === 1) {
- this.ipagination2.current = 1
- }
- if (this.currentRoleId === '') return
- let params = this.getQueryParams2()//鏌ヨ鏉′欢
- params.roleId = this.currentRoleId
- this.loading2 = true
- getAction(this.url.list2, params).then((res) => {
- if (res.success) {
- this.dataSource2 = res.result.records
- this.ipagination2.total = res.result.total
-
- }
- this.loading2 = false
- })
-
- },
- getQueryField2() {
- //TODO 瀛楁鏉冮檺鎺у埗
- var str = 'id,'
- this.columns2.forEach(function(value) {
- str += ',' + value.dataIndex
- })
- return str
- },
- handleTableChange2(pagination, filters, sorter) {
- //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂
- //TODO 绛涢��
- if (Object.keys(sorter).length > 0) {
- this.isorter2.column = sorter.field
- this.isorter2.order = 'ascend' == sorter.order ? 'asc' : 'desc'
- }
- this.ipagination2 = pagination
- this.loadData2()
- },
- modalFormOk(val) {
- // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- this.loadData();
- this.loadData2()
- this.$emit('openBasetree','')
- this.selectedRowKeys = []
- },
- handleEdit: function (record) {
- if (record.id) {
- this.$refs.modalForm.title = '缂栬緫'
- this.$refs.modalForm.disableSubmit = false
- this.$refs.modalForm.edit(record)
- } else {
- this.$refs.tierModalForm.title = '缂栬緫'
- this.$refs.tierModalForm.disableSubmit = false
- this.$refs.tierModalForm.edit(record)
- }
- },
- // handleEdit() {
- // this.selectionRows = this.dataSource.filter(item => this.selectedRowKeys[0] == item.id)
- // let row = this.selectionRows[0]
- // if (row.equipmentId) {
- // this.$refs.modalForm.title = '缂栬緫璁惧'
- // this.$refs.modalForm.disableSubmit = false
- // this.$refs.modalForm.edit(row)
- // } else {
- // this.$refs.tierModalForm.title = '缂栬緫灞傜骇'
- // this.$refs.tierModalForm.disableSubmit = false
- // this.$refs.tierModalForm.edit(row)
- // }
- // },
- handleAdd() {
- if (this.node && JSON.stringify(this.node) != '{}') {
- // // console.log(this.node);
- // if(this.node.entity.equipmentId != null){
- // // alert('涓嶅彲鍦ㄦ灞傜骇涓嬪鍔犺澶�')
- // this.$message.warning('涓嶅彲鍦ㄦ灞傜骇涓嬪鍔犺澶囷紒')
- // }else{
- this.$refs.modalForm.add(this.node)
- this.$refs.modalForm.title = '鏂板浜哄憳'
- this.$refs.modalForm.disableSubmit = false
- // }
- } else {
- this.$message.warning('璇烽�夋嫨鎵�灞炲眰绾э紒')
- }
- },
- handleAddTier() {
- // if (this.node && JSON.stringify(this.node) != '{}') {
- // if(this.node.entity.equipmentId != null){
- // // alert('涓嶅彲鍦ㄦ灞傜骇涓嬪鍔犲眰绾�')
- // this.$message.warning('涓嶅彲鍦ㄦ灞傜骇涓嬪鍔犲眰绾э紒')
- // }else{
- this.$refs.tierModalForm.add(this.node)
- this.$refs.tierModalForm.title = '鏂板閮ㄩ棬'
- this.$refs.tierModalForm.disableSubmit = false
- // }
- // }else{
- // this.$refs.tierModalForm.add(this.node)
- // this.$refs.tierModalForm.title = '鏂板閮ㄩ棬'
- // this.$refs.tierModalForm.disableSubmit = false
- // }
- },
- pQuery(parentId) {
- this.queryParam.parentId = parentId[0]
- if(this.selectedRowKeys.length >= 1) {
- this.selectedRowKeys.length = 0
- }
- this.loadData()
- },
- onSelectChange(selectedRowKeys, selectionRows) {
- this.selectedRowKeys = selectedRowKeys;
- this.selectionRows = selectionRows;
- // console.log(this.selectedRowKeys)
- this.sectionId = this.selectedRowKeys[0]
- // console.log(this.sectionId)
- // this.ipagination2.current = 1
- this.loadData2(1)
- },
- },
- created() {
- }
- }
-</script>
-
-<style lang="less" scoped>
- @import '~@assets/less/common.less';
-
- @media screen and (min-width: 1920px){
- .device_list{
- height: 748px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1680px) and (max-width: 1920px){
- .device_list{
- height: 748px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1400px) and (max-width: 1680px){
- .device_list{
- height: 600px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1280px) and (max-width: 1400px){
- .device_list{
- height: 501px!important;
- overflow: scroll;
- }
- }
- @media screen and (max-width: 1280px){
- .device_list{
- height: 501px!important;
- overflow: scroll;
- }
- }
-</style>
diff --git a/src/views/mdc/base/modules/DepartList/DepartListContent/DepartListModel.vue b/src/views/mdc/base/modules/DepartList/DepartListContent/DepartListModel.vue
deleted file mode 100644
index 462848b..0000000
--- a/src/views/mdc/base/modules/DepartList/DepartListContent/DepartListModel.vue
+++ /dev/null
@@ -1,187 +0,0 @@
-<template>
- <a-modal :title="title" :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
- cancelText="鍏抽棴">
- <a-card :bordered="false">
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="6" :sm="6">
- <a-form-item label="缁熶竴缂栫爜">
- <a-input placeholder="璇疯緭鍏ョ粺涓�缂栫爜妫�绱�" v-model="queryParam.equipmentId"></a-input>
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="6">
- <a-form-item label="璁惧鍚嶇О">
- <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉版绱�" v-model="queryParam.equipmentName"></a-input>
- </a-form-item>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
- </div>
- <!-- table鍖哄煙-begin -->
- <div>
- <a-table ref="table" size="middle" bordered rowKey="index" :scroll="{聽 y: 300聽}" :columns="columns"
- :dataSource="dataSource" :pagination="ipagination" :loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}"
- @change="handleTableChange">
- </a-table>
- </div>
- <!-- table鍖哄煙-end -->
- </a-card>
- </a-modal>
-</template>
-
-<script>
- import {
- ajaxGetSelectItems
- } from '@/api/api'
- import JDictSelectTag from '@/components/dict/JDictSelectTag'
- import {
- deleteAction,
- requestPut,
- getAction
- } from '@/api/manage'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
- import JInput from '@/components/jeecg/JInput'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import Tooltip from 'ant-design-vue/es/tooltip'
- import JDate from '@/components/jeecg/JDate'
- import moment from 'moment'
-
- export default {
- name: 'DeviceListModel',
- mixins: [JeecgListMixin],
- components: {
- JDictSelectTag,
- JEllipsis,
- JInput,
- Tooltip,
- JDate
- },
- props: {
- status: {
- type: Number,
- default: 1
- }
- },
- data() {
- return {
- title:'',
- visible: false,
- disableMixinCreated: true,
- queryParam: {},
- columns: [{
- title: '缁熶竴缂栫爜',
- align: 'center',
- dataIndex: 'equipmentId',
- },
- {
- title: '璁惧鍚嶇О',
- align: 'center',
- dataIndex: 'equipmentName',
- },
- {
- title: '璁惧鍨嬪彿',
- align: 'center',
- dataIndex: 'equipmentModel',
- },
- // {
- // title: '璁惧绫诲瀷',
- // align: 'center',
- // dataIndex: 'equipmentType',
- // },
- {
- title: '鏈哄簥IP',
- align: 'center',
- dataIndex: 'equipmentIp',
- },
- {
- title: '椹卞姩绫诲瀷',
- align: 'center',
- dataIndex: 'driveType',
- },
- {
- title: '绔彛',
- align: 'center',
- dataIndex: 'dataPort',
- },
- {
- title: '鏁版帶绯荤粺',
- align: 'center',
- dataIndex: 'controlSystem',
- }
- ],
- url: {
- list: '/mdc/sectionEquipment/pageList',
- },
-
- }
- },
- created() {
-
- },
- methods: {
- openPage() {
- this.visible = true
- this.onClearSelected()
- this.dataSource = [];
- this.queryParam = {
- status: this.status
- };
- this.loadData();
- },
-
- modalFormOk(val) {
- // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- this.loadData();
- this.selectedRowKeys = [val.id];
- },
- searchQuery() {
- this.loadData();
- this.onClearSelected()
- },
- searchReset() {
- this.queryParam = {
- status: 1
- };
- this.loadData();
- this.onClearSelected()
- },
- close() {
- this.$emit('close')
- this.visible = false
- },
- handleCancel() {
- this.close()
- },
- handleOk() {
- this.$emit('sendSelectionRows', this.selectionRows[0])
- this.close()
- },
- },
- }
-</script>
-<style>
- @import '~@assets/less/common.less';
-
- .frozenRowClass {
- color: #c9c9c9;
- }
-
- .success {
- color: green;
- }
-
- .error {
- color: red;
- }
-</style>
diff --git a/src/views/mdc/base/modules/DepartList/DepartListContent/DepartListSeachList.vue b/src/views/mdc/base/modules/DepartList/DepartListContent/DepartListSeachList.vue
deleted file mode 100644
index 391c857..0000000
--- a/src/views/mdc/base/modules/DepartList/DepartListContent/DepartListSeachList.vue
+++ /dev/null
@@ -1,277 +0,0 @@
-<template>
- <a-modal :title="title" width="100%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
- cancelText="鍏抽棴">
- <a-card :bordered="false">
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="6" :sm="6">
- <a-form-item label="杞﹂棿">
- <a-select placeholder="璇烽�夋嫨杞﹂棿" v-model="queryParam.parentId">
- <a-select-option value="782">782杞﹂棿</a-select-option>
- <a-select-option value="702">702杞﹂棿</a-select-option>
- <a-select-option value="545">545杞﹂棿</a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="6">
- <a-form-item label="缁熶竴缂栫爜">
- <a-input placeholder="璇疯緭鍏ョ粺涓�缂栫爜妫�绱�" v-model="queryParam.equipmentId"></a-input>
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="6">
- <a-form-item label="璁惧鍚嶇О">
- <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉版绱�" v-model="queryParam.equipmentName"></a-input>
- </a-form-item>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
- </div>
- <!-- table鍖哄煙-begin -->
- <div>
- <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 400聽}" :columns="columns"
- :dataSource="dataSource" :pagination="ipagination" :loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
- @change="handleTableChange">
- </a-table>
- </div>
- <!-- table鍖哄煙-end -->
- </a-card>
- </a-modal>
-</template>
-
-<script>
- import {
- ajaxGetSelectItems
- } from '@/api/api'
- import JDictSelectTag from '@/components/dict/JDictSelectTag'
- import {
- deleteAction,
- requestPut,
- getAction,
- postAction,
- putAction
- } from '@/api/manage'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
- import JInput from '@/components/jeecg/JInput'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import Tooltip from 'ant-design-vue/es/tooltip'
- import JDate from '@/components/jeecg/JDate'
- import moment from 'moment'
-
- export default {
- name: 'DeviceCalendarListModel',
- mixins: [JeecgListMixin],
- components: {
- JDictSelectTag,
- JEllipsis,
- JInput,
- Tooltip,
- JDate
- },
- props: {
- status: {
- type: Number,
- default: 1
- }
- },
- data() {
- return {
- ListId:"",
- /*readOnly:true,*/
- title:'',
- visible: false,
- SelectedList:[],
- /*disableMixinCreated: true,
- queryParam: {},*/
- columns: [
- {
- title: '#',
- dataIndex: '',
- key: 'rowIndex',
- width: 60,
- align: "center",
- customRender: function (t, r, index) {
- return parseInt(index) + 1;
- }
- },{
-
- title: '缁熶竴缂栫爜',
- align: 'center',
- dataIndex: 'equipmentId',
- },
- {
- title: '璁惧鍚嶇О',
- align: 'center',
- dataIndex: 'equipmentName',
- },
- // {
- // title: '璁惧鍨嬪彿',
- // align: 'center',
- // dataIndex: 'equipmentModel'
- // },
- {
- title: '椹卞姩绫诲瀷',
- align: 'center',
- dataIndex: 'driveType'
- },
- {
- title: '璁惧绫诲瀷',
- align: 'center',
- dataIndex: 'equipmentType_dictText'
- },
- {
- title: '鏈哄簥IP',
- align: 'center',
- dataIndex: 'equipmentIp'
- },
- {
- title: '鏁版帶绯荤粺',
- align: 'center',
- dataIndex: 'controlSystem'
- },
- {
- title: '绯荤粺鐗堟湰鍙�',
- align: 'center',
- dataIndex: 'systemVersion'
- },
- ],
- url: {
- list: '/mdc/mdcequipment/findListEquipment',
- updateEquipment:'/mdc/sectionEquipment/updateEquipment'
- },
-
- }
- },
- created() {
-
- },
- methods: {
- onSelectChange(selectedRowKeys, selectionRows) {
- // this.SelectedList.push(selectedRowKeys);
- this.selectedRowKeys = selectedRowKeys;
- this.selectionRows = selectionRows
- // this.SelectedList =[...this.SelectedList,...selectionRows];
- // console.log(this.SelectedList);
- },
- handleTableChange(pagination, filters, sorter) {
- // this.onClearSelected()
- //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂
- //TODO 绛涢��
- console.log(pagination)
- if (Object.keys(sorter).length > 0) {
- this.isorter.column = sorter.field;
- this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
- }
- this.ipagination = pagination;
- this.loadData();
- },
- openPage(val) {
- // console.log(val);
- // this.ListId = val[0]
- this.visible = true
- this.onClearSelected()
- this.dataSource = [];
- this.queryParam = {
- status: this.status
- };
- this.loadData();
- },
- loadData(arg) {
- if(!this.url.list){
- this.$message.error("璇疯缃畊rl.list灞炴��!")
- return
- }
- //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
- if (arg === 1) {
- this.ipagination.current = 1;
- }
- var params = this.getQueryParams();//鏌ヨ鏉′欢
-
- if(!params){
- return false;
- }
-
- this.loading = true;
- postAction(this.url.list, params).then((res) => {
- if (res.success) {
- // console.log(res)
- //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- this.dataSource = res.result.records||res.result;
- if(res.result.total)
- {
- this.ipagination.total = res.result.total;
- }else{
- this.ipagination.total = 0;
- }
- //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- }else{
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- })
- },
- modalFormOk(val) {
- // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- this.loadData();
-
- this.selectedRowKeys = [val.id];
- },
- searchQuery() {
- this.loadData();
- this.onClearSelected()
- },
- searchReset() {
- this.queryParam = {
- status: 1
- };
- this.loadData();
- this.onClearSelected()
- },
- close() {
- this.$emit('close')
- this.visible = false
- },
- handleCancel() {
- this.close()
- },
- handleOk() {
- // this.selectionRows = this.SelectedList;
- console.log(this.selectionRows);
- this.$emit('sendSelectionRows', this.selectionRows)
- this.close();
-
- },
- },
- }
-</script>
-<style>
- @import '~@assets/less/common.less';
-
- .frozenRowClass {
- color: #c9c9c9;
- }
-
- .success {
- color: green;
- }
-
- .error {
- color: red;
- }
-</style>
diff --git a/src/views/mdc/base/modules/DepartList/DepartListContent/DepartModel.vue b/src/views/mdc/base/modules/DepartList/DepartListContent/DepartModel.vue
deleted file mode 100644
index a2926e8..0000000
--- a/src/views/mdc/base/modules/DepartList/DepartListContent/DepartModel.vue
+++ /dev/null
@@ -1,240 +0,0 @@
-<template>
- <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading"
- :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴">
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
- <!--<a-row :gutter="24">-->
- <!--<a-col :span="12">-->
- <!--<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="鐖剁骇鍚嶇О">-->
- <!--<a-input :disabled="true" v-decorator="['parentName', validatorRules.parentName]"/>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <!--<a-col :span="12">-->
- <!--<a-form-item label="灞傜骇" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<a-input-->
- <!--v-decorator="['sectionRank', validatorRules.sectionRank]"/>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <!--</a-row>-->
-
- <a-row :gutter="24">
- <!--<a-col :span="12">-->
- <!--<a-form-item label="灞傜骇缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<a-input :readOnly="disableSubmit" :disabled="disableSubmit" allow-clear placeholder="璇疯緭鍏ュ眰绾х紪鍙�"-->
- <!--v-decorator="['sectionNumber', validatorRules.sectionNumber ]"/>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <a-col :span="12">
- <a-form-item label="灞傜骇鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="璇疯緭鍏ュ眰绾у悕绉�"
- v-decorator="['sectionName',validatorRules.sectionName]"/>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="鎺掑簭" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input-number :readOnly="disableSubmit" :disabled="disableSubmit" allow-clear placeholder="璇疯緭鍏ユ帓搴�"
- style="width: 200px" v-decorator="['sortNo', validatorRules.sortNo ]"/>
- <!--<a-input-number placeholder="璇疯緭鍏ヨ彍鍗曟帓搴�" v-model="model.sortNo" style="width: 200px" :readOnly="disableSubmit"/>-->
- </a-form-item>
- </a-col>
- </a-row>
- </a-form>
- </a-spin>
- <depart-list-model ref="departListModel" @sendSelectionRows="getDeviceRows"></depart-list-model>
- </a-modal>
-</template>
-
-<script>
- import pick from 'lodash.pick'
- import DepartListModel from './DepartListModel'
- import {
- getAction,
- postAction,
- requestPut
- } from '@/api/manage'
- import {
- duplicateCheck
- } from '@/api/api'
-
- export default {
- name: 'DepartModel',
- components: { DepartListModel },
- props: {},
- data() {
- return {
- title: '',
- visible: false,
- show: false,
- model: {},
- checked: false,
- labelCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 6
- }
- },
- wrapperCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 18
- }
- },
- confirmLoading: false,
- form: this.$form.createForm(this),
- validatorRules: {},
-
- url: {
- add: '/mdc/sectionEquipment/add',
- edit: '/mdc/sectionEquipment/edit'
- },
-
- disableSubmit: true,
- partCategoryCascade: [],
- cascadeDefaultValue: []
- }
- },
- created() {
- },
-
- methods: {
- getDeviceRows(val) {
- this.form.setFieldsValue({
- equipmentId: val.equipmentId,
- equipmentName: val.equipmentName,
- equipmentModel: val.equipmentModel,
- equipmentIp: val.equipmentIp,
- dataPort: val.dataPort,
- driveType: val.driveType
- })
- },
- //绾ц仈妗唎nChange浜嬩欢
- onChange(value) {
-
- },
- add(node) {
- let _this = this
- this.visible = true
- this.form.resetFields()
- this.model = {}
- this.$nextTick(() => {
- // _this.form.setFieldsValue({ 'tierType': node.entity.tierType + 1, 'parentName': node.title })
- _this.model.parentId = node.key
- })
- },
- edit(record) {
- this.form.resetFields()
- this.model = Object.assign({}, record)
- this.visible = true
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'sectionNumber', 'sectionName', 'parentId', 'sortNo', 'sectionRank'))
- })
- },
- close() {
- this.$emit('close')
- this.visible = false
- this.show = false
- },
- handleOk() {
- const that = this
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.form.validateFields((err, values) => {
- if (!err) {
- that.confirmLoading = true
- let formData = Object.assign(this.model, values)
- let obj
- if (!this.model.id) {
- obj = postAction(this.url.add, formData)
- } else {
- obj = requestPut(this.url.edit, formData, {
- id: this.model.id
- })
- }
- obj.then((res) => {
- if (res.success) {
- // that.$message.success("娣诲姞鎴愬姛")
- that.$notification.success({
- message:'娑堟伅',
- description:"娣诲姞鎴愬姛"
- });
- // that.$message.success(res.message)
- that.$emit('ok', res.result)
- } else {
- // that.$message.warning(res.message)
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
-
- }
- }).finally(() => {
- that.confirmLoading = false
- that.close()
- })
- }
- })
- },
- handleCancel() {
- this.close()
- },
- loadCascade() {
- getAction(this.url.loadCascadeData).then((res) => {
- if (res.success) {
- this.partCategoryCascade = res.result
- }
- })
- },
- onCascadeChange(value, selectedOptions) {
- this.cascadeDefaultValue = [...value]
- },
- filter(inputValue, path) {
- return path.some(option => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1)
- },
- //楠岃瘉 缂栫爜
- validateNum(rule, value, callback) {
- var params = {
- tableName: 'lxmes_base_part',
- fieldName: 'num',
- fieldVal: value,
- dataId: this.model.id,
- //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
- delFlag: 'true'
- }
- duplicateCheck(params).then((res) => {
- if (res.success) {
- callback()
- } else {
- callback('瀛樿揣缂栫爜宸插瓨鍦�!')
- }
- })
- },
- checkboxChange(e) {
- this.checked = e.target.checked
- }
- }
- }
-</script>
-
-<style scoped>
- .ant-btn {
- padding: 0 10px;
- margin-left: 3px;
- }
-
- .ant-form-item-control {
- line-height: 0px;
- }
-
- /** 涓昏〃鍗曡闂磋窛 */
- .ant-form .ant-form-item {
- margin-bottom: 10px;
- }
-
- /** Tab椤甸潰琛岄棿璺� */
- .ant-tabs-content .ant-form-item {
- margin-bottom: 0px;
- }
-</style>
diff --git a/src/views/mdc/base/modules/DepartList/DepartListContent/TierModel.vue b/src/views/mdc/base/modules/DepartList/DepartListContent/TierModel.vue
deleted file mode 100644
index 3f5ea20..0000000
--- a/src/views/mdc/base/modules/DepartList/DepartListContent/TierModel.vue
+++ /dev/null
@@ -1,261 +0,0 @@
-<template>
- <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading"
- :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴">
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
- <!--<a-row :gutter="24">-->
- <!--<a-col :span="12">-->
- <!--<a-form-item label="灞傜骇" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<a-input-->
- <!--v-decorator="['sectionRank', validatorRules.sectionRank]"/>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <!--</a-row>-->
-
- <a-row :gutter="24">
- <!--<a-col :span="12">-->
- <!--<a-form-item label="灞傜骇缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<a-input :readOnly="disableSubmit" :disabled="disableSubmit" allow-clear placeholder="璇疯緭鍏ュ眰绾х紪鍙�"-->
- <!--v-decorator="['sectionNumber', validatorRules.sectionNumber ]"/>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <a-col :span="12">
- <a-form-item label="閮ㄩ棬鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="璇疯緭鍏ラ儴闂ㄥ悕绉�"
- v-decorator="['sectionName',validatorRules.sectionName]"/>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="鎺掑簭" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input-number :readOnly="disableSubmit" :disabled="disableSubmit" allow-clear placeholder="璇疯緭鍏ユ帓搴�"
- style="width: 200px" v-decorator="['sortNo', validatorRules.sortNo ]"/>
- <!--<a-input-number placeholder="璇疯緭鍏ヨ彍鍗曟帓搴�" v-model="model.sortNo" style="width: 200px" :readOnly="disableSubmit"/>-->
- </a-form-item>
- </a-col>
- </a-row>
- </a-form>
- </a-spin>
- <template slot="footer" v-if="disableSubmit == false">
- <a-button :style="{ marginRight: '8px' }" @click="handleCancel">鍏抽棴</a-button>
- <a-button @click="handleOk" type="primary">纭畾</a-button>
- </template>
- </a-modal>
-</template>
-
-<script>
- import pick from 'lodash.pick'
- import {
- getAction,
- postAction,
- requestPut
- } from '@/api/manage'
- import {
- duplicateCheck
- } from '@/api/api'
-
- export default {
- name: 'TierModel',
- components: {},
- props: {},
- data() {
- return {
- title: '',
- visible: false,
- show: false,
- model: {},
- checked: false,
- labelCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 6
- }
- },
- wrapperCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 18
- }
- },
- confirmLoading: false,
- form: this.$form.createForm(this),
- validatorRules: {},
- url: {
- add: '/mdc/sectionEquipment/add',
- edit: '/mdc/sectionEquipment/edit'
- },
- disableSubmit: true,
- partCategoryCascade: [],
- cascadeDefaultValue: []
- }
- },
- created() {
- },
-
- methods: {
- //绾ц仈妗唎nChange浜嬩欢
- onChange(value) {
-
- },
- getParentIdsById(id) {
- let that = this
- getAction(this.url.getParentIdsById, {
- id: id
- }).then((res) => {
- // debugger
- if (res.success) {
- that.form.setFieldsValue({
- partCategoryId: res.result
- })
- }
- })
- },
- add(node) {
- let _this = this
- this.visible = true
- this.form.resetFields()
- this.model = {}
- this.$nextTick(() => {
- if (node && JSON.stringify(node) != '{}') {
- // _this.form.setFieldsValue({ 'tierType': node.entity.tierType + 1, 'parentName': node.title })
- _this.model.parentId = node.key
- } else {
- // _this.form.setFieldsValue({ 'tierType': 1, 'parentName': '' })
- // _this.model.parentId = 1
- return false;
- }
- })
- },
- edit(record) {
- this.form.resetFields()
- this.model = Object.assign({}, record)
- this.visible = true
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model,'parentId', 'sectionNumber','sectionName', 'sortNo', 'sectionRank', ))
- })
- },
- close() {
- this.$emit('close')
- this.visible = false
- this.show = false
- },
- handleOk() {
- const that = this
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.form.validateFields((err, values) => {
- if (!err) {
- that.confirmLoading = true
- let formData = Object.assign(this.model, values)
- let obj
- if (!this.model.id) {
- obj = postAction(this.url.add, formData)
- } else {
- obj = requestPut(this.url.edit, formData, {
- id: this.model.id
- })
- }
- obj.then((res) => {
- if (res.success) {
- // that.$message.success("鎴愬姛")
- that.$notification.success({
- message:'娑堟伅',
- description:"鎴愬姛"
- });
- // that.$message.success(res.message)
- that.$emit('ok', res.result)
- } else {
- // that.$message.warning(res.message)
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- that.confirmLoading = false
- that.close()
- })
- }
- })
- },
- handleCancel() {
- this.close()
- },
- loadCascade() {
- getAction(this.url.loadCascadeData).then((res) => {
- if (res.success) {
- this.partCategoryCascade = res.result
- }
- })
- },
- //楠岃瘉 缂栫爜
- validateNum(rule, value, callback) {
- var params = {
- tableName: 'lxmes_base_part',
- fieldName: 'num',
- fieldVal: value,
- dataId: this.model.id,
- //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
- delFlag: 'true'
- }
- duplicateCheck(params).then((res) => {
- if (res.success) {
- callback()
- } else {
- callback('瀛樿揣缂栫爜宸插瓨鍦�!')
- }
- })
- },
- checkboxChange(e) {
- this.checked = e.target.checked
- },
- sendmath(){
-
- }
- //楠岃瘉 鍚嶇О
- // validateName(rule, value, callback) {
- // var params = {
- // tableName: 'mes_base_part',
- // fieldName: 'name',
- // fieldVal: value,
- // dataId: this.model.id,
- // //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
- // delFlag: 'true',
- // };
- // duplicateCheck(params).then((res) => {
- // if (res.success) {
- // callback();
- // } else {
- // callback("浜у搧鍚嶇О宸插瓨鍦�!");
- // }
- // })
- // },
-
-
- }
-
- }
-</script>
-
-<style scoped>
- .ant-btn {
- padding: 0 10px;
- margin-left: 3px;
- }
-
- .ant-form-item-control {
- line-height: 0px;
- }
-
- /** 涓昏〃鍗曡闂磋窛 */
- .ant-form .ant-form-item {
- margin-bottom: 10px;
- }
-
- /** Tab椤甸潰琛岄棿璺� */
- .ant-tabs-content .ant-form-item {
- margin-bottom: 0px;
- }
-</style>
diff --git a/src/views/mdc/base/modules/DepartList/DepartListTree/DepartTree.vue b/src/views/mdc/base/modules/DepartList/DepartListTree/DepartTree.vue
deleted file mode 100644
index f128940..0000000
--- a/src/views/mdc/base/modules/DepartList/DepartListTree/DepartTree.vue
+++ /dev/null
@@ -1,411 +0,0 @@
-<template>
- <a-card class="tree_con" :loading="cardLoading" :bordered="false" >
- <a-spin :spinning="loading">
- <a-alert type="info" :showIcon="false" style="margin-right: 54px;padding-left: 5px">
- <div slot="message">
- 褰撳墠锛�<span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span>
- <a v-if="this.currSelected.title" style="margin-left: 10px" @click="onClearSelected">鍙栨秷</a>
- </div>
- </a-alert>
- <div class="drawer-bootom-button">
- <a-dropdown :trigger="['click']" placement="bottomCenter">
- <a-menu slot="overlay">
- <a-menu-item key="1" @click="expandAll">灞曞紑鎵�鏈�</a-menu-item>
- <a-menu-item key="2" @click="closeAll">鍚堝苟鎵�鏈�</a-menu-item>
- <a-menu-item key="3" @click="refreshTree">鍒锋柊</a-menu-item>
- </a-menu>
- <a-button>
- <a-icon type="bars"/>
- </a-button>
- </a-dropdown>
- </div>
- <a-input-search @search="handleSearch" style="width:100%;margin-top: 10px" placeholder="妫�绱� 绫诲埆缂栫爜/鍚嶇О" allowClear
- v-model="searchInput" @change="handleChange"/>
- <!-- showLine -->
- <a-tree showLine ref="tree" :checkStrictly="checkStrictly" :expandedKeys.sync="expandedKeys"
- :selectedKeys="selectedKeys" :dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
- :treeData="treeDataSource"
- :autoExpandParent="autoExpandParent" @select="onSelect" @expand="onExpand" slots="{}">
- <template slot="title" slot-scope="{ title, entity, key}">
- <span v-if="title.indexOf(searchValue) > -1">
- {{ title.substr(0, title.indexOf(searchValue)) }}
- <span class="replaceSearch">{{ searchValue }}</span>
- {{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
- </span>
- <span v-else>{{ title }}</span>
- <a-dropdown v-if="!editDisable " :trigger="['click']" placement="bottomCenter">
- <a-menu slot="overlay">
- <a-menu-item>
- <a href="javascript:;" @click="handleEdit(entity)">缂栬緫</a>
- </a-menu-item>
- <a-menu-item>
- <a href="javascript:;" @click="batchDel(entity)">
- 鍒犻櫎
- </a>
- </a-menu-item>
- </a-menu>
- <span :style="{position: 'absolute',right: 0}">
- <a-icon type="down"/>
- </span>
- </a-dropdown>
- </template>
- </a-tree>
- </a-spin>
- <tier-model ref="tierModalForm" @ok="modalFormOk"></tier-model>
- </a-card>
-</template>
-
-<script>
- import {
- getAction,
- postAction,
- deleteAction
- } from '@/api/manage'
- import Tooltip from 'ant-design-vue/es/tooltip'
- import TierModel from './modules/DepartTree/TierModel'
- import {mapActions} from 'vuex'
-
- export default {
- name: 'DepartTree',
- props: {
- editDisable: {
- type: Boolean,
- default() {
- return true
- }
- }
- },
- components: {
- Tooltip,
- TierModel
- },
- data() {
- return {
- searchInput: '',
- cardLoading: false,
- loading: false,
- treeDataSource: [],
- selectedKeys: [],
- expandedKeys: [],
- url: {
- getBaseTree: '/mdc/mdcEquipment/queryTreeListByDepart',
- deleteBatch: '/mdc/sectionEquipment/deleteBatch'
- },
- searchValue: '',
- dataList: [],
- autoExpandParent: true,
- checkStrictly: true,
- allTreeKeys: [],
- currSelected: {},
- hiding: false,
- mathChange:''
- }
- }
- ,
- created() {
- this.queryTreeData()
- this.closeAll()
- }
- ,
- methods: {
- ...mapActions(['QueryDepart']),
- getCurrSelectedTitle() {
- return !this.currSelected.title ? '' : this.currSelected.title
- }
- ,
- onClearSelected() {
- this.hiding = true
- this.currSelected = {}
- this.selectedKeys = []
- this.$emit('sendSelectBaseTree', '')
- },
-
- onSelect(selectedKeys, e) {
- this.hiding = false
- let record = e.node.dataRef
- this.currSelected = Object.assign({}, record)
- this.selectedKeys = [record.key]
- this.$emit('sendSelectBaseTree', this.selectedKeys)
- },
- handleEdit(entity) {
- this.$refs.tierModalForm.edit(entity)
- this.$refs.tierModalForm.title = '缂栬緫閮ㄩ棬'
- this.$refs.tierModalForm.disableSubmit = false
- },
- onExpand(expandedKeys) {
- this.expandedKeys = expandedKeys
- this.autoExpandParent = false
- },
- queryTreeData() {
- this.loading = true
- this.cardLoading = true
- this.QueryDepart().then(res => {
- if (res.success) {
- this.dataList = []
- this.allTreeKeys = []
- this.treeDataSource = res.result
- this.generateList(res.result)
- this.expandedKeys=this.allTreeKeys
- } else {
- // this.$message.warn(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() =>{
- this.loading = false
- this.cardLoading = false
- })
- // getAction(this.url.getBaseTree).then((res) => {
- // if (res.success) {
- // this.dataList = []
- // this.allTreeKeys = []
- // this.treeDataSource = res.result
- // this.generateList(res.result)
- // } else {
- // this.$message.warn(res.message)
- // }
- // }).finally(() => {
- // this.loading = false
- // this.cardLoading = false
- // })
- }
- ,
- handleChange() {
- let search = this.searchInput
- let expandedKeys = this.dataList
- .map(item => {
- if(item.title !=null){
- if (item.title.indexOf(search) > -1) {
- return this.getParentKey(item.key, this.treeDataSource)
- }
- return null
- }
- })
- .filter((item, i, self) => item && self.indexOf(item) === i)
- Object.assign(this, {
- expandedKeys,
- searchValue: search,
- autoExpandParent: true
- })
- }
- ,
- handleSearch(value) {
- let search = value
- let expandedKeys = this.dataList
- .map(item => {
- if(item.title !=null){
- if (item.title.indexOf(search) > -1) {
- return this.getParentKey(item.key, this.treeDataSource)
- }
- return null
- }
- })
- .filter((item, i, self) => item && self.indexOf(item) === i)
- Object.assign(this, {
- expandedKeys,
- searchValue: search,
- autoExpandParent: true
- })
- }
- ,
- getParentKey(key, tree) {
- let parentKey
- for (let i = 0; i < tree.length; i++) {
- const node = tree[i]
- if (node.children) {
- if (node.children.some(item => item.key === key)) {
- parentKey = node.key
- } else if (
- this.getParentKey(key, node.children)) {
- parentKey = this.getParentKey(key, node.children)
- }
- }
- }
- return parentKey
- },
-
- generateList(data) {
- for (let i = 0; i < data.length; i++) {
- const node = data[i]
- const key = node.key
- const title = node.title
- this.dataList.push({
- key,
- title: title
- })
- this.allTreeKeys.push(key)
- if (node.children) {
- this.generateList(node.children)
- }
- }
- },
- expandAll() {
- this.expandedKeys = this.allTreeKeys
- },
- closeAll() {
- this.expandedKeys = ['-1']
- },
- refreshTree() {
- this.queryTreeData()
- },
- batchDel: function(entity) {
- if (!this.url.deleteBatch) {
- // this.$message.error('璇疯缃畊rl.deleteBatch灞炴��!')
- this.$notification.warning({
- message:'娑堟伅',
- description:"璇疯缃畊rl.deletBatch灞炴�э紒"
- });
- return
- }
- let ids = entity.id
- if (!ids) {
- // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒')
- this.$notification.warning({
- message:'娑堟伅',
- description:"璇烽�夋嫨涓�鏉¤褰�"
- });
- return
- } else {
- var that = this
- this.$confirm({
- title: '纭鍒犻櫎',
- content: '鏄惁鍒犻櫎閫変腑鏁版嵁?',
- onOk: function() {
- that.loading = true
- deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => {
- if (res.success) {
- // that.$message.success(res.message)
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- that.queryTreeData();
- } else {
- // that.$message.warning(res.message)
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- that.loading = false
- })
- }
- })
- }
- },
- modalFormOk(val) {
- console.log("mmm")
- // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- this.queryTreeData()
- // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- }
-
- }
- ,
- //鐩戝惉
- watch: {
- currSelected(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
- this.$emit('getCurrSelectedDD', val)
- },
- }
- }
-</script>
-
-<style lang="less" scoped>
- .replaceSearch {
- color: #40a9ff;
- font-weight: bold;
- background-color: rgb(204, 204, 204);
- }
-
- .ant-card-body .table-operator {
- margin: 15px;
- }
-
- .anty-form-btn {
- width: 100%;
- text-align: center;
- }
-
- .anty-form-btn button {
- margin: 0 5px;
- }
-
- .anty-node-layout .ant-layout-header {
- padding-right: 0;
- }
-
- .header {
- padding: 0 8px;
- }
-
- .header button {
- margin: 0 3px;
- }
-
- .ant-modal-cust-warp {
- height: 100%;
- }
-
- .ant-modal-cust-warp .ant-modal-body {
- height: calc(100% - 110px) !important;
- overflow-y: auto;
- }
-
- .ant-modal-cust-warp .ant-modal-content {
- height: 90% !important;
- overflow-y: hidden;
- }
-
- /** Button鎸夐挳闂磋窛 */
- .ant-btn {
- margin-left: 3px;
- }
-
- .ant-alert {
- padding: 5px 15px 5px 37px;
- }
-
- .drawer-bootom-button {
- position: absolute;
- top: 1px;
- /* padding: 10px 16px; */
- text-align: left;
- right: 0;
- background: #fff;
- border-radius: 0 0 2px 2px;
- }
- @media screen and (min-width: 1920px){
- .tree_con{
- height: 748px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1680px) and (max-width: 1920px){
- .tree_con{
- height: 748px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1400px) and (max-width: 1680px){
- .tree_con{
- height: 600px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1280px) and (max-width: 1400px){
- .tree_con{
- height: 501px!important;
- overflow: scroll;
- }
- }
- @media screen and (max-width: 1280px){
- .tree_con{
- height: 501px!important;
- overflow: scroll;
- }
- }
-</style>
diff --git a/src/views/mdc/base/modules/DepartList/DepartListTree/modules/DepartTree/TierModel.vue b/src/views/mdc/base/modules/DepartList/DepartListTree/modules/DepartTree/TierModel.vue
deleted file mode 100644
index 0899353..0000000
--- a/src/views/mdc/base/modules/DepartList/DepartListTree/modules/DepartTree/TierModel.vue
+++ /dev/null
@@ -1,255 +0,0 @@
-<template>
- <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading"
- :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴">
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
- <!--<a-row :gutter="24">-->
- <!--<a-col :span="12">-->
- <!--<a-form-item label="灞傜骇" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<a-input-->
- <!--v-decorator="['sectionRank', validatorRules.sectionRank]"/>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <!--</a-row>-->
-
- <a-row :gutter="24">
- <!--<a-col :span="12">-->
- <!--<a-form-item label="灞傜骇缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<a-input :readOnly="disableSubmit" :disabled="disableSubmit" allow-clear placeholder="璇疯緭鍏ュ眰绾х紪鍙�"-->
- <!--v-decorator="['sectionNumber', validatorRules.sectionNumber ]"/>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <a-col :span="12">
- <a-form-item label="灞傜骇鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="璇疯緭鍏ュ眰绾у悕绉�"
- v-decorator="['sectionName',validatorRules.sectionName]"/>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="鎺掑簭" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input-number :readOnly="disableSubmit" :disabled="disableSubmit" allow-clear placeholder="璇疯緭鍏ユ帓搴�"
- style="width: 200px" v-decorator="['sortNo', validatorRules.sortNo ]"/>
- <!--<a-input-number placeholder="璇疯緭鍏ヨ彍鍗曟帓搴�" v-model="model.sortNo" style="width: 200px" :readOnly="disableSubmit"/>-->
- </a-form-item>
- </a-col>
- </a-row>
- </a-form>
- </a-spin>
- <template slot="footer" v-if="disableSubmit == false">
- <a-button :style="{ marginRight: '8px' }" @click="handleCancel">鍏抽棴</a-button>
- <a-button @click="handleOk" type="primary">纭畾</a-button>
- </template>
- </a-modal>
-</template>
-
-<script>
- import pick from 'lodash.pick'
- import {
- getAction,
- postAction,
- requestPut
- } from '@/api/manage'
- import {
- duplicateCheck
- } from '@/api/api'
-
- export default {
- name: 'TierModel',
- components: {},
- props: {},
- data() {
- return {
- title: '',
- visible: false,
- show: false,
- model: {},
- checked: false,
- labelCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 6
- }
- },
- wrapperCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 18
- }
- },
- confirmLoading: false,
- form: this.$form.createForm(this),
- validatorRules: {},
- url: {
- add: '/mdc/sectionEquipment/add',
- edit: '/mdc/sectionEquipment/edit'
- },
- disableSubmit: true,
- partCategoryCascade: [],
- cascadeDefaultValue: []
- }
- },
- created() {
- },
-
- methods: {
- //绾ц仈妗唎nChange浜嬩欢
- onChange(value) {
-
- },
- getParentIdsById(id) {
- let that = this
- getAction(this.url.getParentIdsById, {
- id: id
- }).then((res) => {
- debugger
- if (res.success) {
- that.form.setFieldsValue({
- partCategoryId: res.result
- })
- }
- })
- },
- add(node) {
- let _this = this
- this.visible = true
- this.form.resetFields()
- this.model = {}
- this.$nextTick(() => {
- // if (node && JSON.stringify(node) != '{}') {
- // // _this.form.setFieldsValue({ 'tierType': node.entity.tierType + 1, 'parentName': node.title })
- // // _this.model.parentId = node.key
- // } else {
- // // _this.form.setFieldsValue({ 'tierType': 1, 'parentName': '' })
- // // _this.model.parentId = -1
- // }
- })
- },
- edit(record) {
- this.form.resetFields()
- this.model = Object.assign({}, record)
- this.visible = true
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model,'parentId', 'sectionNumber','sectionName', 'sortNo', 'sectionRank', ))
- })
- },
- close() {
- this.$emit('close')
- this.visible = false
- this.show = false
- },
- handleOk() {
- const that = this
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.form.validateFields((err, values) => {
- if (!err) {
- that.confirmLoading = true
- let formData = Object.assign(this.model, values)
- let obj
- if (!this.model.id) {
- obj = postAction(this.url.add, formData)
- } else {
- obj = requestPut(this.url.edit, formData, {
- id: this.model.id
- })
- }
- obj.then((res) => {
- if (res.success) {
- // that.$message.success("缂栬緫鎴愬姛")
- that.$notification.success({
- message:'娑堟伅',
- description:"缂栬緫鎴愬姛"
- });
- // that.$message.success(res.message)
- that.$emit('ok', res.result)
- } else {
- // that.$message.warning(res.message)
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- that.confirmLoading = false
- that.close()
- })
- }
- })
- },
- handleCancel() {
- this.close()
- },
- loadCascade() {
- getAction(this.url.loadCascadeData).then((res) => {
- if (res.success) {
- this.partCategoryCascade = res.result
- }
- })
- },
- //楠岃瘉 缂栫爜
- validateNum(rule, value, callback) {
- var params = {
- tableName: 'lxmes_base_part',
- fieldName: 'num',
- fieldVal: value,
- dataId: this.model.id,
- //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
- delFlag: 'true'
- }
- duplicateCheck(params).then((res) => {
- if (res.success) {
- callback()
- } else {
- callback('瀛樿揣缂栫爜宸插瓨鍦�!')
- }
- })
- },
- checkboxChange(e) {
- this.checked = e.target.checked
- }
- //楠岃瘉 鍚嶇О
- // validateName(rule, value, callback) {
- // var params = {
- // tableName: 'mes_base_part',
- // fieldName: 'name',
- // fieldVal: value,
- // dataId: this.model.id,
- // //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
- // delFlag: 'true',
- // };
- // duplicateCheck(params).then((res) => {
- // if (res.success) {
- // callback();
- // } else {
- // callback("浜у搧鍚嶇О宸插瓨鍦�!");
- // }
- // })
- // },
-
- }
- }
-</script>
-
-<style scoped>
- .ant-btn {
- padding: 0 10px;
- margin-left: 3px;
- }
-
- .ant-form-item-control {
- line-height: 0px;
- }
-
- /** 涓昏〃鍗曡闂磋窛 */
- .ant-form .ant-form-item {
- margin-bottom: 10px;
- }
-
- /** Tab椤甸潰琛岄棿璺� */
- .ant-tabs-content .ant-form-item {
- margin-bottom: 0px;
- }
-</style>
diff --git a/src/views/mdc/base/modules/DepartList/DepartModal.vue b/src/views/mdc/base/modules/DepartList/DepartModal.vue
deleted file mode 100644
index 72b2190..0000000
--- a/src/views/mdc/base/modules/DepartList/DepartModal.vue
+++ /dev/null
@@ -1,225 +0,0 @@
-<template>
- <a-modal
- :title="title"
- :width="800"
- :ok=false
- :visible="visible"
- :confirmLoading="confirmLoading"
- :okButtonProps="{ props: {disabled: disableSubmit} }"
- @ok="handleOk"
- @cancel="handleCancel"
- cancelText="鍏抽棴">
-
- <a-spin :spinning="confirmLoading">
- <a-form-model ref="form" :model="model" :rules="validatorRules">
- <a-form-model-item
- :labelCol="labelCol"
- :wrapperCol="wrapperCol"
- label="鏈烘瀯鍚嶇О"
- prop="departName"
- :hidden="false"
- hasFeedback >
- <a-input id="departName" placeholder="璇疯緭鍏ユ満鏋�/閮ㄩ棬鍚嶇О" v-model="model.departName"/>
- </a-form-model-item>
- <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" :hidden="seen" label="涓婄骇閮ㄩ棬" hasFeedback>
- <a-tree-select
- style="width:100%"
- :dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
- :treeData="departTree"
- v-model="model.parentId"
- placeholder="璇烽�夋嫨涓婄骇閮ㄩ棬"
- :disabled="condition">
- </a-tree-select>
- </a-form-model-item>
- <a-form-model-item
- :labelCol="labelCol"
- :wrapperCol="wrapperCol"
- label="鏈烘瀯绫诲瀷">
- <template v-if="seen">
- <a-radio-group v-model="model.orgCategory" placeholder="璇烽�夋嫨鏈烘瀯绫诲瀷">
- <a-radio value="1">
- 鍏徃
- </a-radio>
- </a-radio-group>
- </template>
- <template v-else>
- <a-radio-group v-model="model.orgCategory" placeholder="璇烽�夋嫨鏈烘瀯绫诲瀷">
- <a-radio value="2">
- 閮ㄩ棬
- </a-radio>
- <a-radio value="3">
- 宀椾綅
- </a-radio>
- </a-radio-group>
- </template>
- </a-form-model-item>
- <!--<a-form-model-item-->
- <!--:labelCol="labelCol"-->
- <!--:wrapperCol="wrapperCol"-->
- <!--prop="mobile"-->
- <!--label="鐢佃瘽">-->
- <!--<a-input placeholder="璇疯緭鍏ョ數璇�" v-model="model.mobile"/>-->
- <!--</a-form-model-item>-->
- <!--<a-form-model-item-->
- <!--:labelCol="labelCol"-->
- <!--:wrapperCol="wrapperCol"-->
- <!--label="浼犵湡">-->
- <!--<a-input placeholder="璇疯緭鍏ヤ紶鐪�" v-model="model.fax"/>-->
- <!--</a-form-model-item>-->
- <!--<a-form-model-item-->
- <!--:labelCol="labelCol"-->
- <!--:wrapperCol="wrapperCol"-->
- <!--label="鍦板潃">-->
- <!--<a-input placeholder="璇疯緭鍏ュ湴鍧�" v-model="model.address"/>-->
- <!--</a-form-model-item>-->
- <a-form-model-item
- :labelCol="labelCol"
- :wrapperCol="wrapperCol"
- label="鎺掑簭">
- <a-input-number v-model="model.departOrder"/>
- </a-form-model-item>
- <a-form-model-item
- :labelCol="labelCol"
- :wrapperCol="wrapperCol"
- label="澶囨敞">
- <a-textarea placeholder="璇疯緭鍏ュ娉�" v-model="model.memo"/>
- </a-form-model-item>
-
- </a-form-model>
- </a-spin>
- </a-modal>
-</template>
-
-<script>
- import { httpAction } from '@/api/manage'
- import { queryIdTree } from '@/api/api'
- import pick from 'lodash.pick'
- import ATextarea from 'ant-design-vue/es/input/TextArea'
- export default {
- name: "SysDepartModal",
- components: { ATextarea },
- data () {
- return {
- departTree:[],
- orgTypeData:[],
- phoneWarning:'',
- departName:"",
- title:"鎿嶄綔",
- seen:false,
- visible: false,
- condition:true,
- disableSubmit:false,
- model: {},
- defaultModel:{
- departOrder:0,
- orgCategory:'1'
- },
- menuhidden:false,
- menuusing:true,
- labelCol: {
- xs: { span: 24 },
- sm: { span: 5 },
- },
- wrapperCol: {
- xs: { span: 24 },
- sm: { span: 16 },
- },
-
- confirmLoading: false,
- validatorRules:{
- departName:[{ required: true, message: '璇疯緭鍏ユ満鏋�/閮ㄩ棬鍚嶇О!' }],
- // orgCode:[{ required: true, message: '璇疯緭鍏ユ満鏋勭紪鐮�!' }],
- // mobile: [{validator:this.validateMobile}],
- // orgCategory:[{required: true, message: '璇疯緭鍏ユ満鏋勭被鍨�!'}]
- },
- url: {
- add: "/sys/sysDepart/add",
- },
- dictDisabled:true,
- }
- },
- created () {
- },
- methods: {
- loadTreeData(){
- var that = this;
- queryIdTree().then((res)=>{
- if(res.success){
- that.departTree = [];
- for (let i = 0; i < res.result.length; i++) {
- let temp = res.result[i];
- that.departTree.push(temp);
- }
- }
-
- })
- },
- add (depart) {
- if(depart){
- this.seen = false;
- this.dictDisabled = false;
- }else{
- this.seen = true;
- this.dictDisabled = true;
- }
- this.edit(depart);
- },
- edit (record) {
- this.visible = true;
- this.model = Object.assign({}, this.defaultModel, record)
- this.loadTreeData();
- this.model.parentId = record!=null?record.toString():null;
- if(this.seen){
- this.model.orgCategory = '1';
- }else{
- this.model.orgCategory = '2';
- }
- },
- close () {
- this.$emit('close');
- this.disableSubmit = false;
- this.visible = false;
- this.$refs.form.resetFields();
- },
- handleOk () {
- const that = this;
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.$refs.form.validate(valid => {
- if (valid) {
- that.confirmLoading = true;
- httpAction(this.url.add,this.model,"post").then((res)=>{
- if(res.success){
- that.$message.success(res.message);
- that.loadTreeData();
- that.$emit('ok');
- }else{
- that.$message.warning(res.message);
- }
- }).finally(() => {
- that.confirmLoading = false;
- that.close();
- })
-
- }else{
- return false;
- }
- })
- },
- handleCancel () {
- this.close()
- },
- validateMobile(rule,value,callback){
- if (!value || new RegExp(/^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/).test(value)){
- callback();
- }else{
- callback("鎮ㄧ殑鎵嬫満鍙风爜鏍煎紡涓嶆纭�!");
- }
-
- }
- }
- }
-</script>
-
-<style scoped>
-
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentDetailModal.vue b/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentDetailModal.vue
deleted file mode 100644
index 524ca0e..0000000
--- a/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentDetailModal.vue
+++ /dev/null
@@ -1,1549 +0,0 @@
-<template>
- <div ref="wrap">
- <a-modal
- :title="title"
- width="70%"
- :visible="visible"
- :getContainer="() => this.$refs.wrap"
- @cancel="handleCancel"
- cancelText="鍏抽棴"
- wrap-class-name="full-modal"
- centered
- >
- <div
- id="mdcEquiInfo"
- style="padding:1px;"
- >
- <table
- width="100%"
- style="border-collapse: separate;border-spacing:0px; color: #fff"
- >
- <tr>
- <td v-if="this.spindlebeilv != null">
- <div
- class="mdcEquipMon"
- style="width: 250px; height: 200px;margin : 0 auto;padding: 0;"
- align="center"
- >
- 涓昏酱鍊嶇巼
- <div
- id="mdcEquiMoniGauge1"
- ref="chart1"
- style="width: 100%; height: 95%;"
- ></div>
- </div>
- </td>
- <td v-if="this.feedbeilv != null">
- <div
- class="mdcEquipMon"
- style="width: 210px; height: 180px;margin : 0 auto;"
- align="center"
- >
- 杩涚粰鍊嶇巼
- <div
- id="mdcEquiMoniGauge2"
- ref="chart2"
- style="width: 100%; height: 95%;"
- ></div>
- </div>
- </td>
- <td v-if="this.spindleload != null">
- <div
- class="mdcEquipMon"
- style="width: 210px; height: 180px;margin : 0 auto;"
- align="center"
- >涓昏酱璐熻嵎
- <div
- id="mdcEquiMoniGauge3"
- ref="mdcEquiMoniGauge3"
- style="width: 100%; height: 95%;"
- ></div>
- </div>
- </td>
- <td v-if="this.rapidfeed != null">
- <div
- class="mdcEquipMon"
- style="width: 210px; height: 180px;margin : 0 auto;"
- align="center"
- >蹇�熻繘缁欏�嶇巼
- <div
- id="mdcEquiMoniGauge4"
- ref="mdcEquiMoniGauge4"
- style="width: 100%; height: 95%;"
- ></div>
- </div>
- </td>
- </tr>
- <tr>
- <td colspan="5">
- <a-descriptions
- title="鍩虹淇℃伅"
- :column="4"
- >
- <a-descriptions-item label="璁惧缂栧彿">{{resultData.equipmentID}}</a-descriptions-item>
- <a-descriptions-item label="璁惧鍚嶇О">{{resultData.equipmentName}}</a-descriptions-item>
- <a-descriptions-item label="IP鍦板潃">{{resultData.equipmentIP}}</a-descriptions-item>
- <a-descriptions-item label="绔彛鍙�">{{resultData.dataPort}}</a-descriptions-item>
- <a-descriptions-item label="绯荤粺鐗堟湰鍙�">{{resultData.systemVersion}}</a-descriptions-item>
- <a-descriptions-item label="椹卞姩绫诲瀷">{{resultData.driveType}}</a-descriptions-item>
- <a-descriptions-item label="璁惧鍨嬪彿">{{resultData.equipmentModel}}</a-descriptions-item>
- <a-descriptions-item label="璁惧绫诲瀷">{{resultData.deviceType}}</a-descriptions-item>
- <a-descriptions-item label="璁惧鍔熺巼">{{resultData.devicePower}}</a-descriptions-item>
- <a-descriptions-item label="鏈夋晥杞存暟">{{resultData.validAxis}}</a-descriptions-item>
- <a-descriptions-item label="鏈�澶ц酱鏁�">{{resultData.maxAxis}}</a-descriptions-item>
- <a-descriptions-item label="澶囨敞">{{resultData.remark}}</a-descriptions-item>
-
- </a-descriptions>
-
- <!-- <a-descriptions
- title="杩愯鏁版嵁"
- v-if="driverType != 'LSV2' && driverType != 'ZUOLAN' "
- :column="4"
- >
- <a-descriptions-item label="涓昏酱鍊嶇巼(%)">{{resultData.spindlebeilv}}</a-descriptions-item>
- <a-descriptions-item label="杩涚粰鍊嶇巼(%)">{{resultData.feedbeilv}}</a-descriptions-item>
- <a-descriptions-item label="涓昏酱璐熻嵎(%)">{{resultData.spindleload}}</a-descriptions-item>
- <a-descriptions-item label="涓昏酱杞��(rpm)">{{resultData.spindlespeed}}</a-descriptions-item>
- <a-descriptions-item label="杩涚粰閫熷害(mm/min)">{{resultData.feedrate}}</a-descriptions-item>
- </a-descriptions>
-
- <a-descriptions
- title="杩愯鏁版嵁 for lsv2"
- v-if="driverType == 'LSV2'"
- :column="4"
- >
- <a-descriptions-item label="涓昏酱鍊嶇巼(%)">{{resultData.spindlebeilv}}</a-descriptions-item>
- <a-descriptions-item label="璁惧姝e父杩愯鏃堕棿">{{resultData.equipmentNormalTime}}</a-descriptions-item>
- <a-descriptions-item label="蹇�熻繘缁欏�嶇巼(%)">{{resultData.rapidfeed}}</a-descriptions-item>
- <a-descriptions-item label="NC姝e父杩愯鏃堕棿">{{resultData.nCNormalTime}}</a-descriptions-item>
- <a-descriptions-item label="杩涚粰鍊嶇巼(%)">{{resultData.feedbeilv}}</a-descriptions-item>
- <a-descriptions-item label="璁惧杩愯鏃堕棿">{{resultData.equipmentTime}}</a-descriptions-item>
- <a-descriptions-item label="褰撳墠鍒�鍏峰彿">{{resultData.toolNum}}</a-descriptions-item>
- </a-descriptions> -->
-
- <!-- <a-descriptions
- title="绋嬪簭淇℃伅"
- v-if="driverType != 'LSV2' && driverType != 'ZUOLAN' "
- :column="4"
- >
- <a-descriptions-item label="搴忓垪鍙�">{{resultData.sequencenumber}}</a-descriptions-item>
- <a-descriptions-item
- label="褰撳墠鎵ц浠g爜"
- :span="2"
- >{{resultData.executingcode}}</a-descriptions-item>
- <a-descriptions-item label="宸ヤ欢鍚嶇О">{{resultData.productName}}</a-descriptions-item>
- </a-descriptions> -->
-
- <!-- <a-descriptions
- title="绋嬪簭淇℃伅 for lsv2"
- v-if="driverType == 'LSV2'"
- :column="4"
- >
- <a-descriptions-item label="褰撳墠绋嬪簭">{{resultData.program}}</a-descriptions-item>
- <a-descriptions-item label="绋嬪簭鎵ц鐐�">{{resultData.programPosition}}</a-descriptions-item>
- <a-descriptions-item label="鎿嶄綔妯″紡">{{resultData.operationType}}</a-descriptions-item>
- <a-descriptions-item label="閿欒淇℃伅缂栧彿涓�">{{resultData.firstErrorNum}}</a-descriptions-item>
- <a-descriptions-item label="閿欒淇℃伅涓�">{{resultData.firstError}}</a-descriptions-item>
- <a-descriptions-item label="閿欒淇℃伅">{{resultData.errorinfo}}</a-descriptions-item>
- <a-descriptions-item label="閿欒淇℃伅缂栧彿浜�">{{resultData.secondErrorNum}}</a-descriptions-item>
- <a-descriptions-item label="閿欒淇℃伅浜�">{{resultData.secondError}}</a-descriptions-item>
- </a-descriptions> -->
-
- <!--<a-descriptions
- title="杞寸洃鎺ф暟鎹� fro SIEMENS840DSL"
- v-if="driverType == 'SIEMENS840DSL'"
- :column="4"
- >
- <a-descriptions-item label="X杞存俯搴�">{{resultData.temperatureX}}</a-descriptions-item>
- <a-descriptions-item label="Y杞存俯搴�">{{resultData.temperatureY}}</a-descriptions-item>
- <a-descriptions-item label="Z杞存俯搴�">{{resultData.temperatureZ}}</a-descriptions-item>
- <a-descriptions-item label="A杞存俯搴�">{{resultData.temperatureA}}</a-descriptions-item>
- <a-descriptions-item label="B杞存俯搴�">{{resultData.temperatureB}}</a-descriptions-item>
- <a-descriptions-item label="X杞寸數娴�">{{resultData.equipmentCurrentX}}</a-descriptions-item>
- <a-descriptions-item label="Y杞寸數娴�">{{resultData.equipmentCurrentY}}</a-descriptions-item>
- <a-descriptions-item label="Z杞寸數娴�">{{resultData.equipmentCurrentZ}}</a-descriptions-item>
- <a-descriptions-item label="A杞寸數娴�">{{resultData.equipmentCurrentA}}</a-descriptions-item>
- <a-descriptions-item label="B杞寸數娴�">{{resultData.equipmentCurrentB}}</a-descriptions-item>
- <a-descriptions-item label="X杞撮殢鍔ㄨ宸�">{{resultData.equipmentLagErrorX}}</a-descriptions-item>
- <a-descriptions-item label="Y杞撮殢鍔ㄨ宸�">{{resultData.equipmentLagErrorY}}</a-descriptions-item>
- <a-descriptions-item label="Z杞撮殢鍔ㄨ宸�">{{resultData.equipmentLagErrorZ}}</a-descriptions-item>
- <a-descriptions-item label="A杞撮殢鍔ㄨ宸�">{{resultData.equipmentLagErrorA}}</a-descriptions-item>
- <a-descriptions-item label="B杞撮殢鍔ㄨ宸�">{{resultData.equipmentLagErrorB}}</a-descriptions-item>
- </a-descriptions>
--->
- <!-- <a-descriptions
- title="鍧愭爣淇℃伅 "
- v-if="driverType == 'FANUC'"
- :column="3"
- >
- <a-descriptions-item label="缁濆鍧愭爣X">{{resultData.xabsolute}}</a-descriptions-item>
- <a-descriptions-item label="缁濆鍧愭爣Y">{{resultData.yabsolute}}</a-descriptions-item>
- <a-descriptions-item label="缁濆鍧愭爣Z">{{resultData.zabsolute}}</a-descriptions-item>
- <a-descriptions-item label="鏈哄簥鍧愭爣X">{{resultData.xmachine}}</a-descriptions-item>
- <a-descriptions-item label="鏈哄簥鍧愭爣Y">{{resultData.ymachine}}</a-descriptions-item>
- <a-descriptions-item label="鏈哄簥鍧愭爣Z">{{resultData.zmachine}}</a-descriptions-item>
- </a-descriptions>
-
- <a-descriptions
- title="鍧愭爣淇℃伅 for lsv2"
- v-if="driverType == 'LSV2'"
- :column="4"
- >
- <a-descriptions-item label="X鍧愭爣">{{resultData.xmachine}}</a-descriptions-item>
- <a-descriptions-item label="Y鍧愭爣">{{resultData.ymachine}}</a-descriptions-item>
- <a-descriptions-item label="Z鍧愭爣">{{resultData.zmachine}}</a-descriptions-item>
- <a-descriptions-item label="A鍧愭爣">{{resultData.amachine}}</a-descriptions-item>
- <a-descriptions-item label="B鍧愭爣">{{resultData.bmachine}}</a-descriptions-item>
- <a-descriptions-item label="C鍧愭爣">{{resultData.cmachine}}</a-descriptions-item>
- </a-descriptions>
-
- <a-descriptions
- title="鍧愭爣淇℃伅 for lsv2"
- v-if="driverType == 'LSV2'"
- :column="4"
- >
- <a-descriptions-item label="X鍧愭爣">{{resultData.xmachine}}</a-descriptions-item>
- <a-descriptions-item label="Y鍧愭爣">{{resultData.ymachine}}</a-descriptions-item>
- <a-descriptions-item label="Z鍧愭爣">{{resultData.zmachine}}</a-descriptions-item>
- <a-descriptions-item label="A鍧愭爣">{{resultData.amachine}}</a-descriptions-item>
- <a-descriptions-item label="B鍧愭爣">{{resultData.bmachine}}</a-descriptions-item>
- <a-descriptions-item label="C鍧愭爣">{{resultData.cmachine}}</a-descriptions-item>
- </a-descriptions>
-
- <a-descriptions
- title="鍧愭爣淇℃伅"
- v-if="driverType == 'LSV2'"
- :column="4"
- >
- <a-descriptions-item label="X鍧愭爣">{{resultData.xmachine}}</a-descriptions-item>
- <a-descriptions-item label="Y鍧愭爣">{{resultData.ymachine}}</a-descriptions-item>
- <a-descriptions-item label="Z鍧愭爣">{{resultData.zmachine}}</a-descriptions-item>
- <a-descriptions-item label="A鍧愭爣">{{resultData.amachine}}</a-descriptions-item>
- <a-descriptions-item label="B鍧愭爣">{{resultData.bmachine}}</a-descriptions-item>
- <a-descriptions-item label="C鍧愭爣">{{resultData.cmachine}}</a-descriptions-item>
- </a-descriptions> -->
- <!---鏁版嵁婧愯皟鏁� 鍔ㄦ�佸睍绀� 杩愯鏁版嵁---->
-
- <a-descriptions
- title="杩愯鏁版嵁"
- v-show="mdcDriveTypeParamConfigList != null"
- v-if="driverType != 'PLC'"
- :column="4"
- class="operationData"
- >
-
- <a-descriptions-item
- v-for="(item,id) in mdcDriveTypeParamConfigList "
- :key="item.id"
- :label="item.chineseName"
- >
- <a-tooltip @mouseenter="mouseEnterItem">
- <template slot="title">
- {{item.value}}
- </template>
- <div class="description-item-class">{{item.value}}</div>
- </a-tooltip>
-
- </a-descriptions-item>
-
- </a-descriptions>
-
- </td>
- </tr>
- </table>
- </div>
- <template slot="footer">
- <a-button
- :style="{ marginRight: '8px' }"
- @click="handleCancel"
- style="color: #1191b0;"
- >鍏抽棴</a-button>
- </template>
- </a-modal>
- </div>
-</template>
-
-<script>
- import {
- getAction,
- postAction
- } from '@/api/manage'
- import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
-
- export default {
- name: 'EquipmentDetailModal',
- components: {},
- props: {},
- data() {
- return {
- mdcDriveTypeParamConfigList: [],
- xyzAliasesList: [],
- title: '',
- //涓昏酱鍊嶇巼
- spindlebeilv: 1,
- //杩涚粰鍊嶇巼
- feedbeilv: 1,
- // 涓昏酱璐熻嵎
- spindleload: 1,
- //蹇�熻繘缁欏�嶇巼
- rapidfeed: 1,
- visible: false,
- resultData: {},
- driverType: '',
- deviceTypeDict: '',
- url: {
- mdcEquipmentDetailedInfo: '/mdc/mdcEquipment/mdcEquipmentDetailedInfo'
- },
- modalTimer:null,
- ee:" "
- }
- },
- mounted() {
- },
- methods: {
- drawLine() {
- let _this = this
- if (_this.spindlebeilv) {
- //鍩轰簬鍑嗗濂界殑dom锛屽垵濮嬪寲echarts瀹炰緥
- let mdcEquiMoniGauge1 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge1'), 'macarons')
- let mdcEquiMoniGaugeOption1 = {
- tooltip: {
- formatter: "{a} <br/>{b} : {c}%"
- },
-
- series: [{
- name: "澶栭儴绾�",
- type: "gauge",
- radius: '65%', // 鍔ㄦ��
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#31F3FF'] // 鍔ㄦ��
- ],
- width: 1
- }
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitLine: {
- show: false,
- },
- detail: {
- show: false
- },
- title: { //鏍囬
- show: false,
- }
- },
- {
- name: '澶栭儴鍒诲害',
- type: 'gauge',
- radius: '80%',
- min: 0, //鏈�灏忓埢搴�
- max: 300, //鏈�澶у埢搴�
- splitNumber: 10, //鍒诲害鏁伴噺
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- show: false,
- lineStyle: {
- color: [
- [1, 'rgba(0,0,0,0)']
- ],
- }
- }, //浠〃鐩樿酱绾�
- axisLabel: {
- show: true,
- color: '#31F3FF',
- fontSize: 10, // 鍔ㄦ��
- distance: -20, // 鍔ㄦ��
-
- }, //鍒诲害鏍囩銆�
- axisTick: {
- show: false,
- }, //鍒诲害鏍峰紡
- splitLine: {
- show: false,
- },
- },
- {
- name: "鍐呴儴瀹界嚎鏉�",
- type: "gauge",
- radius: '55%',
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#122B3C']
- ],
- width: 4
- }
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitLine: {
- show: false,
- },
- detail: {
- show: false
- },
- title: {
- show: false,
- }
- },
- {
- name: "鍐呴儴缁嗙嚎鏉�",
- type: "gauge",
- radius: '40%',
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#122B3C']
- ],
- width: 3
- }
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitLine: {
- show: false,
- },
- detail: {
- show: false
- },
- title: {
- show: false,
- }
- },
- {
- name: "闂撮殧鏉″舰",
- type: "gauge",
- radius: '52.5%',
- z: 4,
- splitNumber: 35,
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- opacity: 0
- }
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- length: 20,
- splitNumber: 1,
- lineStyle: {
- color: '#122B3C',
- width: 1
- }
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: {
- show: false,
- }
- },
- {
- name: "鏁版嵁",
- type: "gauge",
- radius: '52.5%',
- z: 3,
- startAngle: 225,
- max: 300,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [_this.spindlebeilv / 300, '#31F3FF'], // 鍔ㄦ��
- [1, '#185363']
- ],
- width: 4
- }
- },
- tooltip: {
- show: false
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitLine: {
- show: false
- },
- detail: {
- show: true,
- fontWeight: 'bold',
- fontSize: 12,
- color: '#fff'
- },
- pointer: {
- show: true,
- width: 3,
- itemStyle:{
- color:'#fff',
- }
- },
- data: [{
- name: '',
- value: _this.spindlebeilv
- }]
- },
- // 鍐呭渾
- {
- "name": '鍐呭渾鐜�',
- "type": 'pie',
- "radius": ['4%', '2%'],
- "hoverAnimation": false,
- tooltip: {
- show: false
- },
- cursor: "default",
- "labelLine": {
- "normal": {
- "show": false
- }
- },
- itemStyle: {
- color: '#fff'
- },
- animation: false,
- "data": [1]
- },
- // 鍐呭渾
- {
- "name": '鍐呭渾鐜�2',
- "type": 'pie',
- "radius": '2%',
- "hoverAnimation": false,
- cursor: "default",
- tooltip: {
- show: false
- },
- "labelLine": {
- "normal": {
- "show": false
- }
- },
- itemStyle: {
- color: '#31F3FF'
- },
- animation: false,
- "data": [1]
- },
- ]
- };
- mdcEquiMoniGauge1.setOption(mdcEquiMoniGaugeOption1)
- }
- if (_this.feedbeilv) {
- let mdcEquiMoniGauge2 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge2'), 'macarons')
- let mdcEquiMoniGaugeOption2 = {
- tooltip: {
- formatter: "{a} <br/>{b} : {c}%"
- },
-
- series: [{
- name: "澶栭儴绾�",
- type: "gauge",
- radius: '65%', // 鍔ㄦ��
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#31F3FF'] // 鍔ㄦ��
- ],
- width: 1
- }
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitLine: {
- show: false,
- },
- detail: {
- show: false
- },
- title: { //鏍囬
- show: false,
- }
- },
- {
- name: '澶栭儴鍒诲害',
- type: 'gauge',
- radius: '80%',
- min: 0, //鏈�灏忓埢搴�
- max: 300, //鏈�澶у埢搴�
- splitNumber: 10, //鍒诲害鏁伴噺
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- show: false,
- lineStyle: {
- color: [
- [1, 'rgba(0,0,0,0)']
- ],
- }
- }, //浠〃鐩樿酱绾�
- axisLabel: {
- show: true,
- color: '#31F3FF',
- fontSize: 10, // 鍔ㄦ��
- distance: -20, // 鍔ㄦ��
-
- }, //鍒诲害鏍囩銆�
- axisTick: {
- show: false,
- }, //鍒诲害鏍峰紡
- splitLine: {
- show: false,
- },
- },
- {
- name: "鍐呴儴瀹界嚎鏉�",
- type: "gauge",
- radius: '55%',
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#122B3C']
- ],
- width: 4
- }
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitLine: {
- show: false,
- },
- detail: {
- show: false
- },
- title: {
- show: false,
- }
- },
- {
- name: "鍐呴儴缁嗙嚎鏉�",
- type: "gauge",
- radius: '40%',
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#122B3C']
- ],
- width: 3
- }
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitLine: {
- show: false,
- },
- detail: {
- show: false
- },
- title: {
- show: false,
- }
- },
- {
- name: "闂撮殧鏉″舰",
- type: "gauge",
- radius: '52.5%',
- z: 4,
- splitNumber: 35,
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- opacity: 0
- }
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- length: 20,
- splitNumber: 1,
- lineStyle: {
- color: '#122B3C',
- width: 1
- }
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: {
- show: false,
- }
- },
- {
- name: "鏁版嵁",
- type: "gauge",
- radius: '52.5%',
- z: 3,
- startAngle: 225,
- max: 300,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [_this.feedbeilv / 300, '#31F3FF'], // 鍔ㄦ��
- [1, '#185363']
- ],
- width: 4
- }
- },
- tooltip: {
- show: false
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitLine: {
- show: false
- },
- detail: {
- show: true,
- fontWeight: 'bold',
- fontSize: 12,
- color: '#fff'
- },
- pointer: {
- show: true,
- width: 3,
- itemStyle:{
- color:'#fff'
- }
- },
- data: [{
- name: '',
- value: _this.feedbeilv
- }]
- },
- // 鍐呭渾
- {
- "name": '鍐呭渾鐜�',
- "type": 'pie',
- "radius": ['4%', '2%'],
- "hoverAnimation": false,
- tooltip: {
- show: false
- },
- cursor: "default",
- "labelLine": {
- "normal": {
- "show": false
- }
- },
- itemStyle: {
- color: '#fff'
- },
- animation: false,
- "data": [1]
- },
- // 鍐呭渾
- {
- "name": '鍐呭渾鐜�2',
- "type": 'pie',
- "radius": '2%',
- "hoverAnimation": false,
- cursor: "default",
- tooltip: {
- show: false
- },
- "labelLine": {
- "normal": {
- "show": false
- }
- },
- itemStyle: {
- color: '#31F3FF'
- },
- animation: false,
- "data": [1]
- },
- ]
- };
- mdcEquiMoniGauge2.setOption(mdcEquiMoniGaugeOption2)
- }
- if (_this.spindleload) {
- let mdcEquiMoniGauge3 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge3'), 'macarons')
- let mdcEquiMoniGaugeOption3 = {
- tooltip: {
- formatter: "{a} <br/>{b} : {c}%"
- },
-
- series: [{
- name: "澶栭儴绾�",
- type: "gauge",
- radius: '65%', // 鍔ㄦ��
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#31F3FF'] // 鍔ㄦ��
- ],
- width: 1
- }
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitLine: {
- show: false,
- },
- detail: {
- show: false
- },
- title: { //鏍囬
- show: false,
- }
- },
- {
- name: '澶栭儴鍒诲害',
- type: 'gauge',
- radius: '80%',
- min: 0, //鏈�灏忓埢搴�
- max: 100, //鏈�澶у埢搴�
- splitNumber: 10, //鍒诲害鏁伴噺
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- show: false,
- lineStyle: {
- color: [
- [1, 'rgba(0,0,0,0)']
- ],
- }
- }, //浠〃鐩樿酱绾�
- axisLabel: {
- show: true,
- color: '#31F3FF',
- fontSize: 10, // 鍔ㄦ��
- distance: -20, // 鍔ㄦ��
-
- }, //鍒诲害鏍囩銆�
- axisTick: {
- show: false,
- }, //鍒诲害鏍峰紡
- splitLine: {
- show: false,
- },
- },
- {
- name: "鍐呴儴瀹界嚎鏉�",
- type: "gauge",
- radius: '55%',
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#122B3C']
- ],
- width: 4
- }
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitLine: {
- show: false,
- },
- detail: {
- show: false
- },
- title: {
- show: false,
- }
- },
- {
- name: "鍐呴儴缁嗙嚎鏉�",
- type: "gauge",
- radius: '40%',
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#122B3C']
- ],
- width: 3
- }
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitLine: {
- show: false,
- },
- detail: {
- show: false
- },
- title: {
- show: false,
- }
- },
- {
- name: "闂撮殧鏉″舰",
- type: "gauge",
- radius: '52.5%',
- z: 4,
- splitNumber: 35,
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- opacity: 0
- }
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- length: 20,
- splitNumber: 1,
- lineStyle: {
- color: '#122B3C',
- width: 1
- }
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: {
- show: false,
- }
- },
- {
- name: "鏁版嵁",
- type: "gauge",
- radius: '52.5%',
- z: 3,
- startAngle: 225,
- max: 100,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [_this.spindleload / 100, '#31F3FF'], // 鍔ㄦ��
- [1, '#185363']
- ],
- width: 4
- }
- },
- tooltip: {
- show: false
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitLine: {
- show: false
- },
- detail: {
- show: true,
- fontWeight: 'bold',
- fontSize: 12,
- color: '#fff'
- },
- pointer: {
- show: true,
- width: 3,
- itemStyle:{
- color:'#fff'
- }
- },
- data: [{
- name: '',
- value: _this.spindleload
- }]
- },
- // 鍐呭渾
- {
- "name": '鍐呭渾鐜�',
- "type": 'pie',
- "radius": ['4%', '2%'],
- "hoverAnimation": false,
- tooltip: {
- show: false
- },
- cursor: "default",
- "labelLine": {
- "normal": {
- "show": false
- }
- },
- itemStyle: {
- color: '#fff'
- },
- animation: false,
- "data": [1]
- },
- // 鍐呭渾
- {
- "name": '鍐呭渾鐜�2',
- "type": 'pie',
- "radius": '2%',
- "hoverAnimation": false,
- cursor: "default",
- tooltip: {
- show: false
- },
- "labelLine": {
- "normal": {
- "show": false
- }
- },
- itemStyle: {
- color: '#31F3FF'
- },
- animation: false,
- "data": [1]
- },
- ]
- };
- mdcEquiMoniGauge3.setOption(mdcEquiMoniGaugeOption3)
- }
- if (_this.rapidfeed) {
- let mdcEquiMoniGauge4 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge4'), 'macarons')
- let mdcEquiMoniGaugeOption4 = {
- tooltip: {
- formatter: "{a} <br/>{b} : {c}%"
- },
-
- series: [{
- name: "澶栭儴绾�",
- type: "gauge",
- radius: '65%', // 鍔ㄦ��
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#31F3FF'] // 鍔ㄦ��
- ],
- width: 1
- }
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitLine: {
- show: false,
- },
- detail: {
- show: false
- },
- title: { //鏍囬
- show: false,
- }
- },
- {
- name: '澶栭儴鍒诲害',
- type: 'gauge',
- radius: '80%',
- min: 0, //鏈�灏忓埢搴�
- max: 300, //鏈�澶у埢搴�
- splitNumber: 10, //鍒诲害鏁伴噺
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- show: false,
- lineStyle: {
- color: [
- [1, 'rgba(0,0,0,0)']
- ],
- }
- }, //浠〃鐩樿酱绾�
- axisLabel: {
- show: true,
- color: '#31F3FF',
- fontSize: 10, // 鍔ㄦ��
- distance: -20, // 鍔ㄦ��
-
- }, //鍒诲害鏍囩銆�
- axisTick: {
- show: false,
- }, //鍒诲害鏍峰紡
- splitLine: {
- show: false,
- },
- },
- {
- name: "鍐呴儴瀹界嚎鏉�",
- type: "gauge",
- radius: '55%',
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#122B3C']
- ],
- width: 4
- }
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitLine: {
- show: false,
- },
- detail: {
- show: false
- },
- title: {
- show: false,
- }
- },
- {
- name: "鍐呴儴缁嗙嚎鏉�",
- type: "gauge",
- radius: '40%',
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#122B3C']
- ],
- width: 3
- }
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitLine: {
- show: false,
- },
- detail: {
- show: false
- },
- title: {
- show: false,
- }
- },
- {
- name: "闂撮殧鏉″舰",
- type: "gauge",
- radius: '52.5%',
- z: 4,
- splitNumber: 35,
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- opacity: 0
- }
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- length: 20,
- splitNumber: 1,
- lineStyle: {
- color: '#122B3C',
- width: 1
- }
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: {
- show: false,
- }
- },
- {
- name: "鏁版嵁",
- type: "gauge",
- radius: '52.5%',
- z: 3,
- startAngle: 225,
- max: 300,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [_this.rapidfeed / 300, '#31F3FF'], // 鍔ㄦ��
- [1, '#185363']
- ],
- width: 4
- }
- },
- tooltip: {
- show: false
- },
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitLine: {
- show: false
- },
- detail: {
- show: true,
- fontWeight: 'bold',
- fontSize: 12,
- color: '#fff'
- },
- pointer: {
- show: true,
- width: 3,
- itemStyle:{
- color:'#fff'
- }
- },
- data: [{
- name: '',
- value: _this.rapidfeed
- }]
- },
- // 鍐呭渾
- {
- "name": '鍐呭渾鐜�',
- "type": 'pie',
- "radius": ['4%', '2%'],
- "hoverAnimation": false,
- tooltip: {
- show: false
- },
- cursor: "default",
- "labelLine": {
- "normal": {
- "show": false
- }
- },
- itemStyle: {
- color: '#fff'
- },
- animation: false,
- "data": [1]
- },
- // 鍐呭渾
- {
- "name": '鍐呭渾鐜�2',
- "type": 'pie',
- "radius": '2%',
- "hoverAnimation": false,
- cursor: "default",
- tooltip: {
- show: false
- },
- "labelLine": {
- "normal": {
- "show": false
- }
- },
- itemStyle: {
- color: '#31F3FF'
- },
- animation: false,
- "data": [1]
- },
- ]
- };
- mdcEquiMoniGauge4.setOption(mdcEquiMoniGaugeOption4)
- }
- },
- close() {
- this.$emit('close')
- this.visible = false
- clearInterval(this.modalTimer);
- this.modalTimer = null
- },
- handleCancel() {
- this.close()
- clearInterval(this.modalTimer);
- this.modalTimer = null
- },
- // initDeviceType(deviceTypeId) {
- // let dictCode = 'mdc_equipmentType'
- // let items = []
- // items = getDictItemsFromCache(dictCode)
- // if (items && items.length > 0) {
- // for (let i = 0; i < items.length; i++) {
- // if (deviceTypeId == items[i].value) {
- // this.deviceTypeDict = items[i].title
- // }
- // }
- // } else {
- // ajaxGetDictItems(dictCode, null).then((res) => {
- // if (res.success) {
- // let items = res.result
- // for (let i = 0; i < items.length; i++) {
- // if (deviceTypeId == items[i].value) {
- // this.deviceTypeDict = items[i].title
- // }
- // }
- // }
- // })
- // }
- // },
- timerModel(id){
- this.ee = id
- this.modalTimer = setInterval(() => {
- setTimeout( this.initData(this.ee),0)
- },1000*4)
- },
-
- initData(id) {
- let _this = this
- this.visible = true
- // _this.drawLine()
- getAction(this.url.mdcEquipmentDetailedInfo, { id: id }).then((res) => {
- if (res.success) {
- _this.resultData = res.result
- _this.driverType = res.result.deviceType
- _this.spindlebeilv = res.result.spindlebeilv
- _this.feedbeilv = res.result.feedbeilv
- _this.spindleload = res.result.spindleload
- _this.rapidfeed = res.result.rapidfeed;
- _this.mdcDriveTypeParamConfigList = res.result.mdcDriveTypeParamConfigList;
- _this.xyzAliasesList = res.result.xyzAliasesList;
- this.$nextTick(() => {
- _this.drawLine()
- })
- // _this.initDeviceType(_this.resultData.deviceType)
- } else {
- // _this.$message.warn(res.message)
- _this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- })
-
- },
-
- mouseEnterItem(e){
- console.log(e, e.target, e.target.clientWidth, e.target.scrollWidth)
- if (e.target.clientWidth >= e.target.scrollWidth) {
- e.target.style.pointerEvents = 'none' // 闃绘榧犳爣浜嬩欢 pointer-events 灞炴�х敤浜庤缃厓绱犳槸鍚﹀榧犳爣浜嬩欢鍋氬嚭鍙嶅簲銆�
- }
- }
- },
- beforeDestroy(){
- clearInterval(this.modalTimer);
- this.modalTimer = null
- }
- }
-</script>
-
-<style scoped lang="less">
- body {
- overflow-y: hidden !important;
- }
- .full-modal {
- .ant-modal {
- top: 0;
- padding-bottom: 0;
- margin: 0;
- background-color: #4a4a48 !important;
- opacity: 0.5;
- }
- /deep/ .ant-modal-content {
- display: flex;
- flex-direction: column;
- /*height: calc(100vh);*/
- background-color: #4a4a48;
- }
- .ant-modal-body {
- flex: 1;
- }
- }
- /deep/ .ant-modal-content {
- /*background: -moz-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.27) 100%);*/
- /*background: -webkit-gradient(linear, left left, right right, color-stop(0%, rgba(0, 0, 0, 0.66)), color-stop(100%, rgba(0, 0, 0, 0.4)));*/
- /*background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: -o-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: -ms-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- background-color: #312c2c;
- opacity: 0.9;
- }
- /deep/ .ant-modal-close {
- color: #1191b0;
- font-size: 24px;
- }
- /deep/ .ant-modal-close-x {
- font-size: 24px;
- }
- /deep/ .ant-modal-footer {
- border-top: none;
- }
- /deep/ .ant-descriptions {
- border: 1px solid #16738d;
- margin: 10px 0;
- }
- /deep/ .ant-descriptions-title {
- color: #fff;
- padding: 10px;
- margin-bottom: 0;
- }
- /deep/ .ant-descriptions-view {
- padding: 0 20px;
- }
- /deep/ .ant-descriptions-view .ant-descriptions-row .ant-descriptions-item {
- padding-bottom: 5px;
- }
- /deep/ .ant-descriptions-item-colon {
- color: #fff;
- width: 5.1vw;
- }
- /deep/ .ant-descriptions-item-content {
- color: #fff;
- border: 1px solid #4bcfc8;
- padding: 0 10px;
- width: auto;
- min-width: 130px;
- /*max-width: 300px;*/
- height: 25px;
- }
-
- .mdcEquipMon {
- color: #fff;
- }
- fieldset {
- border: 1px solid #16738d;
- padding: 17px;
- margin: 14px;
- }
-
- fieldset legend {
- display: inline;
- width: 88px;
- }
-
- table tr td {
- text-align: left;
- color: #fff;
- }
-
- table tr td input {
- border: 1px solid #a6eff9;
- }
-
- .ant-btn {
- padding: 0 10px;
- margin-left: 3px;
- color: #fff !important;
- background-color: #1191b0;
- border: none;
- }
-
- .ant-form-item-control {
- line-height: 0px;
- }
-
- /** 涓昏〃鍗曡闂磋窛 */
- .ant-form .ant-form-item {
- margin-bottom: 10px;
- }
-
- /** Tab椤甸潰琛岄棿璺� */
- .ant-tabs-content .ant-form-item {
- margin-bottom: 0px;
- }
-
- /deep/ .ant-descriptions-item-label{
- width: 6.7vw;
- text-align: right;
- margin-right: 10px;
- }
-
- /deep/ .operationData .ant-descriptions-item-content
- {
- width: 130px;
- overflow: hidden;
- }
-
- .description-item-class{
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
-</style>
diff --git a/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentLayout.vue b/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentLayout.vue
deleted file mode 100644
index f8099d1..0000000
--- a/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentLayout.vue
+++ /dev/null
@@ -1,176 +0,0 @@
-<template>
- <a-card :bordered="false">
- <div class="containerequip">
- <div class="container_content">
- <div class="contnet" v-for="(item,index) in dataList" :key="index" :class="node == item.equipmentId ? 'addclass' : '' ">
-
- <div class="content_equipment" @click="openDetail(item)">
- <div class="equipment_box">
- <div>
- <img style="width: 11%;" :src="getStatusImgUrl(item.oporation)" alt="">
- <img class="orange" :src="getImgUrl(item.equipmentTypePictures)">
- </div>
- </div>
- </div>
- <p style="margin-top: 5px;">
- <span ref="message">{{item.equipmentName}}({{item.equipmentId}})</span>
- </p>
- </div>
- </div>
- </div>
- <equipment-detail-modal ref="equipmentDetailModal"></equipment-detail-modal>
- </a-card>
-</template>
-
-<script>
- import EquipmentDetailModal from './EquipmentDetailModal'
- import {getFileAccessHttpUrl} from '@/api/manage';
- import {
- getAction
- } from '@/api/manage'
-
- export default {
- name: 'EquipmentLayout',
- components: { EquipmentDetailModal },
- props: { dataList: {
- type: Array,
- required: true,
- default: []
- }, equipmentId: '' ,
- node:''},
- data() {
- return {
- equipMessageTimer:''
- }
- },
- created() {
- },
- mounted() {
-
- },
- methods: {
- getImgUrl(img){
- if(img == null || img ==''){
- return require("../../../../../assets/default.png");
- }
- return getFileAccessHttpUrl(img)
- },
- getStatusImgUrl(imgStaus){
- if(imgStaus == 1){
- return require("../../../../../assets/yellow.png");
- }else if(imgStaus == 2){
- return require("../../../../../assets/yellow.png");
- }else if(imgStaus == 3){
- return require("../../../../../assets/green.png");
- }else if(imgStaus ==22){
- return require("../../../../../assets/red.png");
- }else if(imgStaus ==0){
- return require("../../../../../assets/gray.png");
- }else{
- return require("../../../../../assets/gray.png");
- }
- },
- getBackgroundUrl(imgurl){
- return require("../../../../../assets/"+imgurl+".gif");
- },
- openDetail(item) {
- if(item.oporation == 0){
- // this.$message.warn("璁惧澶勪簬鍏虫満鐘舵�侊紒");
- this.$notification.warning({
- message:'娑堟伅',
- description:"璁惧澶勪簬鍏虫満鐘舵�侊紒"
- });
- return false;
- }
- console.log(item);
- this.$refs.equipmentDetailModal.initData(item.id);
- this.$refs.equipmentDetailModal.timerModel(item.id);
- // this.equipMessageTimer = setInterval(() => {
- // setTimeout( this.$refs.equmentDetaiModel.initData(item.equipmentId),0)
- // },1000*10)
- }
- },
- beforeDestroy(){
- // clearInterval(this.equipMessageTimer);
- // this.equipMessageTimer = null
- }
- }
-</script>
-<style scoped>
- .gray{
- background-image: url("../../../../../assets/gray.gif");
- -webkit-background-size: 100% 100%;
- background-size: 100% 100%;
- background-repeat: no-repeat;
- }
- .green{
- background-image: url("../../../../../assets/green.gif");
- -webkit-background-size: 100% 100%;
- background-size: 100% 100%;
- background-repeat: no-repeat;
- }
- .red{
- background-image: url("../../../../../assets/red.gif");
- -webkit-background-size: 100% 100%;
- background-size: 100% 100%;
- background-repeat: no-repeat;
- }
- .orange{
- /*background-image: url("../../../../../assets/orange.gif");*/
- -webkit-background-size: 100% 100%;
- background-size: 100% 100%;
- background-repeat: no-repeat;
- }
- .equipment_box img{
- width: 45%;
- }
-
- .containerequip{
- overflow: auto;
- }
-
- @media screen and (min-width: 1920px){
- .containerequip{
- height: 640px!important;
- }
- }
- @media screen and (min-width: 1680px) and (max-width: 1920px){
- .containerequip{
- height: 640px!important;
- }
- }
- @media screen and (min-width: 1400px) and (max-width: 1680px){
- .containerequip{
- height: 493px!important;
- }
- }
- @media screen and (min-width: 1280px) and (max-width: 1400px){
- .containerequip{
- height: 493px!important;
- }
- }
- @media screen and (max-width: 1280px){
- .containerequip{
- height: 394px!important;
- }
- }
- .container_content {
- width: 100%;
- position: relative;
- }
-
- .container_content .contnet {
- width: 20%;
- display: inline-block;
- text-align: center;
- margin-bottom: 5%;
- }
-
- .container_content .contnet p {
- padding-top: 5%;
- }
-
- .addclass p {
- border-bottom: 2px solid #e957ff;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentList.vue b/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentList.vue
deleted file mode 100644
index 07795c1..0000000
--- a/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentList.vue
+++ /dev/null
@@ -1,200 +0,0 @@
-<template>
- <a-card :bordered="false" style="display: flex;flex-direction: column">
-
- <!-- 鏌ヨ鍖哄煙 -->
- <!--<div class="table-page-search-wrapper">-->
- <!--<a-form layout="inline" @keyup.enter.native="searchQuery">-->
- <!--<a-row :gutter="24">-->
- <!--<a-col :md="7" :sm="7">-->
- <!--<a-form-item label="璁惧鍚嶇О">-->
- <!--<a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" v-model="queryParam.equipmentName"></a-input>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <!--<a-col :md="7" :sm="7">-->
- <!--<a-form-item label="鐘舵��">-->
- <!--<a-select v-model="queryParam.status" placeholder="璇烽�夋嫨">-->
- <!--<a-select-option value="">璇烽�夋嫨</a-select-option>-->
- <!--<a-select-option value="0">鍏虫満</a-select-option>-->
- <!--<a-select-option value="2">寰呮満</a-select-option>-->
- <!--<a-select-option value="3">杩愯</a-select-option>-->
- <!--<a-select-option value="22">鎶ヨ</a-select-option>-->
- <!--</a-select>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <!--<a-col :md="3" :sm="3">-->
- <!--<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">-->
- <!--<a @click="handleToggleSearch" style="margin-left: 8px">-->
- <!--{{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }}-->
- <!--<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
- <!--</a>-->
- <!--</span>-->
- <!--</a-col>-->
- <!--</a-row>-->
- <!--<a-row :gutter="24">-->
- <!--<template v-if="toggleSearchStatus">-->
- <!--<a-col :md="12" :sm="12">-->
- <!--<a-form-item label="閲囬泦鏃堕棿">-->
- <!--<a-range-picker @change="dateParamChange" v-model="dates"/>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <!--</template>-->
-
- <!--</a-row>-->
- <!--</a-form>-->
- <!--</div>-->
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <!--<div class="table-operator" style="border-top: 5px">-->
- <!--<a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>-->
- <!--<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>-->
- <!--</div>-->
-
- <div class="equipmentList" id="DeviceList">
- <!--<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
- <!--<i class="anticon anticon-info-circle ant-alert-icon"></i>宸查�夋嫨 <a style="font-weight: 600">{{-->
- <!--selectedRowKeys.length }}</a>椤� -->
- <!--<a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>-->
- <!--</div>-->
-
- <a-table ref="table" bordered size="middle" rowKey="equipmentId" :columns="columns" :dataSource="dataSource"
- :pagination="false" :loading="loading" :scroll="{x:'max-content',y:scrollY}">
- <template slot="equipmentId" slot-scope="text, record">
- <div :style="{color:record.equipmentStatus!==0?'#f00':null}">{{text}}</div>
- </template>
- <template slot="equipmentName" slot-scope="text, record">
- <div :style="{color:record.equipmentStatus!==0?'#f00':null}">{{text}}</div>
- </template>
- <template slot="oporationDict" slot-scope="text, record">
- <div :style="{color:record.equipmentStatus!==0?'#f00':null}">{{text}}</div>
- </template>
- <template slot="equipmentStatus" slot-scope="text">
- <div :style="{color:text!==0?'#f00':null}">{{text===0?'姝e父':'寮傚父'}}</div>
- </template>
- <template slot="collecttime" slot-scope="text, record">
- <div :style="{color:record.equipmentStatus!==0?'#f00':null}">{{text}}</div>
- </template>
- <template slot="action" slot-scope="text, record">
- <a-popconfirm title="纭畾鍙嶉鍚�?" @confirm="$emit('editEquipmentStatus',record)" v-has="'deiveBaseInfo:responseStatus'">
- <a>鐘舵�佸弽棣�</a>
- </a-popconfirm>
- </template>
- </a-table>
-
- </div>
- </a-card>
-</template>
-
-<script>
- import { postAction } from '@/api/manage'
-
- export default {
- name: 'EquipmentLayout',
- components: { },
- data() {
- return {
- loading:false,
- url: {
-
- },
- columns: [
- {
- title: '璁惧ID',
- align: "center",
- dataIndex: 'equipmentId',
- scopedSlots: {customRender: 'equipmentId'},
- width:210
- },
- {
- title: '璁惧鍚嶇О',
- align: "center",
- dataIndex: 'equipmentName',
- scopedSlots: {customRender: 'equipmentName'},
- width:300
- },
- {
- title: '鐘舵��',
- align: "center",
- dataIndex: 'oporationDict',
- scopedSlots: {customRender: 'oporationDict'},
- width:200
- },
- {
- title: '璁惧寮傚父',
- align: "center",
- dataIndex: 'equipmentStatus',
- scopedSlots: {customRender: 'equipmentStatus'},
- width:200
- },
- {
- title: '閲囬泦鏃堕棿',
- align: "center",
- dataIndex: 'collecttime',
- defaultSortOrder:'descend',
- sorter: (a, b) => {return a.collecttime>b.collecttime?1:-1},
- scopedSlots: {customRender: 'collecttime'},
- width:350
- },
- {
- title: '鎿嶄綔',
- dataIndex: 'action',
- scopedSlots: {customRender: 'action'},
- align: "center",
- width: 150,
- fixed:'right'
- }
- ],
- scrollY:465,
- }
- },
- props: { dataSource: {
- type: Array,
- required: true,
- default: []
- } },
- watch: {
- },
- methods: {
- handleWindowResize(){
- const boxHeight = +window.getComputedStyle(document.getElementById('DeviceList')).height.slice(0,-2)
- const tableHeadHeight = +window.getComputedStyle(document.querySelector('.ant-table-thead th')).height.slice(0,-2)
- this.scrollY = boxHeight - tableHeadHeight
- },
- },
- mounted(){
- window.addEventListener('resize',this.handleWindowResize)
- this.handleWindowResize()
- },
- }
-</script>
-<style scoped>
- .equipmentList{
- flex: 1;
- overflow: hidden;
- }
-
- @media screen and (min-width: 1920px){
- .equipmentList{
- height: 640px!important;
- }
- }
- @media screen and (min-width: 1680px) and (max-width: 1920px){
- .equipmentList{
- height: 640px!important;
- }
- }
- @media screen and (min-width: 1400px) and (max-width: 1680px){
- .equipmentList{
- height: 493px!important;
- }
- }
- @media screen and (min-width: 1280px) and (max-width: 1400px){
- .equipmentList{
- height: 493px!important;
- }
- }
- @media screen and (max-width: 1280px){
- .equipmentList{
- height: 394px!important;
- }
- }
-
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/DeviceLog/AlarmLogList.vue b/src/views/mdc/base/modules/DeviceLog/AlarmLogList.vue
deleted file mode 100644
index 4aa3935..0000000
--- a/src/views/mdc/base/modules/DeviceLog/AlarmLogList.vue
+++ /dev/null
@@ -1,167 +0,0 @@
-<template>
- <a-card :bordered="false">
- <!-- table鍖哄煙-begin -->
- <div class="table_alarmLogist">
- <a-table ref="table" bordered size="middle" :rowKey="(record,index)=>{return index}" :columns="columns"
- :dataSource="dataList" :pagination="false" :loading="loadingwarnStatus">
- <template slot="status" slot-scope="status">
- <div v-if="status == '3' || status == '23'" style="color: #00ee00;width: 100%; height: 100%;">杩愯</div>
- <div v-else-if="status == '1' || status == '2'" style="color: #ffea91;width: 100%; height: 100%;">寰呮満</div>
- <div v-else-if="status == '0'" style="color: #A8A8A8;width: 100%; height: 100%;">鍏虫満</div>
- <div v-else-if="status == '22'" style="color: red;width: 100%; height: 100%;">鎶ヨ</div>
- </template>
- </a-table>
- </div>
- </a-card>
-</template>
-
-<script>
- import JDictSelectTag from '@/components/dict/JDictSelectTag'
-
- import JInput from '@/components/jeecg/JInput'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import Tooltip from 'ant-design-vue/es/tooltip'
-
- export default {
- name: 'AlarmLogList',
- components: {
- Tooltip,
- JDictSelectTag,
- JInput,
- JEllipsis
- },
- props: {
- dataList: {
- type: Array,
- required: true,
- default: []
- },
- loadingwarnStatus:{
- type:Boolean,
- default: false
- }
- },
- data() {
- return {
- disabled: true,
- columns: [
- {
- title: '鐘舵��',
- align: 'center',
- dataIndex: 'status',
- scopedSlots: { customRender: 'status' }
- },
- {
- title: '鎶ヨ鏃堕棿',
- align: 'center',
- dataIndex: 'startTime',
- // defaultSortOrder:'descend',
- // sorter: (a, b) => {return a.startTime>b.startTime?1:-1}
- },
- {
- title: '缁撴潫鏃堕棿',
- align: 'center',
- dataIndex: 'endTime',
- // defaultSortOrder:'descend',
- // sorter: (a, b) => {return a.endTime>b.endTime?1:-1}
- },
- {
- title: '鎸佺画鏃堕棿',
- align: 'center',
- dataIndex: 'duration',
- customRender:(t,r,index) =>{
- // console.log(t)
- var ss = parseInt(t)
- if(ss>=3600){
- // 鏍规嵁绉掓暟杞崲鎴愬搴旂殑鏃跺垎绉�
- const hour = parseInt(ss / 3600) < 10 ? '0' + parseInt(ss / 3600) : parseInt(ss / 3600)
- const min = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60)
- const sec = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60)
- if(min == '00') {
- if(sec == '00'){
- return hour + '灏忔椂'
- }else{
- return hour + '灏忔椂'+ sec + '绉�'
- }
-
- }else{
- if(sec == '00') {
- return hour + '灏忔椂' + min + '鍒�'
- }else{
- return hour + '灏忔椂' + min + '鍒�' + sec + '绉�'
- }
- }
- // if(sec == '00'){
- // return hour + '灏忔椂' + min + '鍒�'
- // }
- // if(min == '00' && sec == '00'){
- // return hour + '灏忔椂'
- // }
- // return hour + '灏忔椂' + min + '鍒�' + sec + '绉�'
-
- }else if(60<ss && ss<3600){
- const min1 = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60)
- const sec1 = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60)
- return min1 + '鍒�' + sec1 + "绉�"
- }else{
- const sec2 = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60)
- return sec2 + '绉�'
- }
- }
- // defaultSortOrder:'descend',
- // sorter: (a, b) => {return a.duration>b.duration?1:-1}
- },
- {
- title: '鎶ヨ鍙�',
- align: 'center',
- dataIndex: 'alarm'
- },
- {
- title: '鎶ヨ鎻忚堪',
- align: 'center',
- dataIndex: 'alarmContent'
- }
- ],
- url: {}
- }
- },
- methods: {},
- created() {
- }
-
- }
-</script>
-
-<style lang="less" scoped>
- @import '~@assets/less/common.less';
- @media screen and (min-width: 1920px){
- .table_alarmLogist{
- height: 417px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1680px) and (max-width: 1920px){
- .table_alarmLogist{
- height: 417px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1400px) and (max-width: 1680px){
- .table_alarmLogist{
- height: 266px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1280px) and (max-width: 1400px){
- .table_alarmLogist{
- height: 360px!important;
- overflow: scroll;
- }
- }
- @media screen and (max-width: 1280px){
- .table_alarmLogist{
- height: 170px!important;
- overflow: scroll;
- }
- }
-</style>
diff --git a/src/views/mdc/base/modules/DeviceLog/LogInfo.vue b/src/views/mdc/base/modules/DeviceLog/LogInfo.vue
deleted file mode 100644
index da70e00..0000000
--- a/src/views/mdc/base/modules/DeviceLog/LogInfo.vue
+++ /dev/null
@@ -1,411 +0,0 @@
-<template>
- <div id="mdcLogLayout" style="width: 100%; height: 100%; overflow: hidden">
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="4" :sm="4">
- <a-form-item label="璁惧缂栧彿">
- <a-input placeholder="璇烽�夋嫨璁惧" :readOnly="readOnly" v-model="queryParams.equipmentId"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="6">
- <a-form-item label="璁惧鍚嶇О">
- <a-input placeholder="璇烽�夋嫨璁惧" :readOnly="readOnly" v-model="queryParams.equipmentName"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="4" :sm="4">
- <a-form-item label="鏃ユ湡">
- <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" @change="dataChange"
- format='YYYY-MM-DD'/>
- </a-form-item>
- </a-col>
- <a-col :md="2" :sm="2" :xs="2">
- <a-space>
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
- </a-space>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <div style="width: 100%;height: 180px;border: none;" align="center">
- <table cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td>
- <table width="100%">
- <tr style="word-break: keep-all;">
- <td align="right"><a id="btnMdcLogWline" href="#">
- <div style="padding-top: 15px;" @click="openWorkChart">
- <img src="../../../../../assets/image/linechart.png" alt="">
- <p>宸ヤ綔鏇茬嚎</p>
- </div>
- </a></td>
- <td width="100%" height="100%">
- <table width="100%" height="100%" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td style="word-break: keep-all;" align="left">
- <div
- style="width: 100%; height: 62px;border: 1px solid;border-color: #9d9d9d;position: relative;overflow: hidden">
- <div class="mdcLogShowOne"
- :style='{display: "inline-block",width:item.dateProportion, height: "100%"}'
- v-for="item in normal">
- <span v-if="item.status == 0"
- :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#A8A8A8",position:"absolute",top:"0"}'></span>
- <span v-if="item.status == 1"
- :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#fffc5c",position:"absolute",top:"0"}'></span>
- <span v-if="item.status == 2"
- :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#fffc5c",position:"absolute",top:"0"}'></span>
- <span v-if="item.status == 3"
- :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#19FE01",position:"absolute",top:"0"}'></span>
- <span v-if="item.status == 23"
- :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#19FE01",position:"absolute",bottom:"0"}'></span>
- </div>
- <div v-if="item.status == 22" style="z-index: 999;"
- :style='{display: "inline-block",left:item.left,width:item.dateProportion, height: "100%",position:"absolute"}'
- v-for="item in waring">
- <span
- :style='{display: "inline-block",width:"100%", left:0, height: "68%", background: "#FD0008",position:"absolute",bottom:"0"}'></span>
- </div>
- </div>
- </td>
- </tr>
- </table>
- </td>
- <td align="left"><a id="btnMdcLogBar" href="#">
- <div style="padding-top: 15px;" @click="openHistoryChart">
- <img src="../../../../../assets/image/Histogram.png" alt="">
- <p>鍘嗗彶璁板綍</p>
- </div>
- </a></td>
- </tr>
- <tr>
- <td align="right">0</td>
- <td width="100%">
- <table width="100%;" cellpadding="0" cellspacing="0">
- <tr align="right" style="word-break: keep-all;">
- <td>02:00</td>
- <td>04:00</td>
- <td>06:00</td>
- <td>08:00</td>
- <td>10:00</td>
- <td>12:00</td>
- <td>14:00</td>
- <td>16:00</td>
- <td>18:00</td>
- <td>20:00</td>
- <td>22:00</td>
- <td>24:00</td>
- </tr>
- </table>
- </td>
- <td></td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table width="400px;" align="center" style="margin-top: 20px;">
- <tr>
- <td align="right"><a id="btnMdcLogPreviousDay" style="margin-right:15px">
- <img @click="dataBefore" src="../../../../../assets/image/left.png" alt="">
- </a></td>
- <td align="right">鍏虫満</td>
- <td align="left">
- <div style="width: 15px;height: 15px;background-color: #A8A8A8;position: static;"/>
- </td>
- <td align="right">寰呮満</td>
- <td align="left">
- <div style="width: 15px;height: 15px;background-color: #ffea91"/>
- </td>
- <td align="right">杩愯</td>
- <td align="left">
- <div style="width: 15px;height: 15px;background-color: #00ee00"/>
- </td>
- <td align="right">鎶ヨ</td>
- <td align="left">
- <div style="width: 15px;height: 15px;background-color: red"/>
- </td>
- <td><a id="btnMdcLogAfterDay" style="margin-left:20px">
- <img @click="dataAfter" src="../../../../../assets/image/right.png" alt="">
- </a></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </div>
- <div id="mdcLogTabs" class="mdcLogTabs-title" style="width: 100%;">
- <div>
- <a-tabs :activeKey="activeKey" @change="tabChange">
- <a-tab-pane key="1" tab="璁惧鏃ュ織" force-render>
- <log-list :dataList='normalList' ref="logList" :loadingequip='loadingStatus'></log-list>
- </a-tab-pane>
- <a-tab-pane key="2" tab="杩愯鏃ュ織">
- <work-log-list :dataList='runList' ref="workLogList" :loadingrun="loadingRunStatus"></work-log-list>
- </a-tab-pane>
- <a-tab-pane key="3" tab="鎶ヨ鏃ュ織">
- <alarm-log-list :dataList='waringList' ref="alarmLogList" :loadingwarn="loadingWarnStatus"></alarm-log-list>
- </a-tab-pane>
- </a-tabs>
- </div>
- </div>
- <work-chart-model ref="workChartModel" :collectTime="this.queryParams.collectTime"
- :equipment="this.equipment"></work-chart-model>
- <work-history-model ref="workHistoryModel"></work-history-model>
- </div>
-</template>
-
-
-<script>
- import moment from 'moment'
- import LogList from './LogList'
- import WorkLogList from './WorkLogList'
- import AlarmLogList from './AlarmLogList'
- import WorkChartModel from './WorkChartModel'
- import WorkHistoryModel from './WorkHistoryModel'
- import { getAction } from '@/api/manage'
-
- export default {
- components: {
- LogList,
- WorkLogList,
- AlarmLogList,
- WorkChartModel,
- WorkHistoryModel
- },
- props: { equipment: {} },
- data() {
- return {
- readOnly: true,
- defaultId: '',
- defaultName: '',
- middleTime: '',
- queryParam: {},
- queryParams: {
- collectTime: undefined
- },
- loadingStatus: false,
- loadingRunStatus: false,
- loadingWarnStatus: false,
- normal: [],
- waring: [],
- normalList: [],
- waringList: [],
- runList: [],
- activeKey: '1',
- equipment: {},
- url: {
- getBaseTree: '/mdc/mdcequipment/loadTree',
- getEquipmentByPid: '/mdc/mdcEquipment/getEquipmentByPid',
- list: '/mdc/mdcEquipmentRunningSection/logList'
- },
- ProStartId: ''
- }
- },
- methods: {
- tabChange(val) {
- this.activeKey = val
- },
- disabledDate(current) {
- return current && current > moment().subtract('days', 0)
- },
- queryChart() {
- // this.normal = []
- // this.waring = []
- this.loadingStatus = true
- this.loadingRunStatus = true
- this.loadingWarnStatus = true
- getAction(this.url.list, this.queryParams).then((res) => {
- this.normalList = []
- this.waringList = []
- this.runList = []
- this.loadingStatus = false
- this.loadingRunStatus = false
- this.loadingWarnStatus = false
- this.normal = []
- this.waring = []
- if (res.success) {
- if (res.result != null) {
- for (let i = 0; i < res.result.length; i++) {
- this.normalList.push(res.result[i])
- if ('22' == res.result[i].status) {
- this.waringList.push(res.result[i])
- res.result[i].dateProportion = res.result[i].duration / 86400 * 100 + '%'
- let leftTmp = (moment(res.result[i].startTime, 'YYYY-MM-DD HH:mm:ss').valueOf() - 57600000) / 1000 % 86400
- res.result[i].left = leftTmp / 86400 * 100 + '%'
- this.waring.push(res.result[i])
-
- } else if ('3' == res.result[i].status) {
- this.runList.push(res.result[i])
- res.result[i].dateProportion = res.result[i].duration / 86400 * 100 + '%'
- this.normal.push(res.result[i])
- } else {
- res.result[i].dateProportion = res.result[i].duration / 86400 * 100 + '%'
- this.normal.push(res.result[i])
- }
- }
- }
- }
- }).finally(() => {
- this.loading = false
- this.cardLoading = false
- })
- },
- dataChange(val) {
- this.queryParams.collectTime = val
- this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD')
- },
- searchQuery() {
- // console.log(this.queryParams.collectTime)
- this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD')
- if (!this.queryParams.equipmentId || !this.queryParams.equipmentName) {
- this.$notification.warning({
- message: '娑堟伅',
- description: '璇烽�夋嫨璁惧'
- })
- return false
- }
- this.queryChart()
- },
- searchReset() {
- this.queryParams = {
- collectTime : moment()
- }
- this.equipment = {}
- this.queryChart()
- },
- openWorkChart() {
- if (!this.equipment.equipmentId) {
- this.$notification.warning({
- message: '娑堟伅',
- description: '璇烽�夋嫨璁惧杩涜鏌ヨ'
- })
- } else {
- // 鍒ゆ柇鏄惁鐐瑰嚮璁惧鏃ュ織琛ㄦ牸琛岀殑鏁版嵁锛屾鏃朵负鐐瑰嚮琛ㄦ牸鏁版嵁涓篺alse
- this.$refs.workChartModel.isClicklogListRow = false
- this.$refs.workChartModel.add(this.equipment)
- this.$refs.workChartModel.title = '宸ヤ綔鏇茬嚎'
- }
- },
- openHistoryChart() {
- if (!this.equipment.equipmentId) {
- this.$notification.warning({
- message: '娑堟伅',
- description: '璇烽�夋嫨璁惧杩涜鏌ヨ'
- })
- } else {
- this.$refs.workHistoryModel.add(this.equipment)
- this.$refs.workHistoryModel.title = '鍘嗗彶鏃ュ織'
- }
-
- },
- dataBefore() {
- this.queryParams.collectTime = moment(this.queryParams.collectTime.add(-1, 'd'), 'YYYY-MM-DD')
- this.searchQuery()
- },
- dataAfter() {
- if ((this.queryParams.collectTime).format('YYYY-MM-DD') == moment().format('YYYY-MM-DD')) {
- this.$notification.warning({
- message: '娑堟伅',
- description: '璇烽�夋嫨浠婂ぉ浠ュ強浠婂ぉ涔嬪墠鐨勬棩鏈燂紒锛�'
- })
- } else {
- this.queryParams.collectTime = moment(this.queryParams.collectTime.add(1, 'd'), 'YYYY-MM-DD')
- this.searchQuery()
- }
-
- },
- initEquipment(id) {
- let _this = this
- getAction(this.url.getEquipmentByPid, { pid: id }).then((res) => {
- if (res.success) {
- if (res.result != null) {
- _this.$set(this.queryParams, 'equipmentName', res.result.equipmentName)
- _this.$set(this.queryParams, 'equipmentId', res.result.equipmentId)
- _this.equipment = res.result
- _this.searchQuery()
- } else {
- this.queryParams = {}
- this.equipment = {}
- _this.$notification.warning({
- message: '娑堟伅',
- description: '璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒'
- })
- }
- } else {
- _this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
-
- }
- })
- }
- },
- created() {
- this.queryParams.collectTime = moment()
- this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD')
- this.initEquipment()
- },
- watch: {
- equipment(val) {
- if (val && val.equipmentId) {
- this.$set(this.queryParams, 'equipmentName', val.equipmentName)
- this.$set(this.queryParams, 'equipmentId', val.equipmentId)
- this.equipment = val
- this.searchQuery()
- } else {
- this.initEquipment(val.key)
- }
- }
- }
- }
-</script>
-
-<style scoped="scoped">
- .mdcLogTabs-title {
- display: flex;
- width: 100%;
- }
-
- .mdcLogTabs-title > div {
- margin: 2px 5px;
- width: 100%;
- color: #000;
- font-weight: 600;
- padding: 3px;
- border-radius: 5px;
- }
-
- .btnMdcLogSearch {
- position: relative;
- margin-left: 10px;
- }
-
- .btnMdcLogSearch .btnMdcLogSearchZi {
- position: absolute;
- left: 3px;
- }
-
- .btnMdcLogSearch input {
- padding-left: 23px;
- border-radius: 5px;
- outline: none;
- color: #000;
- border: 1px solid #000;
- }
-
- #mdcLogShow {
- display: flex;
- }
-
- #mdcLogShow > div {
- flex: 1;
- }
-
- /*.mdcLogShowOne{*/
- /*position: absolute;*/
- /*}*/
-</style>
diff --git a/src/views/mdc/base/modules/DeviceLog/LogList.vue b/src/views/mdc/base/modules/DeviceLog/LogList.vue
deleted file mode 100644
index 4888611..0000000
--- a/src/views/mdc/base/modules/DeviceLog/LogList.vue
+++ /dev/null
@@ -1,222 +0,0 @@
-<template>
- <a-card :bordered="false">
- <!-- table鍖哄煙-begin -->
- <div class="table_logList">
- <a-table ref="table" bordered size="middle" :rowKey="(record,index)=>{return index}" :columns="columns"
- :dataSource="dataList" :pagination="ipagination" :loading="loadingequip" @change="handleTableChange"
- :customRow="rowClick">
- <template slot="status" slot-scope="status">
- <div v-if="status == '3' || status == '23'" style="color: #00ee00;width: 100%; height: 100%;">杩愯</div>
- <div v-else-if="status == '1' || status == '2'" style="color: #ffea91;width: 100%; height: 100%;">寰呮満</div>
- <div v-else-if="status == '0'" style="color: #A8A8A8;width: 100%; height: 100%;">鍏虫満</div>
- <div v-else-if="status == '22'" style="color: red;width: 100%; height: 100%;">鎶ヨ</div>
- </template>
- </a-table>
- </div>
- </a-card>
-</template>
-
-<script>
- import JDictSelectTag from '@/components/dict/JDictSelectTag'
- import {
- requestPut,
- deleteAction
- } from '@/api/manage'
-
- import JInput from '@/components/jeecg/JInput'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import Tooltip from 'ant-design-vue/es/tooltip'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
- import moment from 'moment'
-
- export default {
- name: 'LogList',
- mixins: [JeecgListMixin],
- components: {
- Tooltip,
- JDictSelectTag,
- JInput,
- JEllipsis
- },
- props: {
- dataList: {
- type: Array,
- required: true,
- default: []
- },
- loadingequip: {
- type: Boolean,
- default: false
- }
- },
- watch: {},
- data() {
- return {
- statusName: '',
- disabled: true,
- disableMixinCreated: true,
- loading: false,
- ipagination: {
- current: 1,
- pageSize: 100,
- pageSizeOptions: ['100', '500', '1000'],
- showTotal: (total, range) => {
- return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�'
- },
- showQuickJumper: true,
- showSizeChanger: true,
- total: 0
- },
- columns: [
- {
- title: '鐘舵��',
- align: 'center',
- dataIndex: 'status',
- scopedSlots: { customRender: 'status' }
- },
- {
- title: '寮�濮嬫椂闂�',
- align: 'center',
- dataIndex: 'startTime'
- // defaultSortOrder:'descend',
- // sorter: (a, b) => {return a.startTime>b.startTime?1:-1}
- },
- {
- title: '缁撴潫鏃堕棿',
- align: 'center',
- dataIndex: 'endTime'
- // defaultSortOrder:'descend',
- // sorter: (a, b) => {return a.endTime>b.endTime?1:-1}
- },
- {
- title: '鎸佺画鏃堕棿',
- align: 'center',
- dataIndex: 'duration',
- customRender: (t, r, index) => {
- // console.log(t)
- var ss = parseInt(t)
- if (ss >= 3600) {
- // 鏍规嵁绉掓暟杞崲鎴愬搴旂殑鏃跺垎绉�
- const hour = parseInt(ss / 3600) < 10 ? '0' + parseInt(ss / 3600) : parseInt(ss / 3600)
- const min = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60)
- const sec = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60)
- if (min == '00') {
- if (sec == '00') {
- return hour + '灏忔椂'
- } else {
- return hour + '灏忔椂' + sec + '绉�'
- }
-
- } else {
- if (sec == '00') {
- return hour + '灏忔椂' + min + '鍒�'
- } else {
- return hour + '灏忔椂' + min + '鍒�' + sec + '绉�'
- }
- }
- // if(sec == '00'){
- // return hour + '灏忔椂' + min + '鍒�'
- // }
- // if(min == '00' && sec == '00'){
- // return hour + '灏忔椂'
- // }
- // return hour + '灏忔椂' + min + '鍒�' + sec + '绉�'
-
- } else if (60 < ss && ss < 3600) {
- const min1 = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60)
- const sec1 = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60)
- return min1 + '鍒�' + sec1 + '绉�'
- } else {
- const sec2 = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60)
- return sec2 + '绉�'
- }
- }
- // defaultSortOrder:'descend',
- // sorter: (a, b) => {return a.duration>b.duration?1:-1}
- },
- {
- title: '绋嬪簭鍙�',
- align: 'center',
- dataIndex: 'sequenceNumber'
- }
- ]
- }
- },
- methods: {
- handleTableChange(pagination, filters, sorter) {
- //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂
- //TODO 绛涢��
- if (Object.keys(sorter).length > 0) {
- this.isorter.column = sorter.field
- this.isorter.order = 'ascend' == sorter.order ? 'asc' : 'desc'
- }
- this.ipagination = pagination
- // this.loadData();
- },
- /**
- * 缁欒澶囨棩蹇楄〃鏍间腑鐨勮娣诲姞鐐瑰嚮浜嬩欢
- * @param record 鐐瑰嚮鐨勫綋鍓嶈鏁版嵁
- * @returns {{on: {click: on.click}}} 娣诲姞浜嬩欢瀵硅薄
- */
- rowClick(record) {
- return {
- on: {
- click: () => {
- // 鍏虫満鐘舵�佽澶囨棩蹇椾笉寮瑰嚭宸ヤ綔鏇茬嚎
- if (record.status === 0) return
- const timeObj = {
- start: moment(record.startTime),
- end: moment(record.endTime)
- }
- this.$bus.$emit('tableRowRecord', timeObj)
- }
- }
- }
- }
- },
- created() {
- }
-
- }
-</script>
-
-<style lang="less" scoped>
- @import '~@assets/less/common.less';
-
- @media screen and (min-width: 1920px) {
- .table_logList {
- height: 417px !important;
- overflow: scroll;
- }
- }
-
- @media screen and (min-width: 1680px) and (max-width: 1920px) {
- .table_logList {
- height: 417px !important;
- overflow: scroll;
- }
- }
-
- @media screen and (min-width: 1400px) and (max-width: 1680px) {
- .table_logList {
- height: 266px !important;
- overflow: scroll;
- }
- }
-
- @media screen and (min-width: 1280px) and (max-width: 1400px) {
- .table_logList {
- height: 360px !important;
- overflow: scroll;
- }
- }
-
- @media screen and (max-width: 1280px) {
- .table_logList {
- height: 170px !important;
- overflow: scroll;
- }
- }
-</style>
diff --git a/src/views/mdc/base/modules/DeviceLog/WorkChartModel.vue b/src/views/mdc/base/modules/DeviceLog/WorkChartModel.vue
deleted file mode 100644
index 864753c..0000000
--- a/src/views/mdc/base/modules/DeviceLog/WorkChartModel.vue
+++ /dev/null
@@ -1,592 +0,0 @@
-<template>
- <div ref="workChart">
- <a-modal :title="title" :getContainer="() => this.$refs.workChart" width="80%" wrap-class-name="full-modal"
- :footer="null" :visible="visible"
- @cancel="handleCancel" cancelText="鍏抽棴">
- <div>
- <div>
- <a-row :gutter="24">
- <a-col :span="6">
- <a-form-item label="璁惧缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input placeholder="杈撳叆璁惧缂栧彿鏌ヨ" :readOnly="readOnly" v-model="queryParams.equipmentId"></a-input>
- </a-form-item>
- </a-col>
- <a-col :span="6">
- <a-form-item label="鏃ユ湡" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-date-picker v-model="queryParams.paramDate" :disabledDate="disabledDate" format='YYYY-MM-DD'/>
- </a-form-item>
- </a-col>
- <a-col :span="6">
- <a-form-item label="閲囨牱鍛ㄦ湡" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input-number v-model="queryParams.period"/>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="6">
- <a-form-item label="璁惧鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" :readOnly="readOnly" v-model="queryParams.equipmentName"></a-input>
- </a-form-item>
-
- </a-col>
- <a-col :span="10">
- <a-form-item label="鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <div class="params_time">
- <a-time-picker :open="stratOpen" format="HH:mm" @openChange="timeHandleChange('start')"
- v-model="queryParams.start">
- <a-button slot="addon" size="small" type="primary" @click="timeHandleClose('start')">
- 纭畾
- </a-button>
- </a-time-picker>
- <a-time-picker :open="endOpen" format="HH:mm" @openChange="timeHandleChange('end')"
- v-model="queryParams.end">
- <a-button slot="addon" size="small" type="primary" @click="timeHandleClose('end')">
- 纭畾
- </a-button>
- </a-time-picker>
- </div>
- </a-form-item>
- </a-col>
- <a-col :span="4">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- </a-col>
- </a-row>
-
- </div>
- <div class="checkboxgroup">
- <p>缁熻鍙傛暟</p>
- <div class="checkboxgroup_con">
- <a-checkbox-group name="checkboxgroup" :value="option" :options="plainOptions" @change="checkboxOnChange"/>
- </div>
- </div>
-
-
- <a-spin :spinning="spinning">
- <div id="workChart" style="width:85%;height: 500px;"/>
- </a-spin>
- </div>
- </a-modal>
- </div>
-</template>
-
-<script>
- import moment from 'moment'
- import * as echarts from 'echarts'
- import {
- getAction,
- postAction
- } from '@/api/manage'
- import {
- duplicateCheck
- } from '@/api/api'
-
- export default {
- name: 'WorkChartModel',
- components: {},
- props: {
- collectTime: {
- type: Object
- },
- equipment: {
- type: Object
- }
- },
- watch: {
- // 鐩戞帶鐖剁粍浠剁偣鍑诲乏鍙崇澶村垏鎹㈢殑鏃堕棿鍊煎皢鍏惰祴缁欑偣鍑诲伐浣滄洸绾垮悗鐨勬椂闂撮�夋嫨鍣ㄧ殑鍊�
- collectTime: {
- handler(newVal) {
- this.currentToggledTime = newVal
- }
- }
- },
- data() {
- return {
- spinning: false,
- labelCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 6
- }
- },
- wrapperCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 18
- }
- },
- readOnly: true,
- title: '',
- plainOptions: [],
- option: [],
- workChart: '',
- node: {},
- stratOpen: false,
- endOpen: false,
- visible: false,
- show: false,
- queryParams: {},
- panduanResult: [],
- url: {
- initPlainOptions: '/mdc/mdcDriveTypeParamConfig/findWorkCurveParamList',
- workChart: '/mdc/mdcEquipmentRunningSection/workChart'
- },
- currentToggledTime: '',
- isClicklogListRow: false
- }
- },
- created() {
- this.$bus.$on('tableRowRecord', this.getLogListRowRecord)
- },
- mounted() {
-
- },
- methods: {
- disabledDate(current) {
- //Can not slect days before today and today
- return current && current > moment().endOf('day')
- },
- initPlainOptions(param) {
- let that = this
- let equipment = param.equipmentId
- getAction(this.url.initPlainOptions, { equipmentId: equipment }).then((res) => {
- if (res.success) {
- let temp = []
- // debugger
- for (var item of res.result) {
- temp.push({ label: item.chineseName, value: item.id, englishName: item.englishName })
- }
- that.plainOptions = temp
- if (temp.length > 0) {
- that.option = [temp[0].value]
- }
- let param = {
- driveType: that.node.driveType,
- equipmentId: that.node.equipmentId,
- date: that.queryParams.paramDateStr,
- start: that.queryParams.startStr,
- end: that.queryParams.endStr,
- interval: that.queryParams.period,
- codeTypeId: that.option.join(',')
- }
- that.initChart(param)
- }
- })
- },
- searchQuery() {
- this.queryParams.paramDateStr = this.queryParams.paramDate.format('yyyy-MM-DD')
- this.queryParams.startStr = this.queryParams.start.format('HH:mm')
- this.queryParams.endStr = this.queryParams.end.format('HH:mm')
- let param = {
- driveType: this.node.driveType, equipmentId: this.node.equipmentId,
- date: this.queryParams.paramDateStr, start: this.queryParams.startStr,
- end: this.queryParams.endStr, interval: this.queryParams.period,
- codeTypeId: this.option.join(',')
- }
- this.initChart(param)
- this.spinning = true
- },
- timeHandleChange(val) {
- if (val == 'start') {
- this.stratOpen = true
- } else {
- this.endOpen = true
- }
- },
- timeHandleClose(val) {
- if (val == 'start') {
- this.stratOpen = false
- this.endOpen = true
- } else {
- this.endOpen = false
- }
- },
- add(node) {
- let _this = this
- this.visible = true
- this.node = node
- this.spinning = true
- let paramDate
- let start
- let end
- // 褰撴病鏈夊垏鎹㈣繃鏃堕棿currentToggledTime鐨勫�间负绌哄�硷紝濡傛灉鐢变簬鐐瑰嚮宸﹀彸绠ご鍒囨崲杩囨椂闂达紝鍒檆urrentToggledTime涓哄垏鎹㈠悗鐨勬椂闂�
- if (!this.currentToggledTime) {
- paramDate = moment()
- } else {
- paramDate = this.currentToggledTime
- }
- // 鍒ゆ柇鏄惁鐐瑰嚮璁惧鏃ュ織琛ㄦ牸琛岀殑鏁版嵁锛岃嫢鐐瑰嚮琛ㄦ牸鏁版嵁鍒欐樉绀鸿〃鏍兼暟鎹腑鐨勬椂闂达紝鑻ョ偣鍑诲伐浣滄洸绾垮浘鐗囧垯鏄剧ず0鐐硅嚦褰撳墠鏃堕棿鏁版嵁
- if (this.isClicklogListRow) {
- start = node.start
- end = node.end
- } else {
- start = moment('0:0', 'HH:mm')
- end = moment(moment().format('HH:mm'), 'HH:mm')
- }
- this.queryParams = {
- equipmentId: node.equipmentId,
- equipmentName: node.equipmentName,
- period: 100,
- paramDate: paramDate,
- paramDateStr: paramDate.format('yyyy-MM-DD'),
- start: start,
- startStr: start.format('HH:mm'),
- end: end,
- endStr: end.format('HH:mm')
- }
- this.$nextTick(() => {
- _this.initPlainOptions(node)
- })
- },
- handleCancel() {
- this.visible = false
- this.stratOpen = false
- this.endOpen = false
- },
- checkboxOnChange(e) {
- if (e.length <= 3) {
- this.option = e
- } else {
- // this.$message.warn('鏈�澶氬彧鑳介�夋嫨3涓�')
- this.$notification.warning({
- message: '娑堟伅',
- description: '鏈�澶氬彧鑳介�夋嫨涓変釜'
- })
- return false
- }
- },
- close() {
- this.visible = false
- this.show = false
- },
- getYAxisOffset(index) {
- return index * 50 + 10
- },
- initChart(param) {
- if (!this.workChart) {
- this.workChart = echarts.init(document.getElementById('workChart'))
- }
- let option = {
- tooltip: {
- trigger: 'axis',
- position: function(pt) {
- return [pt[0], '10%']
- }
- },
- legend: {
- data: []
- },
- title: {
- left: 'center',
- text: ''
- },
- toolbox: {
- feature: {
- dataZoom: {
- yAxisIndex: 'none'
- },
- restore: {},
- saveAsImage: {}
- }
- },
- grid: {
- left: '8%',
- top: '10%',
- right: '2%',
- bottom: '14%',
- containLabel: true
- },
- xAxis: {
- type: 'time',
- boundaryGap: false
- },
- yAxis: [
- {
- yAxisIndex: 0,
- type: 'value',
- offset: 0,
- position: 'left',
- boundaryGap: [0, '15%'],
- axisLine: {
- show: true,
- lineStyle:{
- color:'#5470C6'
- }
- }
- },
- {
- yAxisIndex: 1,
- type: 'value',
- offset: 60,
- position: 'left',
- boundaryGap: [0, '15%'],
- axisLine: {
- show: true,
- lineStyle:{
- color:'#91CC75'
- }
- }
- },
- {
- yAxisIndex: 2,
- type: 'value',
- offset: 120,
- position: 'left',
- boundaryGap: [0, '15%'],
- axisLine: {
- show: true,
- lineStyle:{
- color:'#FAC858'
- }
- }
- }
- ],
- dataZoom: [
- {
- type: 'inside',
- start: 0,
- end: 20
- },
- {
- start: 0,
- end: 20
- }
- ],
- series: [
- {
- showSymbol: true,
- symbolSize: 20,
- label: 'show',
- name: '',
- type: 'line',
- data: [],
- smooth: true,
- symbol: 'none'
- }
- ]
- }
- let _this = this
- let temp = []
- for (let i = 0; i < this.plainOptions.length; i++) {
- let item = this.plainOptions[i]
- if (this.option.indexOf(item.value) > -1) {
- temp.push(item)
- }
- }
- console.log('temp',temp)
- getAction(this.url.workChart, param).then((res) => {
- if (JSON.stringify(res.result) == '[]' || res.result == null) {
- // this.$message.warning('鏃犳暟鎹紒')
- this.$notification.warning({
- message: '娑堟伅',
- description: '鏃犳暟鎹�!'
- })
- this.spinning = false
- _this.workChart.setOption(option, true)
- } else {
- this.spinning = false
- // debugger
- let result = []
- let itemLine = []
- //y杞存暟缁�
- var Yarr = []
- var lengenddata = []
- for (let i = 0; i < temp.length; i++) {
- let item = temp[i]
- itemLine = []
- for (let m = 0; m < res.result.length; m++) {
- let d = []
- d.push(res.result[m].collectTime)
- // debugger
- d.push(res.result[m][item.englishName])
- itemLine.push(d)
- }
- var lll = {
- name: item.label
- }
- lengenddata.push(lll)
- var Yline = {
- name: item.label,
- type: 'value',
- yAxisIndex: i,
- boundaryGap: [0, '100%']
- }
- Yarr.push(Yline)
- var line = {
- name: item.label,
- type: 'line',
- // areaStyle:{},
- smooth: true,
- symbol: 'circle',
- symbolSize: 10,
- yAxisIndex: i,
- data: itemLine
- }
- result.push(line)
-
- }
- console.log('result===========',result)
- console.log('legend=============',lengenddata)
- // option.yAxis = Yarr;
- option.series = result
- option.legend = lengenddata
- // console.log(option);
- _this.workChart.setOption(option, true)
- window.addEventListener('resize', function() {
- _this.workChart.resize()
- })
- }
-
- })
- },
- /**
- * 鑾峰彇鐐瑰嚮璁惧鏃ュ織琛ㄦ牸琛屽悗浠庡厔寮熺粍浠朵紶鏉ョ殑鏃堕棿瀵硅薄
- * @param timeObj 褰撳墠琛岀殑寮�濮嬫椂闂翠笌缁撴潫鏃堕棿缁勬垚鐨勫璞�
- */
- getLogListRowRecord(timeObj) {
- // 鍒ゆ柇鏄惁鐐瑰嚮璁惧鏃ュ織琛ㄦ牸琛岀殑鏁版嵁锛屾鏃朵负鐐瑰嚮琛ㄦ牸鏁版嵁涓簍rue
- this.isClicklogListRow = true
- // 鍚堝苟鐖剁粍浠朵紶鏉ョ殑褰撳墠璁惧淇℃伅瀵硅薄涓庡厔寮熺粍浠朵紶鏉ョ殑褰撳墠琛岀殑鏃堕棿瀵硅薄
- const newQueryParams = Object.assign(this.equipment, timeObj)
- this.add(newQueryParams)
- this.title = '宸ヤ綔鏇茬嚎'
- }
- }
- }
-</script>
-
-<style scoped lang="less">
- .full-modal {
- .ant-modal {
- max-width: 100%;
- top: 0;
- padding-bottom: 0;
- margin: 0;
- }
- .ant-modal-content {
- display: flex;
- flex-direction: column;
- height: calc(100vh);
- }
- .ant-modal-body {
- flex: 1;
- }
- }
-
- /deep/ .ant-modal {
- /*background-color: #000;*/
- /*color: #fff;*/
- }
-
- /deep/ .ant-modal-header {
- /*background-color: #000;*/
- }
-
- /deep/ .ant-modal-title {
- /*color: #fff;*/
- }
-
- /deep/ .ant-modal-close {
- color: #1191b0;
- font-size: 24px;
- }
-
- /deep/ .ant-modal-content {
- /*background: -moz-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.27) 100%);*/
- /*background: -webkit-gradient(linear, left left, right right, color-stop(0%, rgba(0, 0, 0, 0.66)), color-stop(100%, rgba(0, 0, 0, 0.4)));*/
- /*background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: -o-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: -ms-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background-color: #000;*/
- /*color: #fff;*/
- position: relative;
- }
-
- /deep/ .ant-modal-header {
- /*border-bottom: none!important;*/
- }
-
- /deep/ .ant-checkbox-wrapper {
- /*color: #fff;*/
- }
-
- /deep/ .ant-form-item-label label {
- /*color: #fff;*/
- }
-
- /deep/ .ant-btn {
- /*position: absolute;*/
-
- }
-
- .checkboxgroup {
- position: absolute;
- right: 5%;
- display: flex;
- justify-content: center;
- align-items: center;
- flex-direction: column;
- }
-
- /deep/ .ant-checkbox-group {
- display: flex;
- flex-direction: column;
- }
-
- /deep/ .ant-checkbox-group .ant-checkbox-wrapper {
- padding: 10px;
- }
-
- .con_btn {
- display: flex;
- align-items: center;
- }
-
- .workChart_params {
- display: flex;
- /*align-items: center;*/
- flex-direction: column;
- float: left;
- }
-
- .workChart_params .params_one {
- display: flex;
- justify-content: space-between;
- }
-
- .workChart_params .params_two {
- display: flex;
- justify-content: space-between;
- }
-
- /deep/ .workChart_params .ant-form-item {
- display: flex;
- }
-
- /deep/ .workChart_params .ant-form-item .ant-form-item-control-wrapper {
- margin: 0 10px;
- }
-
- .ant-btn {
- padding: 0 10px;
- margin-left: 3px;
- }
-
- .ant-form-item-control {
- line-height: 0px;
- }
-
- /** 涓昏〃鍗曡闂磋窛 */
- .ant-form .ant-form-item {
- margin-bottom: 10px;
- }
-
- /** Tab椤甸潰琛岄棿璺� */
- .ant-tabs-content .ant-form-item {
- margin-bottom: 0px;
- }
-</style>
diff --git a/src/views/mdc/base/modules/DeviceLog/WorkHistoryModel.vue b/src/views/mdc/base/modules/DeviceLog/WorkHistoryModel.vue
deleted file mode 100644
index 44f7cef..0000000
--- a/src/views/mdc/base/modules/DeviceLog/WorkHistoryModel.vue
+++ /dev/null
@@ -1,261 +0,0 @@
-<template>
- <div ref="workHistory">
- <a-modal :title="title" width="80%" :getContainer="() => this.$refs.workHistory" wrap-class-name="full-modal" :visible="visible"
- @cancel="handleCancel" cancelText="鍏抽棴" :footer="null">
- <div>
- <div class="his_params">
- <a-form layout="inline">
- <a-form-item label="璁惧缂栧彿">
- <a-input placeholder="杈撳叆璁惧缂栧彿鏌ヨ" :readOnly="true" v-model="queryParams.equipmentId"></a-input>
- </a-form-item>
- <a-form-item label="璁惧鍚嶇О">
- <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" :readOnly="true" v-model="queryParams.equipmentName"></a-input>
- </a-form-item>
- <a-form-item label="鏃ユ湡">
- <a-range-picker v-model="dates" :disabledDate="disabledDate" @change="dateParamChange" format='YYYY-MM-DD'/>
- </a-form-item>
- <a-button type="primary" @click="queryCharts" icon="search">鏌ヨ</a-button>
- </a-form>
- </div>
- <div style="width: 100%;border: none;" align="center">
- <table cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td>
- <table width="100%">
- <tr style="word-break: keep-all;">
- <td width="100%" height="100%">
- <table width="100%" height="100%" align="center" cellpadding="0" cellspacing="0" style="border-collapse:separate; border-spacing:10px;">
- <tr v-for="info in listInfo" >
- <td align="left">{{info.date}}</td>
- <td style="word-break: keep-all;" align="left">
- <div
- style="width: 100%; height: 62px;border: 1px solid;border-color: #9d9d9d;position: relative">
- <div class="mdcLogShowOne"
- :style='{display: "inline-block",width:item.dateProportion, height: "100%"}'
- v-for="item in info.value.normal">
- <span v-if="item.status == 0"
- :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#A8A8A8",position:"absolute",top:"0"}'></span>
- <span v-if="item.status == 1"
- :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#fffc5c",position:"absolute",top:"0"}'></span>
- <span v-if="item.status == 2"
- :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#fffc5c",position:"absolute",top:"0"}'></span>
- <span v-if="item.status == 3"
- :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#19FE01",position:"absolute",top:"0"}'></span>
- <span v-if="item.status == 23"
- :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#19FE01",position:"absolute",bottom:"0"}'></span>
- </div>
- <div style="z-index: 999;"
- :style='{display: "inline-block",left:item.left,width:item.dateProportion, height: "100%",position:"absolute"}'
- v-for="item in info.value.waring">
- <span
- :style='{display: "inline-block",width:"100%", left:0, height: "68%", background: "#FD0008",position:"absolute",bottom:"0"}'></span>
- </div>
- </div>
- </td>
- </tr>
- <tr>
- <td align="right">0</td>
- <td width="95%">
- <table width="100%;" cellpadding="0" cellspacing="0">
- <tr align="right" style="word-break: keep-all;">
- <td>02:00</td>
- <td>04:00</td>
- <td>06:00</td>
- <td>08:00</td>
- <td>10:00</td>
- <td>12:00</td>
- <td>14:00</td>
- <td>16:00</td>
- <td>18:00</td>
- <td>20:00</td>
- <td>22:00</td>
- <td>24:00</td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
-
- </table>
- </div>
- </div>
-
- </a-modal>
- </div>
-</template>
-
-<script>
- import moment from 'moment'
- import * as echarts from 'echarts'
- import {
- getAction,
- postAction
- } from '@/api/manage'
- import {
- duplicateCheck
- } from '@/api/api'
-
- export default {
- name: 'WorkHistoryModel',
- components: {},
- props: { waring:[],},
- data() {
- return {
- title: '',
- listInfo: [],
- dates: [],
- node: {},
-
- stratOpen: false,
- endOpen: false,
- visible: false,
- show: false,
- queryParams: {},
- url: {
- logCharts: '/mdc/mdcEquipmentRunningSection/logCharts'
- }
- }
- },
- mounted() {
- },
- methods: {
- disabledDate(current){
- return current && current > moment().subtract('days', 1);
- },
- queryCharts() {
- let _this = this
- getAction(this.url.logCharts, this.queryParams).then((res) => {
- if (res.success) {
- for (let i = 0; i < res.result.length; i++) {
- let tmp = res.result[i].value
- // console.log(tmp)
- if (tmp) {
- if (tmp.normal) {
- for (let k = 0; k < tmp.normal.length; k++) {
- tmp.normal[k].dateProportion = tmp.normal[k].duration / 86400 * 100 + '%'
- // let leftTmp = (moment(tmp.normal[i].startTime, 'YYYY-MM-DD HH:mm:ss').valueOf() - 57600000) / 1000 % 86400
- // tmp.normal[i].left = leftTmp / 86400 * 100 + '%'
- }
- } else {
- tmp.normal = []
- }
- if (tmp.waring) {
- // console.log("娴嬭瘯鍒ゆ柇")
- for (let j = 0; j < tmp.waring.length; j++) {
- tmp.waring[j].dateProportion = tmp.waring[j].duration / 86400 * 100 + '%'
- let leftTmp = (moment(tmp.waring[j].startTime, 'YYYY-MM-DD HH:mm:ss').valueOf() - 57600000) / 1000 % 86400
- tmp.waring[j].left = leftTmp / 86400 * 100 + '%'
- }
- } else {
- tmp.waring = []
- }
- } else {
- res.result[i].value = { normal: [], waring: [] }
- }
- }
- _this.listInfo = res.result
- }
- })
- },
- dateParamChange(v1, v2) {
- this.queryParams.startTime = v2[0]
- this.queryParams.endTime = v2[1]
- },
- add(node) {
- let _this = this
- this.visible = true
- this.node = node
- this.queryParams = {
- equipmentId: node.equipmentId,
- equipmentName: node.equipmentName
- }
- this.dates = [moment().subtract('days', 5), moment().subtract('days', 2)]
- this.queryParams.startTime = moment(this.dates[0]).format('YYYY-MM-DD')
- this.queryParams.endTime = moment(this.dates[1]).format('YYYY-MM-DD')
- this.$nextTick(() => {
- _this.queryCharts()
- })
- },
- handleCancel() {
- this.visible = false
- },
- close() {
- this.visible = false
- this.show = false
- }
- }
- }
-</script>
-
-<style scoped lang="less">
- .full-modal {
- .ant-modal {
- max-width: 100%;
- top: 0;
- padding-bottom: 0;
- margin: 0;
- }
- .ant-modal-content {
- display: flex;
- flex-direction: column;
- height: calc(100vh);
- }
- .ant-modal-body {
- flex: 1;
- }
- }
- /deep/ .ant-modal{
- /*background-color: #000;*/
- /*color: #fff;*/
- }
- /deep/ .ant-modal-header{
- /*background-color: #000;*/
- }
- /deep/ .ant-modal-title{
- /*color: #fff;*/
- }
- /deep/ .ant-modal-close{
- color: #1191b0;
- font-size: 24px;
- }
- /deep/ .ant-modal-content{
- /*background: -moz-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.27) 100%);*/
- /*background: -webkit-gradient(linear, left left, right right, color-stop(0%, rgba(0, 0, 0, 0.66)), color-stop(100%, rgba(0, 0, 0, 0.4)));*/
- /*background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: -o-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: -ms-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background-color: #000;*/
- /*color: #fff;*/
- position: relative;
- }
- /deep/ .ant-modal-header{
- /*border-bottom: none!important;*/
- }
- /deep/ .ant-form-item-label label{
- /*color: #fff;*/
- }
- /*.ant-btn {*/
- /*padding: 0 10px;*/
- /*margin-left: 3px;*/
- /*}*/
-
- /*.ant-form-item-control {*/
- /*line-height: 0px;*/
- /*}*/
-
- /*!** 涓昏〃鍗曡闂磋窛 *!*/
- /*.ant-form .ant-form-item {*/
- /*margin-bottom: 10px;*/
- /*}*/
-
- /*!** Tab椤甸潰琛岄棿璺� *!*/
- /*.ant-tabs-content .ant-form-item {*/
- /*margin-bottom: 0px;*/
- /*}*/
-</style>
diff --git a/src/views/mdc/base/modules/DeviceLog/WorkLogList.vue b/src/views/mdc/base/modules/DeviceLog/WorkLogList.vue
deleted file mode 100644
index badd7f4..0000000
--- a/src/views/mdc/base/modules/DeviceLog/WorkLogList.vue
+++ /dev/null
@@ -1,165 +0,0 @@
-<template>
- <a-card :bordered="false">
- <!-- table鍖哄煙-begin -->
- <div class="table_workLogist">
- <a-table ref="table" bordered size="middle" :rowKey="(record,index)=>{return index}" :columns="columns"
- :dataSource="dataList" :pagination="false" :loading="loadingrunStatus">
- <template slot="status" slot-scope="status">
- <div v-if="status == '3' || status == '23'" style="color: #00ee00;width: 100%; height: 100%;">杩愯</div>
- <div v-else-if="status == '1' || status == '2'" style="color: #ffea91;width: 100%; height: 100%;">寰呮満</div>
- <div v-else-if="status == '0'" style="color: #A8A8A8;width: 100%; height: 100%;">鍏虫満</div>
- <div v-else-if="status == '22'" style="color: red;width: 100%; height: 100%;">鎶ヨ</div>
- </template>
- </a-table>
- </div>
- </a-card>
-</template>
-
-<script>
- import JDictSelectTag from '@/components/dict/JDictSelectTag'
- import {
- requestPut,
- deleteAction
- } from '@/api/manage'
- import JInput from '@/components/jeecg/JInput'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import Tooltip from 'ant-design-vue/es/tooltip'
-
- export default {
- name: 'WorkLogList',
- components: {
- Tooltip,
- JDictSelectTag,
- JInput,
- JEllipsis
- },
- props: {
- dataList: {
- type: Array,
- required: true,
- default: []
- },
- loadingrunStatus:{
- type:Boolean,
- default: false
- }
- },
- data() {
- return {
- disabled: true,
- disableMixinCreated: true,
- columns: [
- {
- title: '鐘舵��',
- align: 'center',
- dataIndex: 'status',
- scopedSlots: { customRender: 'status' }
- },
- {
- title: '寮�濮嬫椂闂�',
- align: 'center',
- dataIndex: 'startTime',
- // defaultSortOrder:'descend',
- // sorter: (a, b) => {return a.startTime>b.startTime?1:-1}
- },
- {
- title: '缁撴潫鏃堕棿',
- align: 'center',
- dataIndex: 'endTime',
- // defaultSortOrder:'descend',
- // sorter: (a, b) => {return a.endTime>b.endTime?1:-1}
- },
- {
- title: '鎸佺画鏃堕棿',
- align: 'center',
- dataIndex: 'duration',
- customRender:(t,r,index) =>{
- // console.log(t)
- var ss = parseInt(t)
- if(ss>=3600){
- // 鏍规嵁绉掓暟杞崲鎴愬搴旂殑鏃跺垎绉�
- const hour = parseInt(ss / 3600) < 10 ? '0' + parseInt(ss / 3600) : parseInt(ss / 3600)
- const min = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60)
- const sec = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60)
- if(min == '00') {
- if(sec == '00'){
- return hour + '灏忔椂'
- }else{
- return hour + '灏忔椂'+ sec + '绉�'
- }
-
- }else{
- if(sec == '00') {
- return hour + '灏忔椂' + min + '鍒�'
- }else{
- return hour + '灏忔椂' + min + '鍒�' + sec + '绉�'
- }
- }
- // if(sec == '00'){
- // return hour + '灏忔椂' + min + '鍒�'
- // }
- // if(min == '00' && sec == '00'){
- // return hour + '灏忔椂'
- // }
- // return hour + '灏忔椂' + min + '鍒�' + sec + '绉�'
-
- }else if(60<ss && ss<3600){
- const min1 = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60)
- const sec1 = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60)
- return min1 + '鍒�' + sec1 + "绉�"
- }else{
- const sec2 = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60)
- return sec2 + '绉�'
- }
- }
- // defaultSortOrder:'descend',
- // sorter: (a, b) => {return a.duration>b.duration?1:-1}
- },
- {
- title: '绋嬪簭鍙�',
- align: 'center',
- dataIndex: 'sequenceNumber'
- }
- ]
- }
- },
- methods: {},
- created() {
- }
-
- }
-</script>
-
-<style lang="less" scoped>
- @import '~@assets/less/common.less';
- @media screen and (min-width: 1920px){
- .table_workLogist{
- height: 417px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1680px) and (max-width: 1920px){
- .table_workLogist{
- height: 417px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1400px) and (max-width: 1680px){
- .table_workLogist{
- height: 266px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1280px) and (max-width: 1400px){
- .table_workLogist{
- height: 360px!important;
- overflow: scroll;
- }
- }
- @media screen and (max-width: 1280px){
- .table_workLogist{
- height: 170px!important;
- overflow: scroll;
- }
- }
-</style>
diff --git a/src/views/mdc/base/modules/DeviceParamThresholdManagement/ParamThresholdModal.vue b/src/views/mdc/base/modules/DeviceParamThresholdManagement/ParamThresholdModal.vue
deleted file mode 100644
index 73e9c7c..0000000
--- a/src/views/mdc/base/modules/DeviceParamThresholdManagement/ParamThresholdModal.vue
+++ /dev/null
@@ -1,252 +0,0 @@
-<template>
- <a-modal
- :title="title"
- :maskClosable="true"
- :width="modalWidth"
- @cancel="visible=false"
- :visible="visible">
- <a-spin :spinning="confirmLoading">
- <a-form-model ref="form" :form="form" :model="model" :rules="validatorRules" :labelCol="labelCol"
- :wrapperCol="wrapperCol">
-
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-model-item prop="controlSystemType" label="椹卞姩绫诲瀷">
- <a-select v-model="model.controlSystemType" @change="handleDriveTypeChange"
- placeholder="璇烽�夋嫨椹卞姩绫诲瀷">
- <a-select-option v-for="(item,index) in driveTypeList" :key="index" :value="item">
- {{item}}
- </a-select-option>
- </a-select>
- </a-form-model-item>
- </a-col>
-
- <a-col :span="12">
- <a-form-model-item prop="chineseName" label="鍙傛暟">
- <a-select v-model="model.chineseName" placeholder="璇烽�夋嫨鍙傛暟">
- <a-select-option v-for="item in paramList" :key="item.value" :value="item.value">
- {{item.label}}
- </a-select-option>
- </a-select>
- </a-form-model-item>
- </a-col>
- </a-row>
-
- <a-row :gutter="24">
-
- <a-col :span="12">
- <a-form-model-item prop="maxThreshold" label="闃堝�间笂闄�">
- <a-input-number v-model="model.maxThreshold" placeholder="璇疯緭鍏ラ槇鍊间笂闄�" style="width: 100%"></a-input-number>
- </a-form-model-item>
- </a-col>
-
- <a-col :span="12">
- <a-form-model-item prop="minThreshold" label="闃堝�间笅闄�">
- <a-input-number v-model="model.minThreshold" placeholder="璇疯緭鍏ラ槇鍊间笅闄�" style="width: 100%"></a-input-number>
- </a-form-model-item>
- </a-col>
-
- </a-row>
-
- </a-form-model>
- </a-spin>
-
-
- <template slot="footer">
- <a-popconfirm title="纭畾鏀惧純鎿嶄綔锛�" @confirm="visible=false" okText="纭畾" cancelText="鍙栨秷">
- <a-button style="margin-right: .8rem">鍙栨秷</a-button>
- </a-popconfirm>
- <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">鎻愪氦</a-button>
- </template>
-
- </a-modal>
-
-</template>
-
-<script>
- import pick from 'lodash.pick'
- import api from '@/api/mdc'
-
- export default {
- name: 'ParamThresholdModal',
- components: {},
- props: {
- driveTypeList: {
- type: Array
- }
- },
- data() {
- return {
- modalWidth: 700,
- form: this.$form.createForm(this),
- validatorRules: {
- controlSystemType: [
- {
- required: true, message: '璇烽�夋嫨椹卞姩绫诲瀷'
- }
- ],
- chineseName: [
- {
- required: true, message: '璇烽�夋嫨鍙傛暟'
- }
- ],
- minThreshold: [
- {
- required: true, message: '璇疯緭鍏ラ槇鍊间笂闄�'
- },
- {
- pattern: /^[0-9]+$/,
- message: '璇疯緭鍏ラ樋鎷変集鏁板瓧'
- }
- ],
- maxThreshold: [
- {
- required: true, message: '璇疯緭鍏ラ槇鍊间笅闄�'
- },
- {
- pattern: /^[0-9]+$/,
- message: '璇疯緭鍏ラ樋鎷変集鏁板瓧'
- }
- ]
- },
- title: '鎿嶄綔',
- visible: false,
- model: {
- controlSystemType: '',
- chineseName: '',
- minThreshold: '',
- maxThreshold: ''
- },
- labelCol: {
- xs: { span: 24 },
- sm: { span: 6 }
- },
- wrapperCol: {
- xs: { span: 24 },
- sm: { span: 15 }
- },
- confirmLoading: false,
- url: {
- userId: '/sys/user/generateUserId' // 寮曞叆鐢熸垚娣诲姞鐢ㄦ埛鎯呭喌涓嬬殑url
- },
- paramList: []
- }
- },
- created() {
-
- },
- methods: {
- add() {
- this.visible = true
- this.model = {
- controlSystemType: this.driveTypeList[0],
- chineseName: '',
- minThreshold: '',
- maxThreshold: ''
- }
- console.log('driveType',this.driveTypeList)
- this.handleDriveTypeChange(this.driveTypeList[0])
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'controlSystemType', 'chineseName', 'minThreshold', 'maxThreshold'))
- })
- },
-
- edit(record) {
- this.visible = true
- this.model = Object.assign({}, record)
- api.getParamListByDriveTypeApi(record.controlSystemType)
- .then(res => {
- if (res.success) {
- this.paramList = res.result
- }
- })
- this.model.chineseName = `${record.englishName}(${record.chineseName})`
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'controlSystemType', 'chineseName', 'minThreshold', 'maxThreshold'))
- })
- },
-
- handleSubmit() {
- const that = this
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.$refs.form.validate(valid => {
- if (valid) {
- if (this.model.maxThreshold > this.model.minThreshold) {
- that.confirmLoading = true
- let obj
- if (this.title == '鏂板') {
- obj = api.addParamThresholdApi(this.model)
- } else {
- obj = api.editParamThresholdApi(this.model)
- }
- obj.then((res) => {
- if (res.success) {
- that.$notification.success({
- message: '娑堟伅',
- description: res.message
- })
- that.$emit('ok')
- } else {
- that.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- that.confirmLoading = false
- this.visible = false
- })
- } else {
- this.$notification.warning({
- message: '娑堟伅',
- description: '闃堝�间笂闄愪笉鑳藉皬浜庣瓑浜庨槇鍊间笅闄�'
- })
- }
-
- } else {
- return false
- }
- })
- },
-
- /**
- * 鑱旀兂杈撳叆妗嗙瓫閫夊姛鑳�
- * @param input 杈撳叆鐨勫唴瀹�
- * @param option 閰嶇疆
- * @returns {boolean} 鍒ゆ柇鏄惁绛涢��
- */
- filterOption(input, option) {
- return (
- option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0
- )
- },
-
- /**
- * 椹卞姩鍙傛暟绫诲瀷閫変腑鍚庢覆鏌撶浉搴旂殑鍙傛暟鍒楄〃
- * @param value 椹卞姩鍙傛暟绫诲瀷閫変腑椤�
- */
- handleDriveTypeChange(value) {
- api.getParamListByDriveTypeApi(value)
- .then(res => {
- if (res.success) {
- this.paramList = res.result
- this.model.chineseName = res.result.length ? res.result[0].value : undefined
- if (this.model.chineseName) this.$refs.form.clearValidate('chineseName')
- }
- })
- },
-
- /**
- * 缂栬緫鎴栨煡鐪嬭鎯呮暟鎹椂娓呴櫎鎶藉眽琛ㄥ崟楠岃瘉
- */
- removeValidate() {
- if (this.$refs.form) this.$refs.form.clearValidate()
- }
- }
-
- }
-</script>
-
-<style scoped>
-
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/EquipmentAvailCompare/EquipmentAvailCompareMain.vue b/src/views/mdc/base/modules/EquipmentAvailCompare/EquipmentAvailCompareMain.vue
deleted file mode 100644
index 33a362c..0000000
--- a/src/views/mdc/base/modules/EquipmentAvailCompare/EquipmentAvailCompareMain.vue
+++ /dev/null
@@ -1,488 +0,0 @@
-<template>
- <a-spin :spinning="loading">
- <div :bordered="false" class="device_list">
- <div class="com_box">
- <!-- 鏌ヨ鍖哄煙 -->
- <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="4" :sm="4">
- <a-form-item label="璁惧缂栧彿">
- <a-input placeholder="杈撳叆璁惧缂栧彿鏌ヨ" :readOnly="readOnly" v-model="queryParams.equipmentId"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="4" :sm="4">
- <a-form-item label="璁惧鍚嶇О">
- <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" :readOnly="readOnly" v-model="queryParams.equipmentName"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="5" :sm="5" :xs="5">
- <a-form-item label="鏃堕棿">
- <a-range-picker @change="dateParamChange" v-model="dates" format="YYYYMMDD"/>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="6" :xs="6">
- <a-form-item label="鏃堕棿娈�">
- <a-time-picker :default-value="moment('00:00', 'HH:mm')" format="HH:mm" @change="onChangeStart"/>
- 鑷�
- <a-time-picker :default-value="moment('08:00', 'HH:mm')" format="HH:mm" @change="onChangeEnd"/>
- </a-form-item>
- </a-col>
- <a-col :md="2" :sm="3" :xs="3">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <!-- table鍖哄煙-begin -->
- <div id="DeviceList">
- <div style="padding: 5px;width: 100%;height: 100%">
- <div style="width: 100%;height: 100%" id="dayAvailBar"></div>
- </div>
- </div>
- <!-- table鍖哄煙-end -->
- </div>
- </div>
- </a-spin>
-</template>
-
-<script>
- import moment from 'moment'
- import { getAction } from '@/api/manage'
-
- export default {
- name: 'equipmentAvailCompareMain',
- props: { nodeTree: '', Type: '', nodePeople: '' },
- data() {
- return {
- activeKey: '1',
- typeTree: '',
- typeParent: 1,
- typeEquipment: 1,
- spaceTime: [],
- usingRates: [],
- dates: [],
- readOnly: true,
- queryParam: {},
- queryParams: {},
- queryParamEquip: {},
- queryParamPeople: {},
- url: {
- dayUtilizationRateContrast: '/mdc/efficiencyReport/dayUtilizationRateContrast',
- getEquipmentByPid: '/mdc/mdcEquipment/getEquipmentByPid',
- getEquipmentByDepPid: '/mdc/mdcEquipment/getEquipmentByDepPid'
- },
- AnalysisList: {},
- loading: false
- }
- },
- watch: {
- Type(valmath) {
- this.dataList = []
- this.queryParams.typeTree = valmath
- // console.log(this.queryParams.typeTree)
- },
- nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId) {
- // this.$set(this.queryParam, 'tierName', val.title)
- this.queryParamEquip.parentId = ''
- this.queryParams.equipmentId = val.equipmentId
- this.queryParams.equipmentName = val.equipmentName
- this.queryParamEquip.equipmentId = val.equipmentId
- this.searchQuery()
- } else {
- // this.$set(this.queryParam, 'tierName', val.title)
- this.queryParamEquip.parentId = val.key
- this.queryParams.equipmentId = ''
- this.initEquipment(val.key)
- }
-
- }
- },
- nodePeople(val) {
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId) {
- // this.$set(this.queryParam, 'tierName', val.title)
- this.queryParamEquip.parentId = ''
- this.queryParams.equipmentId = val.equipmentId
- this.queryParamEquip.equipmentId = val.equipmentId
- this.searchQuery()
- } else {
- // this.$set(this.queryParam, 'tierName', val.title)
- this.queryParamEquip.parentId = val.key
- this.queryParams.equipmentId = ''
- this.initEquipmentDep(val.key)
- }
-
- }
- }
- },
- methods: {
- drawTu() {
- let dayAvailBar = this.$echarts.init(document.getElementById('dayAvailBar'), 'macarons')
- //dayAvailLine = echarts.init(document.getElementById('dayAvailLine'));
- let dayAvailBarOption = {
- title: {
- text: '璁惧鏃ュ埄鐢ㄧ巼鍥�',
- x: 'center',
- textStyle: {
- fontSize: 18,
- fontWeight: 'bolder',
- color: '#151414'
- }
- },
- tooltip: {
- trigger: 'axis',
- formatter: '{a} <br/>{b} :({c}%)'
- },
- toolbox: {
- show: true,
- feature: {
- mark: { show: true },
- dataView: { show: true, readOnly: false },
- magicType: { show: true, type: ['line', 'bar'] },
- restore: { show: true },
- saveAsImage: { show: true }
- }
- },
- calculable: true, //鏄惁鍚敤鎷栨嫿閲嶈绠楃壒鎬�
- xAxis: [
- {
- type: 'category',
- name: '鏃堕棿鍒嗘',
- boundaryGap: true,
- data: this.spaceTime
- }
- ],
- yAxis: [
- {
- type: 'value',
- name: '鍒╃敤鐜�'
- }
- ],
- series: [
- {
- name: '鍒╃敤鐜�',
- type: 'line',
- barWidth: 50,
- itemStyle: {
- normal: {
- color: '#4169E1'
- }
- },
- data: this.usingRates,
- markPoint: {
- data: [
- { type: 'max', name: '鏈�澶у��', symbolSize: 70 },
- { type: 'min', name: '鏈�灏忓��', symbolSize: 70 }
- ]
- }
- }
- ]
- }
- dayAvailBar.setOption(dayAvailBarOption)
- },
- moment,
- onChangeStart(time, timeString) {
- this.queryParam.startTime = timeString
- // console.log(time, timeString);
- },
- onChangeEnd(time, timeString) {
- this.queryParam.endTime = timeString
- // console.log(time, timeString);
- },
- disabledDate(current) {
- //Can not slect days before today and today
- return current && current > moment().subtract('days', 1)
- },
- dataChange(val) {
- if (val) this.queryParam.dateTime = val.format('YYYYMMDD')
- },
- handleChange(value) {
- this.queryParam.timeType = value
- // console.log(this.queryParam.timeType)
- },
- tabChange(val) {
- this.activeKey = val
- },
- dateParamChange(v1, v2) {
- // console.log(v1,v2)
- this.queryParam.startDate = v2[0]
- this.queryParam.endDate = v2[1]
- // console.log(v2[0],v2[1])
- },
- loadAnalysis() {
- this.loading = true
- getAction(this.url.dayUtilizationRateContrast, this.queryParam).then(res => {
- if (res.success) {
- this.spaceTime.push(res.result.dataList)
- for (let i = 0; i < res.result.dayRateDto.length; i++) {
- this.usingRates.push(res.result.dayRateDto[i].utilizationRate)
- }
- this.drawTu()
- } else {
- this.$message.warning(res.message)
- }
- }).finally(() => {
- this.loading = false
- })
- },
- numFilter(value) {
- if (value) {
- return parseFloat((value * 100).toFixed(2))
- } else {
- return '0'
- }
- },
- searchQuery() {
- if (this.queryParam.startTime && this.queryParam.endTime && this.dates && this.dates.length > 0) {
- this.loading = true
- this.spaceTime = []
- this.usingRates = []
- if (this.queryParams.typeTree == '1') {
- this.queryParams.parentId = this.queryParamEquip.parentId
- // this.queryParams.equipmentId = this.queryParamEquip.equipmentId
-
- } else {
- this.queryParams.parentId = this.queryParamEquip.parentId
- // this.queryParams.equipmentId = ""
- }
- this.AnalysisList = []
- //鑾峰彇鏌ヨ鏉′欢
- this.queryParam.parentId = this.queryParams.parentId
- this.queryParam.equipmentId = this.queryParams.equipmentId
- this.queryParam.typeTree = this.queryParams.typeTree
- getAction(this.url.dayUtilizationRateContrast, this.queryParam).then((res) => {
- if (res.success) {
- this.spaceTime = res.result.dateList
- for (let i = 0; i < res.result.dayRateDto.length; i++) {
- // res.result[i].useRateDayShift = this.numFilter(res.result[i].useRateDayShift)
- this.usingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate))
- }
- this.drawTu()
- } else {
- // this.$message.warning(res.message)
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- this.loading = false
- })
- } else {
- this.$notification.warning({
- message: '娑堟伅',
- description: '璇烽�夋嫨鏃堕棿鎴栨椂闂存'
- })
- }
- },
- searchReset() {
- this.loading = true
- this.spaceTime = []
- this.usingRates = []
- if (this.queryParams.typeTree == '1') {
- this.typeTree = this.queryParams.typeTree
- this.typeParent = this.queryParams.parentId
- this.typeEquipment = this.queryParams.equipmentId
- this.queryParams = {}
- this.queryParam = {}
- this.queryParams.typeTree = this.typeTree
- this.queryParams.parentId = this.typeParent
- if (this.queryParams.parentId != '') {
- this.queryParams.equipmentId = ''
- this.initEquipment()
- } else {
- if (this.queryParams.equipmentId == this.queryParamEquip.equipmentId) {
- this.queryParams.equipmentId = this.typeEquipment
- } else {
- this.queryParams.equipmentId = this.queryParamEquip.equipmentId
- }
- }
- getAction(this.url.dayUtilizationRateContrast, this.queryParams).then((res) => {
- if (res.success) {
- this.spaceTime = res.result.dateList
- for (let i = 0; i < res.result.dayRateDto.length; i++) {
- this.usingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate))
- }
- this.drawTu()
- } else {
- // this.$message.warning(res.message)
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- this.loading = false
- })
- } else {
- this.typeTree = this.queryParams.typeTree
- this.typeParent = this.queryParams.parentId
- this.typeEquipment = this.queryParams.equipmentId
- this.queryParams = {}
- this.queryParam = {}
- this.dates = []
- this.queryParams.typeTree = this.typeTree
- this.queryParams.parentId = this.typeParent
- if (this.queryParams.parentId != '') {
- this.queryParams.equipmentId = ''
- this.initEquipment()
- } else {
- if (this.queryParams.equipmentId == this.queryParamEquip.equipmentId) {
- this.queryParams.equipmentId = this.typeEquipment
- } else {
- this.queryParams.equipmentId = this.queryParamEquip.equipmentId
- }
- }
- getAction(this.url.dayUtilizationRateContrast, this.queryParams).then((res) => {
- if (res.success) {
- this.spaceTime = res.result.dateList
- for (let i = 0; i < res.result.dayRateDto.length; i++) {
- this.usingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate))
- }
- this.drawTu()
- } else {
- // this.$message.warning(res.message)
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- this.loading = false
- })
- }
-
- },
- initEquipment(id) {
- let _this = this
- getAction(this.url.getEquipmentByPid, { pid: id }).then((res) => {
- if (res.success) {
- if (res.result != null) {
- _this.$set(this.queryParams, 'equipmentName', res.result.equipmentName)
- _this.$set(this.queryParams, 'equipmentId', res.result.equipmentId)
- _this.$set(this.queryParam, 'equipmentId', res.result.equipmentId)
- _this.equipment = res.result
- _this.searchQuery()
- } else {
- this.queryParams = {}
- // this.queryList()
- this.equipment = {}
- // _this.$message.warning('璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒')
- _this.$notification.warning({
- message: '娑堟伅',
- description: '璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒'
- })
- }
- } else {
- // this.$message.warning(res.message)
- _this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- })
- },
- initEquipmentDep(id) {
- let _this = this
- getAction(this.url.getEquipmentByDepPid, { pid: id }).then((res) => {
- if (res.success) {
- if (res.result != null) {
- _this.$set(this.queryParams, 'equipmentName', res.result.equipmentName)
- _this.$set(this.queryParams, 'equipmentId', res.result.equipmentId)
- _this.$set(this.queryParam, 'equipmentId', res.result.equipmentId)
- _this.equipment = res.result
- _this.searchQuery()
- } else {
- this.queryParams = {}
- // this.queryList()
- this.equipment = {}
- // _this.$message.warning('璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒')
- _this.$notification.warning({
- message: '娑堟伅',
- description: '璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒'
- })
- }
- } else {
- // this.$message.warning(res.message)
- _this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- })
- }
- },
- created() {
- this.dates = [moment().subtract('days', 7), moment().subtract('days', 0)]
- this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD')
- this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD')
- this.queryParam.startTime = '00:00'
- this.queryParam.endTime = '08:00'
- this.queryParams.typeTree = '1'
-
- },
- mounted() {
- this.initEquipment()
- }
- }
-</script>
-
-<style lang="less" scoped>
- /*@import '~@assets/less/common.less';*/
-
- @media screen and (min-width: 1920px) {
- .device_list {
- height: 811px !important;
- overflow: auto;
- }
- }
-
- @media screen and (min-width: 1680px) and (max-width: 1920px) {
- .device_list {
- height: 811px !important;
- overflow: auto;
- }
- }
-
- @media screen and (min-width: 1400px) and (max-width: 1680px) {
- .device_list {
- height: 663px !important;
- overflow: auto;
- }
- }
-
- @media screen and (min-width: 1280px) and (max-width: 1400px) {
- .device_list {
- height: 564px !important;
- overflow: auto;
- }
- }
-
- @media screen and (max-width: 1280px) {
- .device_list {
- height: 564px !important;
- overflow: auto;
- }
- }
-
- /deep/ .ant-card-body {
- height: 100% !important;
- }
-
- .device_list .com_box {
- display: flex !important;
- height: 100% !important;
- flex-direction: column !important;
- }
-
- .device_list .table-page-search-wrapper {
- height: 6% !important;
- }
-
- .device_list #DeviceList {
- height: 90% !important;
- }
-</style>
diff --git a/src/views/mdc/base/modules/EquipmentDayAvail/EquipmentDayAvailMain.vue b/src/views/mdc/base/modules/EquipmentDayAvail/EquipmentDayAvailMain.vue
deleted file mode 100644
index d291654..0000000
--- a/src/views/mdc/base/modules/EquipmentDayAvail/EquipmentDayAvailMain.vue
+++ /dev/null
@@ -1,498 +0,0 @@
-<template>
- <a-spin :spinning="loading">
- <div :bordered="false" class="device_list">
- <div class="com_box">
- <!-- 鏌ヨ鍖哄煙 -->
- <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="4" :sm="4">
- <a-form-item label="璁惧缂栧彿">
- <a-input placeholder="杈撳叆璁惧缂栧彿鏌ヨ" :readOnly="readOnly" v-model="queryParams.equipmentId"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="4" :sm="4">
- <a-form-item label="璁惧鍚嶇О">
- <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" :readOnly="readOnly" v-model="queryParams.equipmentName"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="4" :sm="4" :xs="4">
- <a-form-item label="鏃ユ湡">
- <a-date-picker v-model="queryParam.dateTime" :disabledDate="disabledDate" format='YYYYMMDD'
- @change="dataChange"/>
- </a-form-item>
- </a-col>
- <a-col :md="4" :sm="4" :xs="4">
- <a-form-item label="闂撮殧">
- <a-select default-value="2" style="width: 140px" v-model="queryParam.timeType">
- <a-select-option :value="2">
- 2
- </a-select-option>
- <a-select-option :value="3">
- 3
- </a-select-option>
- <a-select-option :value="4">
- 4
- </a-select-option>
- <a-select-option :value="6">
- 6
- </a-select-option>
- </a-select>
- 灏忔椂
- </a-form-item>
- </a-col>
- <a-col :md="3" :sm="3" :xs="3">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <!-- table鍖哄煙-begin -->
- <div id="DeviceList">
-
- <div style="padding: 5px;width: 100%;height: 100%">
- <div style="width: 100%;height: 100%" id="dayAvailBar"></div>
- </div>
- </div>
- <!-- table鍖哄煙-end -->
- </div>
- </div>
- </a-spin>
-</template>
-
-<script>
- import moment from 'moment'
- import { getAction } from '@/api/manage'
-
- export default {
- name: 'equipmentDayAvailMain',
- components: {
- },
- props: { nodeTree: '', Type: '', nodePeople: '' },
- data() {
- return {
- activeKey: '1',
- typeTree: '',
- typeParent: 1,
- typeEquipment: 1,
- spaceTime: [],
- useingRates: [],
- dates: [],
- xianshi: '',
- readOnly: true,
- queryParam: {
- dateTime: undefined,
- timeType: '2'
- },
- queryParams: {},
- queryParamEquip: {},
- queryParamPeople: {},
- dataStartsoucre: [],
- url: {
- comparativeAnalysis: '/mdc/efficiencyReport/comparativeAnalysis',
- dayUtilizationRate: '/mdc/efficiencyReport/dayUtilizationRate',
- getEquipmentByPid: '/mdc/mdcEquipment/getEquipmentByPid',
- getEquipmentByDepPid: '/mdc/mdcEquipment/getEquipmentByDepPid'
- },
- AnalysisList: {},
- loading: false
- }
- },
- watch: {
- Type(valmath) {
- this.dataList = []
- this.queryParams.typeTree = valmath
- // console.log(this.queryParams.typeTree)
- },
- nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId) {
- // this.$set(this.queryParam, 'tierName', val.title)
- this.queryParamEquip.parentId = ''
- this.queryParams.equipmentId = val.equipmentId
- this.queryParams.equipmentName = val.equipmentName
- console.log('XXXval=', val)
- this.queryParamEquip.equipmentId = val.equipmentId
- this.searchQuery()
- } else {
- // this.$set(this.queryParam, 'tierName', val.title)
- this.queryParamEquip.parentId = val.key
- this.queryParams.equipmentId = ''
- this.initEquipment(val.key)
- }
-
- }
- },
- nodePeople(val) {
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId) {
- // this.$set(this.queryParam, 'tierName', val.title)
- this.queryParamEquip.parentId = ''
- this.queryParams.equipmentId = val.equipmentId
- this.queryParamEquip.equipmentId = val.equipmentId
- this.searchQuery()
- } else {
- // this.$set(this.queryParam, 'tierName', val.title)
- this.queryParamEquip.parentId = val.key
- this.queryParams.equipmentId = ''
- this.initEquipmentDep(val.key)
- }
-
- }
- }
- },
- methods: {
- moment,
- drawTu() {
- let dayAvailBar = this.$echarts.init(document.getElementById('dayAvailBar'), 'macarons')
- let dayAvailBarOption = {
- title: {
- text: '璁惧鏃ュ埄鐢ㄧ巼鍥�',
- x: 'center',
- textStyle: {
- fontSize: 18,
- fontWeight: 'bolder',
- color: '#151414'
- }
- },
- tooltip: {
- trigger: 'axis',
- formatter: '{a} <br/>{b} :({c}%)'
- },
- toolbox: {
- show: true,
- feature: {
- mark: { show: true },
- dataView: { show: true, readOnly: false },
- magicType: { show: true, type: ['line', 'bar'] },
- restore: { show: true },
- saveAsImage: { show: true }
- }
- },
- calculable: true, //鏄惁鍚敤鎷栨嫿閲嶈绠楃壒鎬�
- xAxis: [
- {
- type: 'category',
- name: '鏃堕棿鍒嗘',
- boundaryGap: true,
- data: this.spaceTime
- }
- ],
- yAxis: [
- {
- type: 'value',
- name: '鍒╃敤鐜�'
- }
- ],
- series: [
- {
- name: '鍒╃敤鐜�',
- type: 'line',
- barWidth: 50,
- itemStyle: {
- normal: {
- color: '#4169E1'
- }
- },
- data: this.useingRates,
- markPoint: {
- data: [
- { type: 'max', name: '鏈�澶у��', symbolSize: 70 },
- { type: 'min', name: '鏈�灏忓��', symbolSize: 70 }
- ]
- }
- }
- ]
- }
- dayAvailBar.setOption(dayAvailBarOption)
- },
- disabledDate(current) {
- //Can not slect days before today and today
- return current && current > moment().subtract('days', 1)
- },
- dataChange(val) {
- this.queryParam.dateTime = val.format('YYYYMMDD')
- },
- handleChange(value) {
- this.queryParam.timeType = value
- // console.log(this.queryParam.timeType)
- },
- tabChange(val) {
- this.activeKey = val
- },
- dateParamChange(v1, v2) {
- // console.log(v1,v2)
- this.queryParam.startTime = v2[0]
- this.queryParam.endTime = v2[1]
- // console.log(v2[0],v2[1])
- },
- loadAnalysis() {
- this.loading = true
- getAction(this.url.dayUtilizationRate, this.queryParam).then(res => {
- if (res.success) {
- this.spaceTime.push(res.result.dataList)
- for (var i = 0; i < res.result.dayRateDto.length; i++) {
- this.useingRates.push(res.result.dayRateDto[i].utilizationRate)
- }
- this.drawTu()
- } else {
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- this.loading = false
- })
- },
- numFilter(value) {
- if (value) {
- return parseFloat((value * 100).toFixed(2))
- } else {
- return '0'
- }
- },
- searchQuery() {
- if (this.queryParam.dateTime) {
- this.loading = true
- this.spaceTime = []
- this.useingRates = []
- if (this.queryParams.typeTree == '1') {
- this.queryParams.parentId = this.queryParamEquip.parentId
- // this.queryParams.equipmentId = this.queryParamEquip.equipmentId
- } else {
- this.queryParams.parentId = this.queryParamEquip.parentId
- // this.queryParams.equipmentId = ""
- }
- this.AnalysisList = []
- //鑾峰彇鏌ヨ鏉′欢
- this.queryParam.parentId = this.queryParams.parentId
- this.queryParam.equipmentId = this.queryParams.equipmentId
- this.queryParam.typeTree = this.queryParams.typeTree
- getAction(this.url.dayUtilizationRate, this.queryParam).then((res) => {
- if (res.success) {
- this.spaceTime = res.result.dateList
- for (var i = 0; i < res.result.dayRateDto.length; i++) {
- this.useingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate))
- }
- this.drawTu()
- } else {
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- this.loading = false
- })
- } else {
- this.$notification.warning({
- message: '娑堟伅',
- description: '璇烽�夋嫨鏃堕棿'
- })
- }
- },
- searchReset() {
- this.spaceTime = []
- this.useingRates = []
- if (this.queryParams.typeTree == '1') {
- this.typeTree = this.queryParams.typeTree
- this.typeParent = this.queryParams.parentId
- this.typeEquipment = this.queryParams.equipmentId
- this.queryParams = {}
- this.queryParam = {}
- this.queryParams.typeTree = this.typeTree
- this.queryParams.parentId = this.typeParent
- if (this.queryParams.parentId != '') {
- this.queryParams.equipmentId = ''
- this.initEquipment()
- } else {
- if (this.queryParams.equipmentId == this.queryParamEquip.equipmentId) {
- this.queryParams.equipmentId = this.typeEquipment
- } else {
- this.queryParams.equipmentId = this.queryParamEquip.equipmentId
- }
- }
- getAction(this.url.dayUtilizationRate, this.queryParams).then((res) => {
- if (res.success) {
- this.spaceTime = res.result.dateList
- for (var i = 0; i < res.result.dayRateDto.length; i++) {
- this.useingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate))
- }
- this.drawTu()
- } else {
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- this.loading = false
- })
- } else {
- this.typeTree = this.queryParams.typeTree
- this.typeParent = this.queryParams.parentId
- this.typeEquipment = this.queryParams.equipmentId
- this.queryParams = {}
- this.queryParam = {}
- this.dates = []
- this.queryParams.typeTree = this.typeTree
- this.queryParams.parentId = this.typeParent
- if (this.queryParams.parentId != '') {
- this.queryParams.equipmentId = ''
- this.initEquipment()
- } else {
- if (this.queryParams.equipmentId == this.queryParamEquip.equipmentId) {
- this.queryParams.equipmentId = this.typeEquipment
- } else {
- this.queryParams.equipmentId = this.queryParamEquip.equipmentId
- }
- }
- getAction(this.url.dayUtilizationRate, this.queryParams).then((res) => {
- if (res.success) {
- this.spaceTime = res.result.dateList
- for (var i = 0; i < res.result.dayRateDto.length; i++) {
- this.useingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate))
- }
- this.drawTu()
- } else {
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- this.loading = false
- })
- }
-
- },
- initEquipment(id) {
- let _this = this
- getAction(this.url.getEquipmentByPid, { pid: id }).then((res) => {
- if (res.success) {
- if (res.result != null) {
- _this.$set(this.queryParams, 'equipmentName', res.result.equipmentName)
- _this.$set(this.queryParams, 'equipmentId', res.result.equipmentId)
- _this.$set(this.queryParam, 'equipmentId', res.result.equipmentId)
- _this.equipment = res.result
- _this.searchQuery()
- } else {
- this.queryParams = {}
- this.equipment = {}
- _this.$notification.warning({
- message: '娑堟伅',
- description: '璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒'
- })
- }
- } else {
- _this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
-
- }
- })
- },
- initEquipmentDep(id) {
- let _this = this
- getAction(this.url.getEquipmentByDepPid, { pid: id }).then((res) => {
- if (res.success) {
- if (res.result != null) {
- _this.$set(this.queryParams, 'equipmentName', res.result.equipmentName)
- _this.$set(this.queryParams, 'equipmentId', res.result.equipmentId)
- _this.$set(this.queryParam, 'equipmentId', res.result.equipmentId)
- _this.equipment = res.result
- _this.searchQuery()
- } else {
- this.queryParams = {}
- this.equipment = {}
- _this.$notification.warning({
- message: '娑堟伅',
- description: '璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒'
- })
- }
- } else {
- _this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- })
- }
- },
- created() {
- let collectTime = moment(moment().add(-1, 'd'), 'YYYY-MM-DD')
-
- this.queryParams.collectTime = collectTime
-
- this.queryParam.dateTime = this.queryParams.collectTime.format('YYYYMMDD')
- this.queryParams.typeTree = '1'
- this.initEquipment()
-
- }
- }
-</script>
-
-<style lang="less" scoped>
- /*@import '~@assets/less/common.less';*/
-
- @media screen and (min-width: 1920px) {
- .device_list {
- height: 811px !important;
- overflow: auto;
- }
- }
-
- @media screen and (min-width: 1680px) and (max-width: 1920px) {
- .device_list {
- height: 811px !important;
- overflow: auto;
- }
- }
-
- @media screen and (min-width: 1400px) and (max-width: 1680px) {
- .device_list {
- height: 663px !important;
- overflow: auto;
- }
- }
-
- @media screen and (min-width: 1280px) and (max-width: 1400px) {
- .device_list {
- height: 564px !important;
- overflow: auto;
- }
- }
-
- @media screen and (max-width: 1280px) {
- .device_list {
- height: 564px !important;
- overflow: auto;
- }
- }
-
- /*.device_list{*/
- /*display: flex;*/
- /*}*/
- /*.device_list .table-page-search-wrapper{*/
- /**/
- /*}*/
- /deep/ .ant-card-body {
- height: 100% !important;
- }
-
- .device_list .com_box {
- display: flex !important;
- height: 100% !important;
- flex-direction: column !important;
- }
-
- .device_list .table-page-search-wrapper {
- height: 6% !important;
- }
-
- .device_list #DeviceList {
- height: 90% !important;
- }
-</style>
diff --git a/src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue b/src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue
deleted file mode 100644
index f799bac..0000000
--- a/src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue
+++ /dev/null
@@ -1,256 +0,0 @@
-<template>
- <a-modal :title="title" :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
- cancelText="鍏抽棴">
- <a-card :bordered="false">
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="7" :sm="7">
- <a-form-item label="缁熶竴缂栫爜">
- <a-input placeholder="璇疯緭鍏ョ粺涓�缂栫爜妫�绱�" v-model="queryParam.equipmentid"></a-input>
- </a-form-item>
- </a-col>
-
- <a-col :md="7" :sm="7">
- <a-form-item label="璁惧鍚嶇О">
- <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉版绱�" v-model="queryParam.equipmentname"></a-input>
- </a-form-item>
- </a-col>
-
- <a-col :md="3" :sm="3">
- <a-space>
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
- </a-space>
- </a-col>
- </a-row>
- </a-form>
- </div>
-
- <!-- table鍖哄煙-begin -->
- <div>
- <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 300聽}" :columns="columns"
- :dataSource="dataSource" :pagination="ipagination" :loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}"
- @change="handleTableChange">
- </a-table>
- </div>
- <!-- table鍖哄煙-end -->
- </a-card>
- </a-modal>
-</template>
-
-<script>
- import {
- ajaxGetSelectItems
- } from '@/api/api'
- import JDictSelectTag from '@/components/dict/JDictSelectTag'
- import {
- deleteAction,
- requestPut,
- getAction
- } from '@/api/manage'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
- import JInput from '@/components/jeecg/JInput'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import Tooltip from 'ant-design-vue/es/tooltip'
- import JDate from '@/components/jeecg/JDate'
- import moment from 'moment'
- import { filterObj } from '@/utils/util';
-
- export default {
- name: 'DeviceListModel',
- mixins: [JeecgListMixin],
- components: {
- JDictSelectTag,
- JEllipsis,
- JInput,
- Tooltip,
- JDate
- },
- props: {
- status: {
- type: Number,
- default: 1
- }
- },
- data() {
- return {
- title:'',
- visible: false,
- disableMixinCreated: true,
- queryParam: {},
- columns: [{
- title: '缁熶竴缂栫爜',
- align: 'center',
- dataIndex: 'equipmentid',
- },
- {
- title: '璁惧鍚嶇О',
- align: 'center',
- dataIndex: 'equipmentname',
- },
- {
- title: '璁惧鍨嬪彿',
- align: 'center',
- dataIndex: 'equipmentmodel',
- },
- // {
- // title: '璁惧绫诲瀷',
- // align: 'center',
- // dataIndex: 'equipmentType',
- // },
- {
- title: '鏈哄簥IP',
- align: 'center',
- dataIndex: 'equipmentip',
- },
- {
- title: '椹卞姩绫诲瀷',
- align: 'center',
- dataIndex: 'drivetype',
- },
- {
- title: '绔彛',
- align: 'center',
- dataIndex: 'dataport',
- },
- {
- title: '鏁版帶绯荤粺',
- align: 'center',
- dataIndex: 'controlsystem',
- }
- ],
- url: {
- list: '/mdc/equipment/list',
- },
-
- }
- },
- created() {
-
- },
- methods: {
- openPage() {
- this.visible = true
- this.onClearSelected()
- this.dataSource = [];
- // this.queryParam = {
- // status: this.status
- // };
- this.loadData();
- },
- getQueryParams() {
- //鑾峰彇鏌ヨ鏉′欢
- let sqp = {}
- if(this.superQueryParams){
- sqp['superQueryParams']=encodeURI(this.superQueryParams)
- sqp['superQueryMatchType'] = this.superQueryMatchType
- }
- var param = Object.assign(sqp, this.queryParam);
- // param.field = this.getQueryField();
- param.pageNo = this.ipagination.current;
- param.pageSize = this.ipagination.pageSize;
- //鑾峰彇鐢ㄦ埛瀹氬埗鐨勫弬鏁板睘鎬�
- // if (this.getCustomQueryParams) {
- // param = this.getCustomQueryParams(param);
- // if(!param){
- // return false;
- // }
- // }
-
- return filterObj(param);
- },
- loadData(arg) {
- if(!this.url.list){
- this.$message.error("璇疯缃畊rl.list灞炴��!")
- return
- }
- //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
- if (arg === 1) {
- this.ipagination.current = 1;
- }
- var params = this.getQueryParams();//鏌ヨ鏉′欢
-
- if(!params){
- return false;
- }
-
- this.loading = true;
- getAction(this.url.list, params).then((res) => {
- if (res.success) {
- // console.log(res)
- //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- this.dataSource = res.result.records||res.result;
- if(res.result.total)
- {
- this.ipagination.total = res.result.total;
- }else{
- this.ipagination.total = 0;
- }
- //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- }else{
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- })
- },
- getQueryField() {
- //TODO 瀛楁鏉冮檺鎺у埗
- // var str = "";
- // this.columns.forEach(function (value) {
- // str += value.dataIndex +"," ;
- // });
- // return str;
- },
- modalFormOk(val) {
- // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- this.loadData();
- this.selectedRowKeys = [val.id];
- },
- searchQuery() {
- this.loadData();
- this.onClearSelected()
- },
- searchReset() {
- this.queryParam = {}
- this.loadData();
- this.onClearSelected()
- },
- close() {
- this.$emit('close')
- this.visible = false
- },
- handleCancel() {
- this.close()
- },
- handleOk() {
- this.$emit('sendSelectionRows', this.selectionRows[0])
- this.close()
- },
- },
- }
-</script>
-<style>
- @import '~@assets/less/common.less';
-
- .frozenRowClass {
- color: #c9c9c9;
- }
-
- .success {
- color: green;
- }
-
- .error {
- color: red;
- }
-</style>
diff --git a/src/views/mdc/base/modules/EquipmentList/EquipmentModal.vue b/src/views/mdc/base/modules/EquipmentList/EquipmentModal.vue
deleted file mode 100644
index ce4eb25..0000000
--- a/src/views/mdc/base/modules/EquipmentList/EquipmentModal.vue
+++ /dev/null
@@ -1,553 +0,0 @@
-<template>
- <a-drawer
- :title="title"
- :maskClosable="true"
- :width="drawerWidth"
- placement="right"
- :closable="true"
- @close="handleCancel"
- :visible="visible"
- style="height: 100%;overflow: auto;padding-bottom: 53px;">
-
- <template slot="title">
- <div style="width: 100%;">
- <span>{{ title }}</span>
- <span style="display:inline-block;width:calc(100% - 51px);padding-right:10px;text-align: right">
- <a-button @click="toggleScreen" icon="appstore" style="height:20px;width:20px;border:0px"></a-button>
- </span>
- </div>
-
- </template>
-
- <a-spin :spinning="confirmLoading">
- <a-form-model ref="form" :model="model" :rules="validatorRules">
-
- <a-form-model-item label="鐢ㄦ埛璐﹀彿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="username">
- <a-input placeholder="璇疯緭鍏ョ敤鎴疯处鍙�" v-model="model.username" :readOnly="!!model.id"/>
- </a-form-model-item>
-
- <template v-if="!model.id">
- <a-form-model-item label="鐧诲綍瀵嗙爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="password" >
- <a-input type="password" placeholder="璇疯緭鍏ョ櫥褰曞瘑鐮�" v-model="model.password" />
- </a-form-model-item>
-
- <a-form-model-item label="纭瀵嗙爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmpassword" >
- <a-input type="password" @blur="handleConfirmBlur" placeholder="璇烽噸鏂拌緭鍏ョ櫥褰曞瘑鐮�" v-model="model.confirmpassword"/>
- </a-form-model-item>
- </template>
-
- <a-form-model-item label="鐢ㄦ埛濮撳悕" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="realname">
- <a-input placeholder="璇疯緭鍏ョ敤鎴峰鍚�" v-model="model.realname" />
- </a-form-model-item>
-
- <a-form-model-item label="宸ュ彿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workNo">
- <a-input placeholder="璇疯緭鍏ュ伐鍙�" v-model="model.workNo" />
- </a-form-model-item>
-
- <!--<a-form-model-item label="鑱屽姟" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<j-select-position placeholder="璇烽�夋嫨鑱屽姟" :multiple="false" v-model="model.post"/>-->
- <!--</a-form-model-item>-->
-
- <a-form-model-item label="瑙掕壊鍒嗛厤" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!roleDisabled" >
- <j-multi-select-tag
- :disabled="disableSubmit"
- v-model="model.selectedroles"
- :options="rolesOptions"
- placeholder="璇烽�夋嫨瑙掕壊">
- </j-multi-select-tag>
- </a-form-model-item>
-
- <!--閮ㄩ棬鍒嗛厤-->
- <a-form-model-item label="閮ㄩ棬鍒嗛厤" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
- <j-select-depart v-model="model.selecteddeparts" :multi="true" @back="backDepartInfo" :backDepart="true" :treeOpera="true">></j-select-depart>
- </a-form-model-item>
-
- <!--杞﹂棿鍒嗛厤-->
- <a-form-model-item label="杞﹂棿鍒嗛厤" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!productionDisabled">
- <j-select-production v-model="model.selectedProduction" :multi="true" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-production>
- </a-form-model-item>
-
- <a-form-model-item label="璐熻矗閮ㄩ棬" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="departIdShow==true">
- <j-multi-select-tag
- :disabled="disableSubmit"
- v-model="model.departIds"
- :options="nextDepartOptions"
- placeholder="璇烽�夋嫨璐熻矗閮ㄩ棬">
- </j-multi-select-tag>
- </a-form-model-item>
-
- <a-form-model-item label="澶村儚" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <j-image-upload class="avatar-uploader" text="涓婁紶" v-model="model.avatar" ></j-image-upload>
- </a-form-model-item>
-
- <a-form-model-item label="鐢熸棩" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-date-picker
- style="width: 100%"
- placeholder="璇烽�夋嫨鐢熸棩"
- v-model="model.birthday"
- :format="dateFormat"
- :getCalendarContainer="node => node.parentNode"/>
- </a-form-model-item>
-
- <a-form-model-item label="鎬у埆" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-select v-model="model.sex" placeholder="璇烽�夋嫨鎬у埆" :getPopupContainer= "(target) => target.parentNode">
- <a-select-option :value="1">鐢�</a-select-option>
- <a-select-option :value="2">濂�</a-select-option>
- </a-select>
- </a-form-model-item>
-
- <a-form-model-item label="閭" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="email">
- <a-input placeholder="璇疯緭鍏ラ偖绠�" v-model="model.email" />
- </a-form-model-item>
-
- <a-form-model-item label="鎵嬫満鍙风爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
- <a-input placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�" v-model="model.phone" />
- </a-form-model-item>
-
- <a-form-model-item label="搴ф満" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="telephone">
- <a-input placeholder="璇疯緭鍏ュ骇鏈�" v-model="model.telephone" />
- </a-form-model-item>
-
- <!--<a-form-model-item label="宸ヤ綔娴佸紩鎿�" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<j-dict-select-tag v-model="model.activitiSync" placeholder="璇烽�夋嫨鏄惁鍚屾宸ヤ綔娴佸紩鎿�" :type="'radio'" dictCode="activiti_sync"/>-->
- <!--</a-form-model-item>-->
-
- </a-form-model>
- </a-spin>
-
-
- <div class="drawer-bootom-button" v-show="!disableSubmit">
- <a-popconfirm title="纭畾鏀惧純缂栬緫锛�" @confirm="handleCancel" okText="纭畾" cancelText="鍙栨秷">
- <a-button style="margin-right: .8rem">鍙栨秷</a-button>
- </a-popconfirm>
- <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">鎻愪氦</a-button>
- </div>
- </a-drawer>
-</template>
-
-<script>
- import moment from 'moment'
- import Vue from 'vue'
- import { ACCESS_TOKEN } from "@/store/mutation-types"
- import { getAction } from '@/api/manage'
- import { addUser,editUser,queryUserRole,queryall } from '@/api/api'
- import { disabledAuthFilter } from "@/utils/authFilter"
- import { duplicateCheck } from '@/api/api'
- import JSelectProduction from '../../../../../components/jeecgbiz/JSelectProduction'
-
- export default {
- name: "EquipmentModal",
- components: {
- JSelectProduction
- },
- data () {
- return {
- departDisabled: false, //鏄惁鏄垜鐨勯儴闂ㄨ皟鐢ㄨ椤甸潰
- productionDisabled: false, //鏄惁鏄垜鐨勮溅闂磋皟鐢ㄨ椤甸潰
- roleDisabled: false, //鏄惁鏄鑹茬淮鎶よ皟鐢ㄨ椤甸潰
- modalWidth:800,
- drawerWidth:700,
- modaltoggleFlag:true,
- confirmDirty: false,
- userId:"", //淇濆瓨鐢ㄦ埛id
- disableSubmit:false,
- dateFormat:"YYYY-MM-DD",
- validatorRules:{
- username:[{required: true, message: '璇疯緭鍏ョ敤鎴疯处鍙�!'},
- {validator: this.validateUsername,}],
- password: [{required: true,pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,message: '瀵嗙爜鐢�8浣嶆暟瀛椼�佸ぇ灏忓啓瀛楁瘝鍜岀壒娈婄鍙风粍鎴�!'},
- {validator: this.validateToNextPassword,trigger: 'change'}],
- confirmpassword: [{required: true, message: '璇烽噸鏂拌緭鍏ョ櫥褰曞瘑鐮�!',},
- { validator: this.compareToFirstPassword,}],
- realname:[{ required: true, message: '璇疯緭鍏ョ敤鎴峰悕绉�!' }],
- phone: [{required: false, message: '璇疯緭鍏ユ墜鏈哄彿!'}, {validator: this.validatePhone}],
- email: [{validator: this.validateEmail}],
- roles:{},
- workNo:[ { required: true, message: '璇疯緭鍏ュ伐鍙�' },
- { validator: this.validateWorkNo }],
- telephone: [{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '璇疯緭鍏ユ纭殑搴ф満鍙风爜' },]
- },
- departIdShow:false,
- title:"鎿嶄綔",
- visible: false,
- model: {},
- labelCol: {
- xs: { span: 24 },
- sm: { span: 5 },
- },
- wrapperCol: {
- xs: { span: 24 },
- sm: { span: 16 },
- },
- uploadLoading:false,
- confirmLoading: false,
- headers:{},
- url: {
- fileUpload: window._CONFIG['domianURL']+"/sys/common/upload",
- userWithDepart: "/sys/user/userDepartList", // 寮曞叆涓烘寚瀹氱敤鎴锋煡鐪嬮儴闂ㄤ俊鎭渶瑕佺殑url
- //寮曞叆涓烘寚瀹氱敤鎴锋煡鐪嬭溅闂翠俊鎭渶瑕佺殑url
- userProductionList: '/sys/user/userProductionList',
- userId:"/sys/user/generateUserId", // 寮曞叆鐢熸垚娣诲姞鐢ㄦ埛鎯呭喌涓嬬殑url
- syncUserByUserName:"/act/process/extActProcess/doSyncUserByUserName",//鍚屾鐢ㄦ埛鍒板伐浣滄祦
- queryTenantList: '/sys/tenant/queryList'
- },
- tenantsOptions: [],
- rolesOptions:[],
- nextDepartOptions:[],
- nextProductionOptions:[]
- }
- },
- created () {
- const token = Vue.ls.get(ACCESS_TOKEN);
- this.headers = {"X-Access-Token":token}
- this.initRoleList()
- this.initTenantList()
- },
- computed:{
- uploadAction:function () {
- return this.url.fileUpload;
- }
- },
- methods: {
- add () {
- this.refresh();
- this.edit({activitiSync:'1',userIdentity:1});
- },
- edit (record) {
- let that = this;
- that.visible = true;
- //鏍规嵁灞忓箷瀹藉害鑷�傚簲鎶藉眽瀹藉害
- this.resetScreenSize();
- that.userId = record.id;
- that.model = Object.assign({},{selectedroles:'',selecteddeparts:''}, record);
- that.model = Object.assign({},{selectedroles:'',selectedProduction:''}, record);
-
- //韬唤涓轰笂绾ф樉绀鸿礋璐i儴闂紝鍚﹀垯涓嶆樉绀�
- if(this.model.userIdentity==2){
- this.departIdShow=true;
- }else{
- this.departIdShow=false;
- }
-
- if(record.hasOwnProperty("id")){
- that.getUserRoles(record.id);
- that.getUserDeparts(record.id);
- }
- console.log('that.model=',that.model)
- },
- isDisabledAuth(code){
- return disabledAuthFilter(code);
- },
- //绐楀彛鏈�澶у寲鍒囨崲
- toggleScreen(){
- if(this.modaltoggleFlag){
- this.modalWidth = window.innerWidth;
- }else{
- this.modalWidth = 800;
- }
- this.modaltoggleFlag = !this.modaltoggleFlag;
- },
- // 鏍规嵁灞忓箷鍙樺寲,璁剧疆鎶藉眽灏哄
- resetScreenSize(){
- let screenWidth = document.body.clientWidth;
- if(screenWidth < 500){
- this.drawerWidth = screenWidth;
- }else{
- this.drawerWidth = 700;
- }
- },
- //鍒濆鍖栫鎴峰瓧鍏�
- initTenantList(){
- getAction(this.url.queryTenantList).then(res=>{
- if(res.success){
- this.tenantsOptions = res.result.map((item,index,arr)=>{
- let c = {label:item.name, value: item.id+""}
- return c;
- })
- console.log('this.tenantsOptions: ',this.tenantsOptions)
- }
- })
- },
- //鍒濆鍖栬鑹插瓧鍏�
- initRoleList(){
- queryall().then((res)=>{
- if(res.success){
- this.rolesOptions = res.result.map((item,index,arr)=>{
- let c = {label:item.roleName, value:item.id}
- return c;
- })
- console.log('this.rolesOptions: ',this.rolesOptions)
- }
- });
- },
- getUserRoles(userid){
- queryUserRole({userid:userid}).then((res)=>{
- if(res.success){
- this.model.selectedroles = res.result.join(",");
- console.log('that.model.selectedroles=',this.model.selectedroles)
- }
- });
- },
- getUserDeparts(userid){
- let that = this;
- //閮ㄩ棬鐨剈rl
- getAction(that.url.userWithDepart,{userId:userid}).then((res)=>{
- if(res.success){
- let departOptions=[];
- let selectDepartKeys=[]
- for (let i = 0; i < res.result.length; i++) {
- selectDepartKeys.push(res.result[i].key);
- //鏂板璐熻矗閮ㄩ棬閫夋嫨涓嬫媺妗�
- departOptions.push({
- value: res.result[i].key,
- label: res.result[i].title
- })
- }
-
- that.model.selecteddeparts = selectDepartKeys.join(",")
- that.model.selectedProduction = selectDepartKeys.join(",")
-
- that.nextDepartOptions=departOptions;
- console.log('that.nextDepartOptions=',that.nextDepartOptions)
- }
- })
-
- getAction(that.url.userProductionList,{userId:userid}).then((res)=>{
- if(res.success){
- let ProductionOptions=[];
- let selectProductKeys=[]
- for (let i = 0; i < res.result.length; i++) {
- selectProductKeys.push(res.result[i].key);
- //鏂板璐熻矗閮ㄩ棬閫夋嫨涓嬫媺妗�
- ProductionOptions.push({
- value: res.result[i].key,
- label: res.result[i].title
- })
- }
-
- that.model.selectedProduction = selectProductKeys.join(",")
-
- that.nextProductionOptions=ProductionOptions;
- console.log('that.nextProductionOptions=',that.nextProductionOptions)
- }
- })
- //杞﹂棿鐨剈rl
- },
- backDepartInfo(info) {
- this.model.departIds = this.model.selecteddeparts;
- this.nextDepartOptions = info.map((item,index,arr)=>{
- let c = {label:item.text, value: item.value+""}
- return c;
- })
- },
- backProductionInfo(info) {
- this.model.productionIds = this.model.selectedProduction;
- this.nextProductionOptions = info.map((item,index,arr)=>{
- let c = {label:item.text, value: item.value+""}
- return c;
- })
- },
-
-
-
- refresh () {
- this.userId=""
- this.nextDepartOptions=[];
- this.nextProductionOptions = [];
- this.departIdShow=false;
- },
- close () {
- this.$emit('close');
- this.visible = false;
- this.disableSubmit = false;
- this.nextDepartOptions=[];
- this.nextProductionOptions = []
- this.departIdShow=false;
- this.$refs.form.resetFields();
- },
- moment,
- handleSubmit () {
- const that = this;
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.$refs.form.validate(valid => {
- if (valid) {
- that.confirmLoading = true;
- //濡傛灉鏄笂绾ф嫨浼犲叆departIds,鍚﹀垯涓虹┖
- if(this.model.userIdentity!==2){
- this.model.departIds="";
- }
- let obj;
- if(!this.model.id){
- this.model.id = this.userId;
- obj=addUser(this.model);
- }else{
- obj=editUser(this.model);
- }
- obj.then((res)=>{
- if(res.success){
- that.$message.success(res.message);
- that.$emit('ok');
- }else{
- that.$message.warning(res.message);
- }
- }).finally(() => {
- that.confirmLoading = false;
- that.close();
- })
- }else{
- return false;
- }
- })
- },
- handleCancel () {
- this.close()
- },
- validateToNextPassword (rule, value, callback) {
- const confirmpassword=this.model.confirmpassword;
- if (value && confirmpassword && value !== confirmpassword) {
- callback('涓ゆ杈撳叆鐨勫瘑鐮佷笉涓�鏍凤紒');
- }
- if (value && this.confirmDirty) {
- this.$refs.form.validateField(['confirmpassword']);
- }
- callback();
- },
- compareToFirstPassword (rule, value, callback) {
- if (value && value !== this.model.password) {
- callback('涓ゆ杈撳叆鐨勫瘑鐮佷笉涓�鏍凤紒');
- } else {
- callback()
- }
- },
- validatePhone(rule, value, callback){
- if(!value){
- callback()
- }else{
- if(new RegExp(/^1[3|4|5|7|8|9][0-9]\d{8}$/).test(value)){
- var params = {
- tableName: 'sys_user',
- fieldName: 'phone',
- fieldVal: value,
- dataId: this.userId
- };
- duplicateCheck(params).then((res) => {
- if (res.success) {
- callback()
- } else {
- callback("鎵嬫満鍙峰凡瀛樺湪!")
- }
- })
- }else{
- callback("璇疯緭鍏ユ纭牸寮忕殑鎵嬫満鍙风爜!");
- }
- }
- },
- validateEmail(rule, value, callback){
- if(!value){
- callback()
- }else{
- if(new RegExp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(value)){
- var params = {
- tableName: 'sys_user',
- fieldName: 'email',
- fieldVal: value,
- dataId: this.userId
- };
- duplicateCheck(params).then((res) => {
- console.log(res)
- if (res.success) {
- callback()
- } else {
- callback("閭宸插瓨鍦�!")
- }
- })
- }else{
- callback("璇疯緭鍏ユ纭牸寮忕殑閭!")
- }
- }
- },
- validateUsername(rule, value, callback){
- var params = {
- tableName: 'sys_user',
- fieldName: 'username',
- fieldVal: value,
- dataId: this.userId
- };
- duplicateCheck(params).then((res) => {
- if (res.success) {
- callback()
- } else {
- callback("鐢ㄦ埛鍚嶅凡瀛樺湪!")
- }
- })
- },
- validateWorkNo(rule, value, callback){
- var params = {
- tableName: 'sys_user',
- fieldName: 'work_no',
- fieldVal: value,
- dataId: this.userId
- };
- duplicateCheck(params).then((res) => {
- if (res.success) {
- callback()
- } else {
- callback("宸ュ彿宸插瓨鍦�!")
- }
- })
- },
- handleConfirmBlur(e) {
- const value = e.target.value;
- this.confirmDirty = this.confirmDirty || !!value
- },
- beforeUpload: function(file){
- var fileType = file.type;
- if(fileType.indexOf('image')<0){
- this.$message.warning('璇蜂笂浼犲浘鐗�');
- return false;
- }
- //TODO 楠岃瘉鏂囦欢澶у皬
- },
- identityChange(e){
- if(e.target.value===1){
- this.departIdShow=false;
- }else{
- this.departIdShow=true;
- }
- }
- }
- }
-</script>
-
-<style scoped>
- .avatar-uploader > .ant-upload {
- width:104px;
- height:104px;
- }
- .ant-upload-select-picture-card i {
- font-size: 49px;
- color: #999;
- }
-
- .ant-upload-select-picture-card .ant-upload-text {
- margin-top: 8px;
- color: #666;
- }
-
- .ant-table-tbody .ant-table-row td{
- padding-top:10px;
- padding-bottom:10px;
- }
-
- .drawer-bootom-button {
- position: absolute;
- bottom: -8px;
- width: 100%;
- border-top: 1px solid #e8e8e8;
- padding: 10px 16px;
- text-align: right;
- left: 0;
- background: #fff;
- border-radius: 0 0 2px 2px;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/EquipmentList/PasswordModal.vue b/src/views/mdc/base/modules/EquipmentList/PasswordModal.vue
deleted file mode 100644
index f9f897e..0000000
--- a/src/views/mdc/base/modules/EquipmentList/PasswordModal.vue
+++ /dev/null
@@ -1,142 +0,0 @@
-<template>
- <a-modal
- title="閲嶆柊璁惧畾瀵嗙爜"
- :width="800"
- :visible="visible"
- :confirmLoading="confirmLoading"
- @ok="handleSubmit"
- @cancel="handleCancel"
- cancelText="鍏抽棴"
- style="top:20px;"
- >
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
-
- <a-form-item label="鐢ㄦ埛璐﹀彿" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input placeholder="璇疯緭鍏ョ敤鎴疯处鍙�" v-decorator="[ 'username', {}]" :readOnly="true"/>
- </a-form-item>
-
- <a-form-item label="鐧诲綍瀵嗙爜" :labelCol="labelCol" :wrapperCol="wrapperCol" hasFeedback >
- <a-input type="password" placeholder="璇疯緭鍏ョ櫥褰曞瘑鐮�" v-decorator="[ 'password', validatorRules.password]" />
- </a-form-item>
-
- <a-form-item label="纭瀵嗙爜" :labelCol="labelCol" :wrapperCol="wrapperCol" hasFeedback >
- <a-input type="password" @blur="handleConfirmBlur" placeholder="璇烽噸鏂拌緭鍏ョ櫥褰曞瘑鐮�" v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>
- </a-form-item>
-
- </a-form>
- </a-spin>
- </a-modal>
-</template>
-
-<script>
- import {changePassword} from '@/api/api'
-
- export default {
- name: "PasswordModal",
- data () {
- return {
- visible: false,
- confirmLoading: false,
- confirmDirty: false,
- validatorRules:{
- password:{
- rules: [{
- required: true,
- pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
- message: '瀵嗙爜鐢�8浣嶆暟瀛椼�佸ぇ灏忓啓瀛楁瘝鍜岀壒娈婄鍙风粍鎴�!'
- }, {
- validator: this.validateToNextPassword,
- }],
- },
- confirmpassword:{
- rules: [{
- required: true, message: '璇烽噸鏂拌緭鍏ョ櫥褰曞瘑鐮�!',
- }, {
- validator: this.compareToFirstPassword,
- }],
- },
- },
-
- model: {},
-
- labelCol: {
- xs: { span: 24 },
- sm: { span: 5 },
- },
- wrapperCol: {
- xs: { span: 24 },
- sm: { span: 16 },
- },
- form:this.$form.createForm(this)
- }
- },
- created () {
- console.log("created");
- },
-
- methods: {
- show (username) {
- this.form.resetFields();
- this.visible = true;
- this.model.username = username;
- this.$nextTick(() => {
- this.form.setFieldsValue({username:username});
- });
- },
- close () {
- this.$emit('close');
- this.visible = false;
- this.disableSubmit = false;
- this.selectedRole = [];
- },
- handleSubmit () {
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.form.validateFields((err, values) => {
- if (!err) {
- this.confirmLoading = true;
- let formData = Object.assign(this.model, values);
- changePassword(formData).then((res)=>{
- if(res.success){
- this.$message.success(res.message);
- this.$emit('ok');
- }else{
- this.$message.warning(res.message);
- }
- }).finally(() => {
- this.confirmLoading = false;
- this.close();
- });
- }
- })
- },
- handleCancel () {
- this.close()
- },
- validateToNextPassword (rule, value, callback) {
- const form = this.form;
- const confirmpassword=form.getFieldValue('confirmpassword');
- console.log("confirmpassword==>",confirmpassword);
- if (value && confirmpassword && value !== confirmpassword) {
- callback('涓ゆ杈撳叆鐨勫瘑鐮佷笉涓�鏍凤紒');
- }
- if (value && this.confirmDirty) {
- form.validateFields(['confirm'], { force: true })
- }
- callback();
- },
- compareToFirstPassword (rule, value, callback) {
- const form = this.form;
- if (value && value !== form.getFieldValue('password')) {
- callback('涓ゆ杈撳叆鐨勫瘑鐮佷笉涓�鏍凤紒');
- } else {
- callback()
- }
- },
- handleConfirmBlur (e) {
- const value = e.target.value
- this.confirmDirty = this.confirmDirty || !!value
- }
- }
- }
-</script>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/EquipmentList/SysUserAgentModal.vue b/src/views/mdc/base/modules/EquipmentList/SysUserAgentModal.vue
deleted file mode 100644
index 2c40ac4..0000000
--- a/src/views/mdc/base/modules/EquipmentList/SysUserAgentModal.vue
+++ /dev/null
@@ -1,181 +0,0 @@
-<template>
- <a-modal
- :title="title"
- :width="800"
- :visible="visible"
- :confirmLoading="confirmLoading"
- @ok="handleOk"
- @cancel="handleCancel"
- cancelText="鍏抽棴">
-
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
-
- <a-form-item
- :labelCol="labelCol"
- :wrapperCol="wrapperCol"
- label="鐢ㄦ埛鍚�">
- <a-input placeholder="璇疯緭鍏ョ敤鎴峰悕" v-decorator="['userName', {}]" readOnly/>
- </a-form-item>
- <a-form-item
- :labelCol="labelCol"
- :wrapperCol="wrapperCol"
- label="浠g悊浜虹敤鎴峰悕">
- <j-select-user-by-dep placeholder="璇疯緭鍏ヤ唬鐞嗕汉鐢ㄦ埛鍚�" v-decorator="['agentUserName', validatorRules.agentUserName]" :trigger-change="true"></j-select-user-by-dep>
- </a-form-item>
- <a-form-item
- :labelCol="labelCol"
- :wrapperCol="wrapperCol"
- label="浠g悊寮�濮嬫椂闂�">
- <j-date
- v-decorator="[ 'startTime', validatorRules.startTime]"
- :trigger-change="true"
- :showTime="true"
- date-format="YYYY-MM-DD HH:mm:ss"
- style="width:100%"
- placeholder="璇烽�夋嫨寮�濮嬫椂闂�" >
- </j-date>
- </a-form-item>
- <a-form-item
- :labelCol="labelCol"
- :wrapperCol="wrapperCol"
- label="浠g悊缁撴潫鏃堕棿">
- <j-date
- v-decorator="[ 'endTime', validatorRules.endTime]"
- :trigger-change="true"
- :showTime="true"
- date-format="YYYY-MM-DD HH:mm:ss"
- style="width:100%"
- placeholder="璇烽�夋嫨缁撴潫鏃堕棿" >
- </j-date>
- </a-form-item>
- <a-form-item
- :labelCol="labelCol"
- :wrapperCol="wrapperCol"
- label="鐘舵��">
- <a-radio-group class="fontiframe" name="radioGroup" v-decorator="[ 'status', {}]">
- <a-radio class="radioGroup" value="1">鏈夋晥</a-radio>
- <a-radio class="radioGroup" value="0">鏃犳晥</a-radio>
- </a-radio-group>
- </a-form-item>
-
- </a-form>
-
- </a-spin>
- </a-modal>
-</template>
-
-<script>
- import pick from 'lodash.pick'
- import { httpAction, getAction } from '@/api/manage'
- import JDate from '@/components/jeecg/JDate.vue';
- import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
-
- export default {
- name: "SysUserAgentModal",
- components: {
- JDate,
- JSelectUserByDep
- },
- data () {
- return {
- title:"鎿嶄綔",
- visible: false,
- model: {},
- labelCol: {
- xs: { span: 24 },
- sm: { span: 5 },
- },
- wrapperCol: {
- xs: { span: 24 },
- sm: { span: 16 },
- },
- username:"",
- confirmLoading: false,
- form: this.$form.createForm(this),
- validatorRules:{
- agentUserName:{rules: [{ required: true, message: '璇疯緭鍏ヤ唬鐞嗕汉鐢ㄦ埛鍚�!' }]},
- startTime:{rules: [{ required: true, message: '璇疯緭鍏ヤ唬鐞嗗紑濮嬫椂闂�!' }]},
- endTime:{rules: [{ required: true, message: '璇疯緭鍏ヤ唬鐞嗙粨鏉熸椂闂�!' }]},
- },
- url: {
- add: "/sys/sysUserAgent/add",
- edit: "/sys/sysUserAgent/edit",
- queryByUserName:"/sys/sysUserAgent/queryByUserName",
- },
- }
- },
- created () {
- },
- methods: {
- agentSettings(username){
- this.username = username;
- this.init();
-
- },
- init () {
- var params = {userName:this.username};//鏌ヨ鏉′欢
- getAction(this.url.queryByUserName,params).then((res)=>{
- if(res.success){
- console.log("鑾峰彇娴佺▼鑺傜偣淇℃伅",res);
- this.edit (res.result);
- }else{
- this.edit({userName:this.username,status:"0"});
- }
- })
- },
- edit (record) {
- this.form.resetFields();
- this.model = Object.assign({}, record);
- this.visible = true;
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model,'userName','agentUserName','status','startTime','endTime'))
- });
- },
- close () {
- this.$emit('close');
- this.visible = false;
- },
- handleOk () {
- const that = this;
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.form.validateFields((err, values) => {
- if (!err) {
- that.confirmLoading = true;
- let httpurl = '';
- let method = '';
- if(!this.model.id){
- httpurl+=this.url.add;
- method = 'post';
- }else{
- httpurl+=this.url.edit;
- method = 'put';
- }
- let formData = Object.assign(this.model, values);
- httpAction(httpurl,formData,method).then((res)=>{
- if(res.success){
- that.$message.success(res.message);
- //this.init();
- }else{
- that.$message.warning(res.message);
- }
- }).finally(() => {
- that.confirmLoading = false;
- that.close();
- })
-
-
-
- }
- })
- },
- handleCancel () {
- this.close()
- }
- }
- }
-</script>
-
-<style scoped>
-
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/EquipmentList/UserModal.vue b/src/views/mdc/base/modules/EquipmentList/UserModal.vue
deleted file mode 100644
index 802ba97..0000000
--- a/src/views/mdc/base/modules/EquipmentList/UserModal.vue
+++ /dev/null
@@ -1,570 +0,0 @@
-<template>
- <a-modal
- :title="title"
- :maskClosable="true"
- :width="drawerWidth"
- @cancel="visible=false"
- :visible="visible"
- :footer="null"
- style="height: 100%;overflow: auto;padding-bottom: 53px;">
-
- <template slot="title">
- <div style="width: 100%;">
- <span>{{ title }}</span>
- <span style="display:inline-block;width:calc(100% - 51px);padding-right:10px;text-align: right">
- <a-button @click="toggleScreen" icon="appstore" style="height:20px;width:20px;border:0px"></a-button>
- </span>
- </div>
-
- </template>
-
- <a-spin :spinning="confirmLoading">
- <a-form-model ref="form" :form="form" :model="model" :rules="validatorRules">
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-model-item label="缁熶竴缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId">
- <a-input-search :readOnly="true"
- v-model="model.equipmentId"
- :disabled="disSearch" @search="deviceSearch" enter-button placeholder='璇烽�夋嫨缁熶竴缂栫爜' />
- </a-form-model-item>
- </a-col>
- <a-col :span="12">
- <a-form-model-item label="璁惧鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="disSearch" :readOnly="disableSubmit" allow-clear placeholder="璇疯緭鍏ヨ澶囧悕绉�"
- v-model="model.equipmentName"/>
- </a-form-model-item>
- </a-col>
- </a-row>
-
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-model-item v-if="isDepartType == 0" label="閮ㄩ棬鍒嗛厤" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
- <j-select-equipment-depart :disabled="disableSubmit" v-model="model.selectedDeparts" :multi="false" @back="backDepartInfo" :backDepart="true" :treeOpera="true"></j-select-equipment-depart>
- </a-form-model-item>
-
- <a-form-model-item v-if="isDepartType == -1" label="璁惧绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-select :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="璇烽�夋嫨璁惧绫诲瀷"
- :triggerChange="true"
- v-model="model.equipmentType">
- <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'>
- {{item.equipmentTypeName}}
- </a-select-option>
- </a-select>
- </a-form-model-item>
- </a-col>
- <a-col :span="12">
- <a-form-model-item label="杞﹂棿鍒嗛厤" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!productionDisabled" ref="selectedProduction" prop="selectedProduction">
- <!--<j-select-equipment-production v-decorator="['selectedProduction',{rules:[{required:true,message:'璇烽�夋嫨杞﹂棿!'}]}]" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production>-->
- <j-select-equipment-production :disabled="disableSubmit" v-model="model.selectedProduction" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production>
- </a-form-model-item>
-
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-model-item v-if="isDepartType == -1" label="绯荤粺鐗堟湰鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="璇疯緭鍏ョ郴缁熺増鏈彿"
- v-model="model.systemVersion"/>
- </a-form-model-item>
- <a-form-model-item v-if="isDepartType == 0" label="璁惧绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-select :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="璇烽�夋嫨璁惧绫诲瀷"
- :triggerChange="true"
- v-model="model.equipmentType">
- <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'>
- {{item.equipmentTypeName}}
- </a-select-option>
- </a-select>
- </a-form-model-item>
-
- </a-col>
- <a-col :span="12">
- <a-form-model-item label="璁惧鍔熺巼(kw)" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="璇疯緭鍏ヨ澶囧姛鐜�"
- v-model="model.devicePower"/>
- </a-form-model-item>
- </a-col>
- </a-row>
-
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-model-item label="鏈哄簥IP" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="true" :readOnly="disableSubmit" placeholder="璇疯緭鍏ユ満搴奍P"
- v-model="model.equipmentIp"/>
- </a-form-model-item>
- </a-col>
- <a-col :span="12">
- <a-form-model-item label="鏈哄簥绔彛" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="true" :readOnly="disableSubmit" placeholder="璇疯緭鍏ユ満搴婄鍙�"
- v-model="model.dataPort"/>
- </a-form-model-item>
- </a-col>
- </a-row>
-
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-model-item label="椹卞姩绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <j-dict-select-tag :disabled="true" :readOnly="disableSubmit" placeholder="璇烽�夋嫨椹卞姩绫诲瀷"
- :triggerChange="true" dictCode="mdc_driveType"
- v-model="model.driveType" allow-clear/>
- </a-form-model-item>
- </a-col>
- <a-col :span="12">
- <a-form-model-item label="璁惧鍨嬪彿" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="true" :readOnly="disableSubmit" allow-clear placeholder="璇疯緭鍏ヨ澶囧瀷鍙�"
- v-model="model.equipmentModel"/>
- </a-form-model-item>
- </a-col>
- </a-row>
-
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-model-item label="绯荤粺绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <j-dict-select-tag placeholder="璇烽�夋嫨绯荤粺绫诲瀷" :triggerChange="true" dictCode="system_type" v-model="model.systemType" allow-clear/>
- </a-form-model-item>
- </a-col>
- <a-col :span="12">
- <a-form-model-item label="璁惧绾у埆" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绾у埆" dictCode="device_level" v-model="model.deviceLevel" allow-clear/>
- </a-form-model-item>
- </a-col>
- </a-row>
-
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-model-item label="璁惧绉嶇被" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绉嶇被" dictCode="device_category" v-model="model.deviceCategory" allow-clear/>
- </a-form-model-item>
- </a-col>
- <a-col :span="12">
- <a-form-model-item label="鎺掑簭" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="璇疯緭鍏ユ帓搴�"
- v-model="model.sortNo" style="width: 100%"/>
- </a-form-model-item>
- </a-col>
- </a-row>
-
- <a-row :gutter="24">
- <a-col :span='12'>
- <a-form-model-item v-if="isDepartType == 0" label="绯荤粺鐗堟湰鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="璇疯緭鍏ョ郴缁熺増鏈彿"
- v-model="model.systemVersion"/>
- </a-form-model-item>
- </a-col>
- </a-row>
-
- <a-row :gutter="24">
- <a-col :span="24">
- <a-form-model-item :labelCol="{span:3}" :wrapperCol="{span:21}" label="澶囨敞">
- <a-textarea :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="璇疯緭鍏ュ娉�"
- v-model="model.remark"/>
- </a-form-model-item>
- </a-col>
- </a-row>
- </a-form-model>
- </a-spin>
-
-
- <div class="drawer-bottom-button" v-show="!disableSubmit">
- <a-popconfirm title="纭畾鏀惧純鎿嶄綔锛�" @confirm="close" okText="纭畾" cancelText="鍙栨秷">
- <a-button style="margin-right: .8rem">鍙栨秷</a-button>
- </a-popconfirm>
- <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">鎻愪氦</a-button>
- </div>
- <device-list-model ref="deviceListModel" @sendSelectionRows="getDeviceRows"></device-list-model>
- </a-modal>
-
-</template>
-
-<script>
- import pick from 'lodash.pick'
- import moment from 'moment'
- import Vue from 'vue'
- import { ACCESS_TOKEN } from "@/store/mutation-types"
- import { getAction } from '@/api/manage'
- import { addEquipment,editEquipment} from '@/api/api'
- import { disabledAuthFilter } from "@/utils/authFilter"
- import { duplicateCheck } from '@/api/api'
- import JSelectEquipmentProduction from '../../../../../components/jeecgbiz/JSelectEquipmentProduction'
- import JSelectProduction from '../../../../../components/jeecgbiz/JSelectProduction'
- import DeviceListModel from './DeviceListModal'
- import JSelectEquipmentDepart from '../../../../../components/jeecgbiz/JSelectEquipmentDepart'
- import {mapActions} from 'vuex'
- export default {
- name: "UserModal",
- components: {
- JSelectProduction,
- JSelectEquipmentDepart,
- JSelectEquipmentProduction,
- DeviceListModel
- },
- data () {
- return {
- disSearch:false,
- departDisabled: false, //鏄惁鏄垜鐨勯儴闂ㄨ皟鐢ㄨ椤甸潰
- productionDisabled: false, //鏄惁鏄垜鐨勮溅闂磋皟鐢ㄨ椤甸潰
- roleDisabled: false, //鏄惁鏄鑹茬淮鎶よ皟鐢ㄨ椤甸潰
- modalWidth:800,
- drawerWidth:700,
- modalToggleFlag:true,
- confirmDirty: false,
- userId:"", //淇濆瓨鐢ㄦ埛id
- // disableSubmit:false,
- disableSubmit: true,
- dateFormat:"YYYY-MM-DD",
- form: this.$form.createForm(this),
-
- validatorRules:{
- // equipmentId: [{required: false, message: '璇烽�夋嫨璁惧缂栧彿!'}, {validator: this.validatequipmentId}],
- equipmentId:
- [
- {
- required: true, message: '璇烽�夋嫨璁惧缂栧彿!'
- },
- // {
- // validator: this.validatequipmentId
- // }
- ],
- // trigger: 'blur' // 瑙﹀彂鏂瑰紡
-
- selectedProduction:
- [
- {
- required:true,message: '璇烽�夋嫨杞﹂棿'
- }
- ]
-
- },
- departIdShow:false,
- title:"鎿嶄綔",
- visible: false,
- model: {
- equipmentId: "",
- equipmentName: "",
- equipmentModel: "",
- equipmentIp: "",
- dataPort: "",
- driveType: "",
- systemType: "",
- deviceLevel: "",
- deviceCategory: ""
- },
- labelCol: {
- xs: { span: 24 },
- sm: { span: 8 },
- },
- wrapperCol: {
- xs: { span: 24 },
- sm: { span: 15 },
- },
- uploadLoading:false,
- confirmLoading: false,
- headers:{},
- url: {
- fileUpload: window._CONFIG['domianURL']+"/sys/common/upload",
- userWithDepart: "/mdc/mdcEquipment/equipmentDepartList", // 寮曞叆涓烘寚瀹氱敤鎴锋煡鐪嬮儴闂ㄤ俊鎭渶瑕佺殑url
- //寮曞叆涓烘寚瀹氱敤鎴锋煡鐪嬭溅闂翠俊鎭渶瑕佺殑url
- userProductionList: '/mdc/mdcEquipment/equipmentProductionList',
- userId:"/sys/user/generateUserId", // 寮曞叆鐢熸垚娣诲姞鐢ㄦ埛鎯呭喌涓嬬殑url
- syncUserByUserName:"/act/process/extActProcess/doSyncUserByUserName",//鍚屾鐢ㄦ埛鍒板伐浣滄祦
- queryTenantList: '/sys/tenant/queryList',
- check:'/sys/duplicate/check',
- queryEquipmentType:'/mdc/mdcEquipmentType/queryEquipmentType'
- },
- tenantsOptions: [],
- rolesOptions:[],
- nextDepartOptions:[],
- nextProductionOptions:[],
- selectList:[],
- isDepartType:''
- }
- },
- created () {
- const token = Vue.ls.get(ACCESS_TOKEN);
- this.headers = {"X-Access-Token":token}
- this.queryGroup()
- this.queryTreeData()
- // this.initRoleList()
- // this.initTenantList()
- },
- computed:{
- uploadAction:function () {
- return this.url.fileUpload;
- }
- },
- methods: {
- ...mapActions(['QueryDepartTree']),
- queryTreeData() {
- this.QueryDepartTree().then(res => {
- if (res.success) {
- this.isDepartType = res.result[0].value
- } else {
- // this.$message.warn(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() =>{
- })
- },
- queryGroup() {
- getAction(this.url.queryEquipmentType).then(res => {
- if (res.success) {
- this.selectList = res.result
- // this.selectList = res.result.map((item, index, arr) => {
- // return { label: item.id, value: item.equipmentTypeName + '' }
- // })
- } else {
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- })
- },
- getDeviceRows(val) {
- console.log(val)
- if(val.equipmentid ){
- this.model.equipmentId = val.equipmentid
- this.model.equipmentName = val.equipmentname
- this.model.equipmentModel = val.equipmentmodel
- this.model.equipmentIp = val.equipmentip
- this.model.dataPort = val.dataport
- this.model.driveType = val.drivetype
- this.model.controlSystem = val.controlsystem
- this.model.saveTableName = val.savetablename
- }
-
- },
- deviceSearch() {
- this.$refs.deviceListModel.openPage()
- this.$refs.deviceListModel.title = '閫夋嫨璁惧'
- this.$refs.deviceListModel.disableSubmit = false
- },
- add () {
- this.refresh();
- this.edit({activitiSync:'1',userIdentity:1,equipmentId:"",equipmentName:"",equipmentModel:"",equipmentIp:'',dataPort:"",driveType:"",controlSystem:"",saveTableName:""});
- },
- edit (record) {
- let that = this;
- that.visible = true;
- //鏍规嵁灞忓箷瀹藉害鑷�傚簲鎶藉眽瀹藉害
- this.resetScreenSize();
-
- // that.userId = record.id;
- // console.log(record)
- that.model = Object.assign({}, record);
- // that.model = Object.assign({},{selectedroles:'',selectedProduction:''}, record);
- // this.model = Object.assign({}, record)
-
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(that.model, 'selectedDeparts', 'selectedProduction', 'equipmentId', 'equipmentName', 'equipmentModel', 'equipmentType', 'equipmentIp', 'dataPort',
- 'driveType', 'sortNo', 'remark','systemVersion','devicePower','controlSystem','saveTableName'))
- })
- if(record.hasOwnProperty("id")){
- // that.getUserRoles(record.id);
- that.getUserDeparts(record.id);
- }
- // console.log('that.model=',that.model)
- },
- isDisabledAuth(code){
- return disabledAuthFilter(code);
- },
- //绐楀彛鏈�澶у寲鍒囨崲
- toggleScreen(){
- if(this.modalToggleFlag){
- this.modalWidth = window.innerWidth;
- }else{
- this.modalWidth = 800;
- }
- this.modalToggleFlag = !this.modalToggleFlag;
- },
- // 鏍规嵁灞忓箷鍙樺寲,璁剧疆鎶藉眽灏哄
- resetScreenSize(){
- let screenWidth = document.body.clientWidth;
- if(screenWidth < 500){
- this.drawerWidth = screenWidth;
- }else{
- this.drawerWidth = 700;
- }
- },
- getUserDeparts(userid){
- let that = this;
- //閮ㄩ棬鐨剈rl
- getAction(that.url.userWithDepart,{equipmentId:userid}).then((res)=>{
- if(res.success){
- // console.log(res.result)
- let departOptions=[];
- let selectDepartKeys=[]
- for (let i = 0; i < res.result.length; i++) {
- selectDepartKeys.push(res.result[i].key);
- //鏂板璐熻矗閮ㄩ棬閫夋嫨涓嬫媺妗�
- departOptions.push({
- value: res.result[i].key,
- label: res.result[i].title
- })
- }
-
- that.model.selectedDeparts = selectDepartKeys.join(",")
- // that.model.selectedProduction = selectDepartKeys.join(",")
-
- that.nextDepartOptions=departOptions;
- // console.log('that.nextDepartOptions=',that.nextDepartOptions)
- }
- })
-
- getAction(that.url.userProductionList,{equipmentId:userid}).then((res)=>{
- if(res.success){
- // console.log(res.result)
- let ProductionOptions=[];
- let selectProductKeys=[]
- // console.log(res.result)
- for (let i = 0; i < res.result.length; i++) {
- selectProductKeys.push(res.result[i].key);
- //鏂板璐熻矗閮ㄩ棬閫夋嫨涓嬫媺妗�
- ProductionOptions.push({
- value: res.result[i].key,
- label: res.result[i].title
- })
- }
-
- that.model.selectedProduction = selectProductKeys.join(",")
-
- that.nextProductionOptions=ProductionOptions;
- // console.log('that.nextProductionOptions=',that.nextProductionOptions)
- }
- })
- //杞﹂棿鐨剈rl
- },
- backDepartInfo(info) {
- // console.log(info)
- this.model.departIds = this.model.selectedDeparts;
- this.nextDepartOptions = info.map((item,index,arr)=>{
- let c = {label:item.text, value: item.value+""}
- return c;
- })
- },
- backProductionInfo(info) {
- // console.log(info)
- this.model.productionIds = this.model.selectedProduction;
- this.nextProductionOptions = info.map((item,index,arr)=>{
- let c = {label:item.text, value: item.value+""}
- return c;
- })
- },
-
- refresh () {
- this.userId=""
- this.nextDepartOptions=[];
- this.nextProductionOptions = [];
- this.departIdShow=false;
- },
- close () {
- this.$emit('close');
- this.visible = false;
- this.disableSubmit = false;
- this.nextDepartOptions=[];
- this.nextProductionOptions = []
- this.departIdShow=false;
- // this.$refs.form.resetFields();
- },
- moment,
- handleSubmit () {
- const that = this;
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.$refs.form.validate(valid => {
- if (valid) {
- that.confirmLoading = true;
- //濡傛灉鏄笂绾ф嫨浼犲叆departIds,鍚﹀垯涓虹┖
- // if(this.model.userIdentity!==2){
- // this.model.departIds="";
- // }
- let obj;
- if(!this.model.id){
- this.model.id = this.userId;
- obj=addEquipment(this.model);
- }else{
- obj=editEquipment(this.model,{
- id: this.model.id
- });
- }
- obj.then((res)=>{
- if(res.success){
- that.$notification.success({
- message:'娑堟伅',
- description:res.message
- });
- that.$emit('ok');
- }else{
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- that.confirmLoading = false;
- that.close();
- })
- }else{
- return false;
- }
- })
- },
-
- handleConfirmBlur(e) {
- const value = e.target.value;
- this.confirmDirty = this.confirmDirty || !!value
- },
- identityChange(e){
- if(e.target.value===1){
- this.departIdShow=false;
- }else{
- this.departIdShow=true;
- }
- },
- /**
- * 缂栬緫鎴栨煡鐪嬭鎯呮暟鎹椂娓呴櫎鎶藉眽琛ㄥ崟楠岃瘉
- */
- removeValidate(){
- this.$refs.form.clearValidate()
- }
- },
-
- }
-</script>
-
-<style scoped>
- .avatar-uploader > .ant-upload {
- width:104px;
- height:104px;
- }
- .ant-upload-select-picture-card i {
- font-size: 49px;
- color: #999;
- }
-
- .ant-upload-select-picture-card .ant-upload-text {
- margin-top: 8px;
- color: #666;
- }
-
- .ant-table-tbody .ant-table-row td{
- padding-top:10px;
- padding-bottom:10px;
- }
-
- .drawer-bottom-button {
- position: absolute;
- bottom: -8px;
- width: 100%;
- border-top: 1px solid #e8e8e8;
- padding: 10px 16px;
- text-align: right;
- left: 0;
- background: #fff;
- border-radius: 0 0 2px 2px;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/EquipmentList/UserRecycleBinModal.vue b/src/views/mdc/base/modules/EquipmentList/UserRecycleBinModal.vue
deleted file mode 100644
index 921a3ed..0000000
--- a/src/views/mdc/base/modules/EquipmentList/UserRecycleBinModal.vue
+++ /dev/null
@@ -1,194 +0,0 @@
-<template>
- <a-modal
- :width="1000"
- :title="title"
- :visible="innerVisible"
- @cancel="handleCancel"
- cancelText="鍏抽棴"
- :okButtonProps="{style:{display:'none'}}"
- >
- <a-alert type="info" showIcon style="margin-bottom: 16px;">
- <template slot="message">
- <span>宸查�夋嫨</span>
- <a style="font-weight: 600;padding: 0 4px;">{{ selectedRowKeys.length }}</a>
- <span>椤�</span>
- <template v-if="selectedRowKeys.length>0">
- <a-divider type="vertical"/>
- <a @click="handleClearSelection">娓呯┖閫夋嫨</a>
- <a-divider type="vertical"/>
- <a @click="handleRevertBatch">鎵归噺杩樺師</a>
- <a-divider type="vertical"/>
- <a @click="handleDeleteBatch">鎵归噺鍒犻櫎</a>
- </template>
- </template>
- </a-alert>
-
- <a-table
- ref="table"
- rowKey="id"
- size="middle"
- bordered
- :columns="columns"
- :loading="loading"
- :dataSource="dataSource"
- :pagination="false"
- :rowSelection="{selectedRowKeys, onChange: handleTableSelectChange}"
- >
-
- <!-- 鏄剧ず澶村儚 -->
- <template slot="avatarslot" slot-scope="text, record, index">
- <div class="anty-img-wrap">
- <a-avatar shape="square" :src="url.getAvatar(record.avatar)" icon="user"/>
- </div>
- </template>
-
- <span slot="action" slot-scope="text, record">
- <a @click="handleRevert([record.id])"><a-icon type="redo"/> 杩樺師鐢ㄦ埛</a>
- <a-divider type="vertical"/>
- <a @click="handleDelete([record.id])"><a-icon type="delete"/> 褰诲簳鍒犻櫎</a>
- </span>
- </a-table>
-
- </a-modal>
-</template>
-
-<script>
- import { putAction,deleteAction,getFileAccessHttpUrl } from "@/api/manage"
-
- // 楂樺害灏佽鐨勮姹傦紝璇峰姟蹇呬娇鐢� superRequest.call(this,{}) 鐨勬柟寮忚皟鐢�
- function superRequest(options) {
- this.loading = !!options.loading
- options.promise.then(res => {
- if (res.success && typeof options.success === 'function') {
- options.success(res)
- } else {
- throw new Error(res.message)
- }
- }).catch(e => {
- console.error('鏌ヨ宸插垹闄ょ殑鐢ㄦ埛澶辫触锛�', e)
- this.$message.warning('鏌ヨ宸插垹闄ょ殑鐢ㄦ埛澶辫触锛�' + (e.message || e))
- }).finally(() => {
- this.loading = false
- })
- }
-
- export default {
- name: 'UserRecycleBinModal',
- props: {
- visible: {
- type: Boolean,
- default: false
- },
- },
- data() {
- return {
- title: '鐢ㄦ埛鍥炴敹绔�',
- loading: false,
- innerVisible: false,
- selectedRowKeys: [],
- dataSource: [],
- columns: [
- { title: '#', align: 'center', key: 'rowIndex', width: 80, customRender: (t, r, i) => i + 1 },
- { title: '璐﹀彿', align: 'center', dataIndex: 'username' },
- { title: '濮撳悕', align: 'center', dataIndex: 'realname', },
- { title: '澶村儚', align: 'center', dataIndex: 'avatar', scopedSlots: { customRender: 'avatarslot' } },
- { title: '閮ㄩ棬', align: 'center', dataIndex: 'orgCode' },
- { title: '杞﹂棿', align: 'center', dataIndex: 'productionName' },
- { title: '鎿嶄綔', align: 'center', dataIndex: 'action', width: 200, scopedSlots: { customRender: 'action' } }
- ],
- url: {
- getAvatar: (path) => getFileAccessHttpUrl(`${path}`),
- // 鍥炴敹绔欐搷浣滐紝get = 鑾峰彇鍒楄〃锛沺ut = 鍙栧洖锛沝elete = 褰诲簳鍒犻櫎
- recycleBin: '/sys/user/recycleBin',
- putRecycleBin: '/sys/user/putRecycleBin',
- deleteRecycleBin: '/sys/user/deleteRecycleBin',
- },
- }
- },
- watch: {
- visible: {
- immediate: true,
- handler(val) {
- if (val) {
- this.loadData()
- }
- this.innerVisible = val
- }
- },
- innerVisible(val) {
- this.$emit('update:visible', val)
- },
- },
- methods: {
- loadData() {
- superRequest.call(this, {
- loading: true,
- promise: this.$http.get(this.url.recycleBin),
- success: res => this.dataSource = res.result
- })
- },
- handleOk() {
- this.loadData()
- this.$emit('ok')
- },
- handleCancel() {
- this.innerVisible = false
- },
- // 杩樺師鐢ㄦ埛
- handleRevert(userIds) {
- this.$confirm({
- title: '鎭㈠鐢ㄦ埛',
- content: `鎮ㄧ‘瀹氳鎭㈠杩� ${userIds.length} 涓敤鎴峰悧锛焋,
- centered: true,
- onOk: () => {
- putAction(this.url.putRecycleBin,{userIds:userIds.join(',')}).then((res)=>{
- if(res.success){
- this.handleOk()
- this.handleClearSelection()
- this.$message.success(`杩樺師 ${userIds.length} 涓敤鎴锋垚鍔燂紒`)
- }
- })
- }
- })
- },
- // 褰诲簳鍒犻櫎鐢ㄦ埛
- handleDelete(userIds) {
- this.$confirm({
- title: '褰诲簳鍒犻櫎鐢ㄦ埛',
- content: (<div>
- <p>鎮ㄧ‘瀹氳褰诲簳鍒犻櫎杩� {userIds.length} 涓敤鎴峰悧锛�</p>
- <p style="color:red;">娉ㄦ剰锛氬交搴曞垹闄ゅ悗灏嗘棤娉曟仮澶嶏紝璇疯皑鎱庢搷浣滐紒</p>
- </div>),
- centered: true,
- onOk: () => {
- var that = this;
- deleteAction(that.url.deleteRecycleBin, {userIds: userIds.join(',')}).then((res) => {
- if (res.success) {
- this.loadData()
- this.handleClearSelection()
- this.$message.success(`褰诲簳鍒犻櫎 ${userIds.length} 涓敤鎴锋垚鍔燂紒`)
- } else {
- that.$message.warning(res.message);
- }
- });
- },
- })
- },
- handleRevertBatch() {
- this.handleRevert(this.selectedRowKeys)
- },
- handleDeleteBatch() {
- this.handleDelete(this.selectedRowKeys)
- },
- handleClearSelection() {
- this.handleTableSelectChange([], [])
- },
- handleTableSelectChange(selectedRowKeys, selectionRows) {
- this.selectedRowKeys = selectedRowKeys
- this.selectionRows = selectionRows
- },
- }
- }
-</script>
-
-<style lang="less" scoped></style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/EquipmentTypeList/MdcEquipmentTypeForm.vue b/src/views/mdc/base/modules/EquipmentTypeList/MdcEquipmentTypeForm.vue
deleted file mode 100644
index 15be1d3..0000000
--- a/src/views/mdc/base/modules/EquipmentTypeList/MdcEquipmentTypeForm.vue
+++ /dev/null
@@ -1,126 +0,0 @@
-<template>
- <a-spin :spinning="confirmLoading">
- <j-form-container :disabled="formDisabled">
- <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
- <a-row>
- <a-col :span="24">
- <a-form-model-item label="璁惧绫诲瀷鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentTypeName">
- <a-input v-model="model.equipmentTypeName" placeholder="璇疯緭鍏ヨ澶囩被鍨嬪悕绉�" ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="璁惧绫诲瀷鍥剧墖" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentTypePictures">
- <j-image-upload v-model="model.equipmentTypePictures" ></j-image-upload>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="璁惧绫诲瀷鐘舵��" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentTypeStates">
- <j-switch v-model="model.equipmentTypeStates" ></j-switch>
- </a-form-model-item>
- </a-col>
- </a-row>
- </a-form-model>
- </j-form-container>
- </a-spin>
-</template>
-
-<script>
-
- import { httpAction, getAction } from '@/api/manage'
- import { validateDuplicateValue } from '@/utils/util'
-
- export default {
- name: 'MdcEquipmentTypeForm',
- components: {
- },
- props: {
- //琛ㄥ崟绂佺敤
- disabled: {
- type: Boolean,
- default: false,
- required: false
- }
- },
- data () {
- return {
- model:{
- },
- labelCol: {
- xs: { span: 24 },
- sm: { span: 5 },
- },
- wrapperCol: {
- xs: { span: 24 },
- sm: { span: 16 },
- },
- confirmLoading: false,
- validatorRules: {
- equipmentTypeName: [
- { required: true, message: '璇疯緭鍏ヨ澶囩被鍨嬪悕绉�!'},
- { validator: (rule, value, callback) => validateDuplicateValue('mdc_equipment_type', 'equipment_type_name', value, this.model.id, callback)},
- ],
- },
- url: {
- add: "/mdc/mdcEquipmentType/addEquipmentType",
- edit: "/mdc/mdcEquipmentType/editEquipmentType",
- queryById: "/mdc/mdcEquipmentType/queryById"
- }
- }
- },
- computed: {
- formDisabled(){
- return this.disabled
- },
- },
- created () {
- //澶囦唤model鍘熷鍊�
- this.modelDefault = JSON.parse(JSON.stringify(this.model));
- },
- methods: {
- add () {
- this.edit(this.modelDefault);
- },
- edit (record) {
- this.model = Object.assign({}, record);
- this.visible = true;
- },
- submitForm () {
- const that = this;
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.$refs.form.validate(valid => {
- if (valid) {
- that.confirmLoading = true;
- let httpurl = '';
- let method = '';
- if(!this.model.id){
- httpurl+=this.url.add;
- method = 'post';
- }else{
- httpurl+=this.url.edit;
- method = 'put';
- }
- httpAction(httpurl,this.model,method).then((res)=>{
- if(res.success){
- // that.$message.success(res.message);
- that.$notification.success({
- message:'娑堟伅',
- description:res.message
- });
- that.$emit('ok');
- }else{
- // that.$message.warning(res.message);
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- that.confirmLoading = false;
- })
- }
-
- })
- },
- }
- }
-</script>
\ No newline at end of file
diff --git "a/src/views/mdc/base/modules/EquipmentTypeList/MdcEquipmentTypeModal.Style\043Drawer.vue" "b/src/views/mdc/base/modules/EquipmentTypeList/MdcEquipmentTypeModal.Style\043Drawer.vue"
deleted file mode 100644
index 0fcd0b0..0000000
--- "a/src/views/mdc/base/modules/EquipmentTypeList/MdcEquipmentTypeModal.Style\043Drawer.vue"
+++ /dev/null
@@ -1,84 +0,0 @@
-<template>
- <a-drawer
- :title="title"
- :width="width"
- placement="right"
- :closable="false"
- @close="close"
- destroyOnClose
- :visible="visible">
- <mdc-equipment-type-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></mdc-equipment-type-form>
- <div class="drawer-footer">
- <a-button @click="handleCancel" style="margin-bottom: 0;">鍏抽棴</a-button>
- <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">鎻愪氦</a-button>
- </div>
- </a-drawer>
-</template>
-
-<script>
-
- import MdcEquipmentTypeForm from './MdcEquipmentTypeForm'
-
- export default {
- name: 'MdcEquipmentTypeModal',
- components: {
- MdcEquipmentTypeForm
- },
- data () {
- return {
- title:"鎿嶄綔",
- width:800,
- visible: false,
- disableSubmit: false
- }
- },
- methods: {
- add () {
- this.visible=true
- this.$nextTick(()=>{
- this.$refs.realForm.add();
- })
- },
- edit (record) {
- this.visible=true
- this.$nextTick(()=>{
- this.$refs.realForm.edit(record);
- });
- },
- close () {
- this.$emit('close');
- this.visible = false;
- },
- submitCallback(){
- this.$emit('ok');
- this.visible = false;
- },
- handleOk () {
- this.$refs.realForm.submitForm();
- },
- handleCancel () {
- this.close()
- }
- }
- }
-</script>
-
-<style lang="less" scoped>
-/** Button鎸夐挳闂磋窛 */
- .ant-btn {
- margin-left: 30px;
- margin-bottom: 30px;
- float: right;
- }
- .drawer-footer{
- position: absolute;
- bottom: -8px;
- width: 100%;
- border-top: 1px solid #e8e8e8;
- padding: 10px 16px;
- text-align: right;
- left: 0;
- background: #fff;
- border-radius: 0 0 2px 2px;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/EquipmentTypeList/MdcEquipmentTypeModal.vue b/src/views/mdc/base/modules/EquipmentTypeList/MdcEquipmentTypeModal.vue
deleted file mode 100644
index 588bc6b..0000000
--- a/src/views/mdc/base/modules/EquipmentTypeList/MdcEquipmentTypeModal.vue
+++ /dev/null
@@ -1,60 +0,0 @@
-<template>
- <j-modal
- :title="title"
- :width="width"
- :visible="visible"
- switchFullscreen
- @ok="handleOk"
- :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
- @cancel="handleCancel"
- cancelText="鍏抽棴">
- <mdc-equipment-type-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></mdc-equipment-type-form>
- </j-modal>
-</template>
-
-<script>
-
- import MdcEquipmentTypeForm from './MdcEquipmentTypeForm'
- export default {
- name: 'MdcEquipmentTypeModal',
- components: {
- MdcEquipmentTypeForm
- },
- data () {
- return {
- title:'',
- width:800,
- visible: false,
- disableSubmit: false
- }
- },
- methods: {
- add () {
- this.visible=true
- this.$nextTick(()=>{
- this.$refs.realForm.add();
- })
- },
- edit (record) {
- this.visible=true
- this.$nextTick(()=>{
- this.$refs.realForm.edit(record);
- })
- },
- close () {
- this.$emit('close');
- this.visible = false;
- },
- handleOk () {
- this.$refs.realForm.submitForm();
- },
- submitCallback(){
- this.$emit('ok');
- this.visible = false;
- },
- handleCancel () {
- this.close()
- }
- }
- }
-</script>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/OpenRateFractionAnalysis/OpenRateFractionAnalysisMain.vue b/src/views/mdc/base/modules/OpenRateFractionAnalysis/OpenRateFractionAnalysisMain.vue
deleted file mode 100644
index 6972c4b..0000000
--- a/src/views/mdc/base/modules/OpenRateFractionAnalysis/OpenRateFractionAnalysisMain.vue
+++ /dev/null
@@ -1,513 +0,0 @@
-<template>
- <div class="efficiency_list" style="width: 100%;height: 100%;">
- <div :bordered="false" style="height: 100%">
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="7" :sm="7">
- <a-form-item label="鏃堕棿">
- <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD"
- v-model="dates" :allowClear="false"/>
- </a-form-item>
- </a-col>
- <a-col :md="17" :sm="17" :xs="17">
- <a-form-item label="鏃堕棿娈�">
- <a-space>
- <a-time-picker :default-value="moment('00:00', 'HH:mm')" format="HH:mm" @change="onChangeStart" :allowClear="false"/>
- 鑷�
- <a-time-picker :default-value="moment('08:00', 'HH:mm')" format="HH:mm" @change="onChangeEnd" :allowClear="false"/>
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- </a-space>
- </a-form-item>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <div id="DeviceList">
- <a-spin :spinning="loading">
- <div id="Efficiency" class="container" style="margin-bottom: 15px;">
- <div class="table2">
- <table class="dataContent table" border="1" cellspacing="0" cellpadding="0"
- style="white-space: nowrap;text-align: center;">
- <thead>
- <tr class="thead fixed equipname">
- <th class="thgu dong1 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">
- 璁惧缂栧彿
- </th>
- <th class="thgu dong2 name" rowspan="2" style="min-width: 162px; max-width: 162px;width: 162px;">
- 璁惧鍚嶇О
- </th>
- <th class="thgu dong3 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">
- 璁惧绫诲瀷
- </th>
- <template v-for="(tableHead, index) in tableHeads">
- <th class="timeth">{{tableHead}}</th>
- </template>
- </tr>
- </thead>
- <tbody>
- <tr class="mathData" v-for="(item, index) in dataList" @click="TableDraw(index,item)">
- <td class="tdgu kaitou">{{item.equipmentId}}</td>
- <td class="tdgu1 kaitou">{{item.equipmentName}}</td>
- <td class="tdgu2 kaitou">{{item.equipmentType}}</td>
- <template v-for="(tableHead, index) in item.dataList">
- <td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td>
- </template>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </a-spin>
-
- <div id="openRateTrendChart"></div>
- </div>
- </div>
- </div>
-</template>
-
-<script>
- import moment from 'moment'
- import { putAction, getAction } from '@/api/manage'
- import $ from 'jquery'
- import '@/components/table2excel/table2excel'
- import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
-
- export default {
- // mixins: [JeecgListMixin],
- name: 'openRateFractionAnalysisMain',
- data() {
- return {
- dataSource: [],
- /* table鍔犺浇鐘舵�� */
- loading: false,
- typeTree: '',
- typeParent: 1,
- typeEquipment: 1,
- TreeIDOne: 1,
- TreeIDTwo: 2,
- deviceTypeDict: '',
- dates: [],
- identifying: [],
- queryParam: {},
- queryParams: {},
- queryParamEquip: {},
- queryParamPeople: {},
- efficiencyOptions: [
- { label: '鍒╃敤鐜�', value: 'lyl' },
- { label: '寮�鏈虹巼', value: 'kjl' },
- { label: '寮�鏈烘椂闂�', value: 'kjsj' },
- { label: '鍔犲伐鏃堕棿', value: 'jgsj' },
- { label: '寰呮満鏃堕棿', value: 'djsj' },
- { label: '鍏虫満鏃堕棿', value: 'gjsj' }
- ],
- checkedList: ['lyl'],
- dataList: [],
- url: {
- efficiencyList: '/mdc/efficiencyReport/utilizationRateSectionAnalyze',
- listByType: '/mdc/MdcUtilizationRate/getByType'
- },
- tableHeads: [],
- XData: [0],
- YData: [0],
- isLazyRequest: '',// 鏄惁寮�鍚噿鍔犺浇
- requestAllDataSize: 8,// 鎬诲叡璇锋眰鐨勫垪琛ㄩ」鏁扮洰
- everyRequestDataSize: 15// 姣忔璇锋眰鐨勫垪琛ㄩ」鏁扮洰
- }
- },
- props: { nodeTree: '', Type: '', nodePeople: '' },
- /**
- * 鐢熷懡鍛ㄦ湡 鎸傝浇鍓�
- * */
- created() {
- this.dates = [moment().subtract('days', 8), moment().subtract('days', 1)]
- this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD')
- this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD')
- this.queryParam.startTime = '00:00'
- this.queryParam.endTime = '08:00'
- this.queryParam.typeTree = '1'
- this.loadData1()
-
- },
- mounted() {
- this.tableScroll = document.querySelector('.table2')
- window.addEventListener('resize',this.handleWindowResize)
- },
- beforeDestroy() {
- this.tableScroll.removeEventListener('scroll', this.tableScrollX)
- window.removeEventListener('resize',this.handleWindowResize)
- },
- watch: {
- Type(valmath) {
- this.dataList = []
- this.queryParam.typeTree = valmath
- },
- nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId != null) {
- this.queryParamEquip.parentId = ''
- this.queryParamEquip.equipmentId = val.equipmentId
- } else {
- this.queryParamEquip.parentId = val.key
- this.queryParamEquip.equipmentId = ''
- }
- /*杩欓噷浣犳槸鐩戝惉鍒版爲寰楀彉鍖� 鏄笉鏄姹備竴娆�*/
- this.searchQuery()
- }
- },
- nodePeople(val) {
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId != null) {
- this.queryParamPeople.parentId = val.equipmentId
- this.queryParamPeople.equipmentId = ''
- } else {
- this.queryParamPeople.parentId = val.key
- this.queryParamPeople.equipmentId = ''
- }
- this.searchQuery()
- }
- }
- },
- filters: {
- numFilter(value) {
- if (value) {
- return parseFloat((value * 100).toFixed(2))
- } else {
- return '0'
- }
- }
- },
- methods: {
- moment,
- onChangeStart(time, timeString) {
- this.queryParam.startTime = timeString
- // console.log(time, timeString);
- },
- onChangeEnd(time, timeString) {
- this.queryParam.endTime = timeString
- // console.log(time, timeString);
- },
- numBerTwo(value) {
- if (value) {
- return parseFloat((value * 100).toFixed(2))
- } else {
- return '0'
- }
- },
- TableDraw(key, val) {
- this.XData = [0]
- this.YData[0]
- var Xarr = []
- var Yarr = []
- for (var i = 0; i < val.dataList.length; i++) {
- Xarr.push(val.dataList[i].theDate)
- Yarr.push(this.numBerTwo(val.dataList[i].utilizationRate))
- }
- this.XData = Xarr
- this.YData = Yarr
- // if(this.openRateTrendAnalysisChart !=null && this.openRateTrendAnalysisChart != '' && this.openRateTrendAnalysisChart != undefined){
- // this.openRateTrendAnalysisChart.dispose()
- // }
-
- this.draw()
- },
- //Can not slect days before today and today
- disabledDate(current) {
- return current && current > moment().subtract('days', 1)
- },
- dateParamChange(v1, v2) {
- this.queryParam.startDate = v2[0]
- this.queryParam.endDate = v2[1]
- this.dates = [v1[0], v1[1]]
- },
- searchQuery() {
- // 鍥犺Е搴曞埛鏂颁細淇敼鍙傛暟鏃堕棿鍊硷紝鏁呭湪姝ょ敤鏃堕棿閫夋嫨鍣ㄧ殑鏃堕棿鍊煎鍙傛暟鏃堕棿鍊煎啀娆¤祴鍊硷紝鑻ヤ笉杩欐牱鍋氬垯鍙傛暟鏃堕棿鍊煎垯浼氫笌鏃堕棿閫夋嫨鍣ㄤ笂鐨勬椂闂村�间笉涓�鑷�
- this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD')
- this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD')
-
- if (this.queryParam.typeTree == '1') {
- this.queryParam.parentId = this.queryParamEquip.parentId
- this.queryParam.equipmentId = this.queryParamEquip.equipmentId
- } else {
- this.queryParam.parentId = this.queryParamPeople.parentId
- this.queryParam.equipmentId = ''
- }
- this.requestAllDataSize = moment.duration(moment(this.queryParam.endDate) - moment(this.queryParam.startDate), 'millisecond').asDays() + 1
- this.loadData1()
- },
- loadData1() {
- this.loading = true
- this.tableHeads = []
- this.dataList = []
- // 鑻ユ棩鏈熼�夋嫨鍣ㄨ缃殑鏌ヨ璇锋眰鏁伴噺瓒呰繃15鏉″垯寮�鍚噿鍔犺浇
- if (this.requestAllDataSize > 15) {
- // 寮�鍚噿鍔犺浇鍚庡皢缁撴潫鏃ユ湡璁剧疆涓哄紑濮嬫棩鏈熶箣鍚庣殑14澶╋紝鍗冲厛鏌ヨ15澶╁唴鐨勬暟鎹�
- this.queryParam.endDate = moment(this.queryParam.startDate).add(this.everyRequestDataSize - 1, 'days').format('YYYYMMDD')
- this.isLazyRequest = true
- this.tableScroll.removeEventListener('scroll', this.tableScrollX) // 涓洪伩鍏嶆粴鍔ㄦ潯鏈夋粴鍔ㄨ窛绂诲悗鍚庣偣鍑绘煡璇㈡寜閽Е鍙戞粴鍔ㄤ簨浠讹紝鍥犳鍦ㄨЕ鍙戜簨浠跺墠绉婚櫎浜嬩欢
- }
- getAction(this.url.efficiencyList, this.queryParam).then(res => {
- if (res.success) {
- this.tableHeads = res.result.dates
- this.dataList = res.result.mdcEfficiencyList
- this.draw()
- // this.checkSameData(this.dataList)
- // this.checkSameData1(this.dataList)
- // this.checkSameData2(this.dataList)
- // this.combineCell();
- // this.initDeviceType(this.dataList)
- this.tableScroll.addEventListener('scroll', this.tableScrollX)
- }
- }).finally(() => {
- this.loading = false
- })
- },
- draw() {
- this.openRateTrendAnalysisChart = this.$echarts.init(document.getElementById('openRateTrendChart'), 'macarons')
- let openRateTrendChartOptions = {
- title: {
- text: '鍒╃敤鐜囧垎娈靛垎鏋�',
- x: 'center',
- textStyle: {
- fontSize: 18,
- fontWeight: 'bolder',
- color: '#151414'
- }
- },
- tooltip: {
- trigger: 'axis'
- },
- toolbox: {
- show: true,
- feature: {
- mark: { show: true },
- dataView: { show: true, readOnly: false },
- magicType: { show: true, type: ['line', 'bar'] },
- restore: { show: true },
- saveAsImage: { show: true }
- }
- },
- calculable: true,
- xAxis: [
- {
- type: 'category',
- data: this.XData
- }
- ],
- yAxis: [
- {
- type: 'value'
- }
- ],
- series: [
- {
- name: '鍒╃敤鐜�',
- type: 'line',
- data: this.YData,
- markPoint: {
- data: [
- { type: 'max', name: '鏈�澶у��', symbolSize: 70 },
- { type: 'min', name: '鏈�灏忓��', symbolSize: 70 }
- ]
- },
- markLine: {
- data: [
- { type: 'average', name: '骞冲潎鍊�' }
- ]
- }
- }
- ]
- }
- this.openRateTrendAnalysisChart.setOption(openRateTrendChartOptions, true)
- },
-
- /**
- * 婊氬姩鏉¤Е搴曞埛鏂拌〃鏍兼暟鎹�
- */
- tableScrollX() {
- // 褰撴粴鍔ㄦ潯瑙﹀簳涓旀噿鍔犺浇寮�鍚椂瑙﹀彂婊氬姩鏉¤Е搴曞埛鏂�
- if (Math.ceil(this.tableScroll.scrollLeft + this.tableScroll.clientWidth) + 1 >= this.tableScroll.scrollWidth && this.isLazyRequest) {
- this.loading = true
- this.queryParam.startDate = moment(this.queryParam.endDate).add(1, 'days').format('YYYYMMDD')
- // 鍒ゆ柇璁剧疆鎳掑姞杞藉悗鐨勭粨鏉熸椂闂存槸鍚﹁秴杩囨椂闂撮�夋嫨鍣ㄤ腑璁剧疆鐨勭粨鏉熸椂闂�
- if (moment(this.queryParam.endDate).add(this.everyRequestDataSize - 1, 'days').format('YYYYMMDD') - moment(this.dates[1]).format('YYYYMMDD') < 0) {
- //鍐嶆鏌ヨ鍚�15澶╁唴鐨勬暟鎹�
- this.queryParam.endDate = moment(this.queryParam.endDate).add(this.everyRequestDataSize, 'days').format('YYYYMMDD')
- } else {
- // 濡傛灉涓嶅皬浜庢椂闂撮�夋嫨鍣ㄤ腑璁剧疆鐨勬椂闂村垯璁剧疆璇锋眰缁撴潫鏃ユ湡涓烘椂闂撮�夋嫨鍣ㄤ腑璁剧疆鐨勭粨鏉熸椂闂村苟涓斿叧闂噿鍔犺浇锛堟剰鍛崇潃鏈�鍚庝竴娆¤Е搴曞埛鏂帮級
- this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD')
- this.isLazyRequest = false
- }
- getAction(this.url.efficiencyList, this.queryParam).then(res => {
- if (res.success) {
- this.tableHeads = [...this.tableHeads, ...res.result.dates]
- this.dataList.forEach(item1 => {
- res.result.mdcEfficiencyList.forEach(item2 => {
- if (item1.equipmentId === item2.equipmentId) {
- item1.dataList = [...item1.dataList, ...item2.dataList]
- }
- })
- })
- this.draw()
- }
- }).finally(() => {
- this.loading = false
- })
- }
- },
-
- /**
- * 褰撴祻瑙堝櫒鍙绐楀彛灏哄鍙戠敓鏀瑰彉鏃惰Е鍙�
- */
- handleWindowResize(){
- if(this.openRateTrendAnalysisChart) this.openRateTrendAnalysisChart.resize()
- }
- }
- }
-</script>
-<style scoped>
- .dataContent {
- white-space: nowrap;
- /*margin: 0;*/
- /*border: none;*/
- border-collapse: separate;
- border-spacing: 0;
- /*table-layout: fixed;*/
- border: 1px solid #ccc;
- /*border: 1px solid #ccc;*/
- width: 100%;
- /*height: 100%;*/
- /*overflow: hidden;*/
- /*overflow-y: auto;*/
- text-align: center;
- }
-
- .dataContent .thead th {
- background-color: #fafafa;
- text-align: center;
- height: 30px;
- padding: 5px;
- }
-
- .dataContent tr td {
- height: 35px;
- }
-
- .dataContent .mathData td {
- padding: 10px;
- cursor: pointer;
- }
-
- .dataContent .mathData:hover td {
- background-color: #e6f7ff;
- }
-
- .table2 {
- width: 100%;
- height: 100%;
- overflow: auto;
- }
-
- .table2 thead tr th:first-child,
- .table tbody tr .tdgu {
- position: sticky;
- left: 0;
- z-index: 1;
- }
-
- .table tbody tr .kaitou {
- z-index: 1;
- background-color: white;
- }
-
- .table tbody tr .tdgu1 {
- position: sticky;
- left: 150px;
- z-index: 2;
- }
-
- .table tbody tr .tdgu2 {
- position: sticky;
- left: 312px;
- z-index: 2;
- }
-
- .table2 thead tr .timeth,
- .table2 thead tr .thgu {
- position: sticky;
- top: 0;
- z-index: 3;
- }
-
- .table2 thead .gudingth th {
- position: sticky;
- top: 32px;
- z-index: 6 !important;
- }
-
- .table2 thead .equipname .name {
- z-index: 3;
- }
-
- .table2 thead .equipname .dong1 {
- z-index: 4;
- left: 0;
- }
-
- .table2 thead .equipname .dong2 {
- z-index: 5;
- left: 150px;
- }
-
- .table2 thead .equipname .dong3 {
- z-index: 5;
- left: 312px;
- }
-
- .efficiency_list #DeviceList {
- height: 90% !important;
- }
-
- #Efficiency{
- overflow: hidden;
- }
-
- #openRateTrendChart{
- width: 100%;
- height: 60%
- }
-
- @media screen and (min-width: 1920px) {
- #Efficiency {
- height: 337px !important;
- }
- }
-
- @media screen and (min-width: 1680px) and (max-width: 1920px) {
- #Efficiency {
- height: 337px !important;
- }
- }
-
- @media screen and (min-width: 1400px) and (max-width: 1680px) {
- #Efficiency {
- height: 337px !important;
- }
- }
-
- @media screen and (min-width: 1280px) and (max-width: 1400px) {
- #Efficiency {
- height: 200px !important;
- }
- }
-
- @media screen and (max-width: 1280px) {
- #Efficiency {
- height: 200px !important;
- }
- }
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/OpenRateTrendAnalysis/OpenRateTrendAnalysisMain.vue b/src/views/mdc/base/modules/OpenRateTrendAnalysis/OpenRateTrendAnalysisMain.vue
deleted file mode 100644
index 8b4bcfd..0000000
--- a/src/views/mdc/base/modules/OpenRateTrendAnalysis/OpenRateTrendAnalysisMain.vue
+++ /dev/null
@@ -1,593 +0,0 @@
-<template>
- <div class="efficiency_list" style="width: 100%;height: 100%;">
- <div :bordered="false" style="height: 100%">
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="7" :sm="7">
- <a-form-item label="鏃堕棿">
- <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD"
- v-model="dates" :allowClear="false"/>
- </a-form-item>
- </a-col>
- <a-col :lg="2" :md="3" :sm="3" :xs="3">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- </a-col>
- </a-row>
- </a-form>
- </div>
-
- <!--琛ㄦ牸鍙婂浘琛ㄥ尯鍩�-->
- <div id="DeviceList">
- <!--琛ㄦ牸鍖哄煙-->
- <a-spin :spinning="loading">
- <div id="Efficiency" class="container" style="margin-bottom: 15px;">
- <div class="table2">
- <table class="dataContent table" border="1" cellspacing="0" cellpadding="0"
- style="white-space: nowrap;text-align: center;">
- <thead>
- <tr class="thead fixed equipname">
- <th class="thgu dong1 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">
- 璁惧缂栧彿
- </th>
- <th class="thgu dong2 name" rowspan="2" style="min-width: 162px; max-width: 162px;width: 162px;">
- 璁惧鍚嶇О
- </th>
- <th class="thgu dong3 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">
- 璁惧绫诲瀷
- </th>
- <template v-for="(tableHead, index) in tableHeads">
- <th class="timeth" :colspan="checkedList.length">{{tableHead}}</th>
- </template>
- </tr>
- </thead>
- <tbody>
- <tr class="mathData" v-for="(item, index) in dataList" @click="TableDraw(index,item)">
- <td class="tdgu kaitou">{{item.equipmentId}}</td>
- <td class="tdgu1 kaitou">{{item.equipmentName}}</td>
- <td class="tdgu2 kaitou">{{item.equipmentType}}</td>
- <template v-for="(tableHead, index) in item.dataList">
- <td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td>
- </template>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </a-spin>
- <!--鍥炬爣鍖哄煙-->
- <div id="openRateTrendChart"></div>
- </div>
- </div>
- </div>
-</template>
-
-<script>
- import moment from 'moment'
- import { putAction, getAction } from '@/api/manage'
- import $ from 'jquery'
- import '@/components/table2excel/table2excel'
- import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
-
- export default {
- // mixins: [JeecgListMixin],
- name: 'openRateTrendAnalysisMain',
- components: {},
- data() {
- return {
- dataSource: [],
- /* table鍔犺浇鐘舵�� */
- loading: false,
- typeTree: '',
- typeParent: 1,
- typeEquipment: 1,
- TreeIDOne: 1,
- TreeIDTwo: 2,
- deviceTypeDict: '',
- dates: [],
- identifying: [],
- queryParam: {},
- queryParams: {},
- queryParamEquip: {},
- queryParamPeople: {},
- efficiencyOptions: [
- { label: '鍒╃敤鐜�', value: 'lyl' },
- { label: '寮�鏈虹巼', value: 'kjl' },
- { label: '寮�鏈烘椂闂�', value: 'kjsj' },
- { label: '鍔犲伐鏃堕棿', value: 'jgsj' },
- { label: '寰呮満鏃堕棿', value: 'djsj' },
- { label: '鍏虫満鏃堕棿', value: 'gjsj' }
- ],
- checkedList: ['lyl'],
- dataList: [],
- url: {
- efficiencyList: '/mdc/efficiencyReport/utilizationRateTrendAnalyze',
- listByType: '/mdc/MdcUtilizationRate/getByType'
- },
- tableHeads: [],
- XData: [0],
- YData: [0],
- isLazyRequest: '',// 鏄惁寮�鍚噿鍔犺浇
- requestAlldataSize: 8,// 鎬诲叡璇锋眰鐨勫垪琛ㄩ」鏁扮洰
- everyRequestDataSize: 15// 姣忔璇锋眰鐨勫垪琛ㄩ」鏁扮洰
- }
- },
- props: { nodeTree: '', Type: '', nodePeople: '' },
- /**
- * 鐢熷懡鍛ㄦ湡 鎸傝浇鍓�
- * */
- created() {
- this.dates = [moment().subtract('days', 8), moment().subtract('days', 1)]
- this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD')
- this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD')
- this.queryParam.typeTree = '1'
- this.loadData1()
- },
- mounted() {
- this.tableScroll = document.querySelector('.table2')
- window.addEventListener('resize',this.handleWindowResize)
- },
- beforeDestroy() {
- this.tableScroll.removeEventListener('scroll', this.tableScrollX)
- window.removeEventListener('resize',this.handleWindowResize)
- },
- watch: {
- Type(valmath) {
- this.dataList = []
- this.queryParam.typeTree = valmath
- },
- nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId != null) {
- this.queryParamEquip.parentId = ''
- this.queryParamEquip.equipmentId = val.equipmentId
- } else {
- this.queryParamEquip.parentId = val.key
- this.queryParamEquip.equipmentId = ''
- }
- /*杩欓噷浣犳槸鐩戝惉鍒版爲寰楀彉鍖� 鏄笉鏄姹備竴娆�*/
- this.searchQuery()
- }
- },
- nodePeople(val) {
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId != null) {
- this.queryParamPeople.parentId = val.equipmentId
- this.queryParamPeople.equipmentId = ''
- } else {
- this.queryParamPeople.parentId = val.key
- this.queryParamPeople.equipmentId = ''
- }
- this.searchQuery()
- }
- }
- },
- filters: {
- numFilter(value) {
- if (value) {
- return parseFloat((value * 100).toFixed(2))
- } else {
- return '0'
- }
- }
- },
- methods: {
- numBerTwo(value) {
- if (value) {
- return parseFloat((value * 100).toFixed(2))
- } else {
- return '0'
- }
- },
- TableDraw(key, val) {
- this.XData = [0]
- this.YData[0]
- var Xarr = []
- var Yarr = []
- for (var i = 0; i < val.dataList.length; i++) {
- Xarr.push(val.dataList[i].theDate)
- Yarr.push(this.numBerTwo(val.dataList[i].utilizationRate))
- }
- this.XData = Xarr
- this.YData = Yarr
- // if(this.openRateTrendAnalysisChart !=null && this.openRateTrendAnalysisChart != '' && this.openRateTrendAnalysisChart != undefined){
- // this.openRateTrendAnalysisChart.dispose()
- // }
-
- this.draw()
- },
- disabledDate(current) {
- //Can not slect days before today and today
- return current && current > moment().subtract('days', 1)
- },
- initDeviceType(deviceList) {
- let dictCode = 'mdc_equipmentType'
- let items = []
- items = getDictItemsFromCache(dictCode)
- if (deviceList && items.length > 0) {
- for (let a = 0; a < deviceList.length; a++) {
- if (items && items.length > 0) {
- for (let i = 0; i < items.length; i++) {
- if (deviceList[a].equipmentType == items[i].value) {
- deviceList[a].equipmentType = items[i].title
- }
- }
- } else {
- ajaxGetDictItems(dictCode, null).then((res) => {
- if (res.success) {
- let items = res.result
- for (let i = 0; i < items.length; i++) {
- if (deviceList[a].equipmentType == items[i].value) {
- deviceList[a].equipmentType = items[i].title
- }
- }
- }
- })
- }
- }
- }
- },
- dateParamChange(v1, v2) {
- this.queryParam.startDate = v2[0]
- this.queryParam.endDate = v2[1]
- this.dates = [v1[0], v1[1]]
- },
- searchQuery() {
- // 鍥犺Е搴曞埛鏂颁細淇敼鍙傛暟鏃堕棿鍊硷紝鏁呭湪姝ょ敤鏃堕棿閫夋嫨鍣ㄧ殑鏃堕棿鍊煎鍙傛暟鏃堕棿鍊煎啀娆¤祴鍊硷紝鑻ヤ笉杩欐牱鍋氬垯鍙傛暟鏃堕棿鍊煎垯浼氫笌鏃堕棿閫夋嫨鍣ㄤ笂鐨勬椂闂村�间笉涓�鑷�
- this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD')
- this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD')
-
- if (this.queryParam.typeTree == '1') {
- this.queryParam.parentId = this.queryParamEquip.parentId
- this.queryParam.equipmentId = this.queryParamEquip.equipmentId
- } else {
- this.queryParam.parentId = this.queryParamPeople.parentId
- this.queryParam.equipmentId = ''
- }
- this.requestAlldataSize = moment.duration(moment(this.queryParam.endDate) - moment(this.queryParam.startDate), 'millisecond').asDays() + 1
- this.loadData1()
- },
- // searchReset() {
- // this.typeTree = this.queryParam.typeTree
- // this.typeParent = this.queryParam.parentId
- // this.typeEquipment = this.queryParam.equipmentId
- // this.queryParam = {}
- // this.dates = []
- // this.queryParam.typeTree = this.typeTree
- // this.queryParam.parentId = this.typeParent
- // this.queryParam.equipmentId = this.typeEquipment
- // // this.ipagination.current = 1
- // this.loadData1();
- // // this.queryParam = {}
- // // this.dates = []
- // // this.loadData()
- // // this.onClearSelected()
- // },
- // loadData1() {
- // let that = this
- // that.columns=[
- // {
- // title: '璁惧缂栧彿',
- // align: 'center',
- // dataIndex: 'equipmentId',
- // width:'150px'
- // },
- // {
- // title: '璁惧鍚嶇О',
- // align: 'center',
- // dataIndex: 'equipmentName',
- // width:'150px'
- // },
- // ]
- // that.tableHeads = []
- // that.dataList = []
- // getAction(this.url.efficiencyList, that.queryParam).then(res => {
- // var tmp = {}
- // console.log(res)
- // if (res.success)
- //
- // that.dataSource = res.result.mdcEfficiencyList
- // for(var k = 0;k<that.dataSource[0].dataList.length;k++){
- // that.columns.push(
- // {
- // title:that.dataSource[0].dataList.theDate,
- // align: 'center',
- // width:'120px',
- // // dataIndex:'utilizationRate',
- // }
- // )
- // }
- // for(var i = 0;i<that.dataSource.length;i++){
- // for (var j = 0; j < that.dataSource[i].dataList.length;j++){
- // // that.columns.push(
- // // {
- // // title:that.dataSource[0].dataList[j].theDate,
- // // align: 'center',
- // // width:'120px',
- // // dataIndex:'utilizationRate',
- // // }
- // // )
- // }
- //
- // }
- // console.log(that.columns)
- // console.log(that.dataSource)
- // // this.initDeviceType(this.dataList)
- // this.draw()
- // }
- // }
- loadData1() {
- this.loading = true
- this.tableHeads = []
- this.dataList = []
- // 鑻ユ棩鏈熼�夋嫨鍣ㄨ缃殑鏌ヨ璇锋眰鏁伴噺瓒呰繃15鏉″垯寮�鍚噿鍔犺浇
- if (this.requestAlldataSize > 15) {
- // 寮�鍚噿鍔犺浇鍚庡皢缁撴潫鏃ユ湡璁剧疆涓哄紑濮嬫棩鏈熶箣鍚庣殑14澶╋紝鍗冲厛鏌ヨ15澶╁唴鐨勬暟鎹�
- this.queryParam.endDate = moment(this.queryParam.startDate).add(this.everyRequestDataSize - 1, 'days').format('YYYYMMDD')
- this.isLazyRequest = true
- this.tableScroll.removeEventListener('scroll', this.tableScrollX) // 涓洪伩鍏嶆粴鍔ㄦ潯鏈夋粴鍔ㄨ窛绂诲悗鍚庣偣鍑绘煡璇㈡寜閽Е鍙戞粴鍔ㄤ簨浠讹紝鍥犳鍦ㄨЕ鍙戜簨浠跺墠绉婚櫎浜嬩欢
- }
- getAction(this.url.efficiencyList, this.queryParam).then(res => {
- if (res.success) {
- this.tableHeads = res.result.dates
- this.dataList = res.result.mdcEfficiencyList
- this.draw()
- // this.checkSameData(this.dataList)
- // this.checkSameData1(this.dataList)
- // this.checkSameData2(this.dataList)
- // this.combineCell();
- // this.initDeviceType(this.dataList)
- this.tableScroll.addEventListener('scroll', this.tableScrollX)
- }
- }).finally(() => {
- this.loading = false
- })
- },
- draw() {
- this.openRateTrendAnalysisChart = this.$echarts.init(document.getElementById('openRateTrendChart'), 'macarons')
- let openRateTrendChartOptions = {
- title: {
- text: '鍒╃敤鐜囪蛋鍔垮垎鏋�',
- x: 'center',
- textStyle: {
- fontSize: 18,
- fontWeight: 'bolder',
- color: '#151414'
- }
- },
- tooltip: {
- trigger: 'axis'
- },
- toolbox: {
- show: true,
- feature: {
- mark: { show: true },
- dataView: { show: true, readOnly: false },
- magicType: { show: true, type: ['line', 'bar'] },
- restore: { show: true },
- saveAsImage: { show: true }
- }
- },
- calculable: true,
- xAxis: [
- {
- type: 'category',
- data: this.XData
- }
- ],
- yAxis: [
- {
- type: 'value'
- }
- ],
- series: [
- {
- name: '鍒╃敤鐜�',
- type: 'line',
- data: this.YData,
- markPoint: {
- data: [
- { type: 'max', name: '鏈�澶у��', symbolSize: 70 },
- { type: 'min', name: '鏈�灏忓��', symbolSize: 70 }
- ]
- },
- markLine: {
- data: [
- { type: 'average', name: '骞冲潎鍊�' }
- ]
- }
- }
- ]
- }
- this.openRateTrendAnalysisChart.setOption(openRateTrendChartOptions, true)
- },
-
- /**
- * 婊氬姩鏉¤Е搴曞埛鏂拌〃鏍兼暟鎹�
- */
- tableScrollX() {
- // 褰撴粴鍔ㄦ潯瑙﹀簳涓旀噿鍔犺浇寮�鍚椂瑙﹀彂婊氬姩鏉¤Е搴曞埛鏂�
- if (Math.ceil(this.tableScroll.scrollLeft + this.tableScroll.clientWidth) + 1 >= this.tableScroll.scrollWidth && this.isLazyRequest) {
- this.loading = true
- this.queryParam.startDate = moment(this.queryParam.endDate).add(1, 'days').format('YYYYMMDD')
- // 鍒ゆ柇璁剧疆鎳掑姞杞藉悗鐨勭粨鏉熸椂闂存槸鍚﹁秴杩囨椂闂撮�夋嫨鍣ㄤ腑璁剧疆鐨勭粨鏉熸椂闂�
- if (moment(this.queryParam.endDate).add(this.everyRequestDataSize - 1, 'days').format('YYYYMMDD') - moment(this.dates[1]).format('YYYYMMDD') < 0) {
- //鍐嶆鏌ヨ鍚�15澶╁唴鐨勬暟鎹�
- this.queryParam.endDate = moment(this.queryParam.endDate).add(this.everyRequestDataSize, 'days').format('YYYYMMDD')
- } else {
- // 濡傛灉涓嶅皬浜庢椂闂撮�夋嫨鍣ㄤ腑璁剧疆鐨勬椂闂村垯璁剧疆璇锋眰缁撴潫鏃ユ湡涓烘椂闂撮�夋嫨鍣ㄤ腑璁剧疆鐨勭粨鏉熸椂闂村苟涓斿叧闂噿鍔犺浇锛堟剰鍛崇潃鏈�鍚庝竴娆¤Е搴曞埛鏂帮級
- this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD')
- this.isLazyRequest = false
- }
- getAction(this.url.efficiencyList, this.queryParam).then(res => {
- if (res.success) {
- this.tableHeads = [...this.tableHeads, ...res.result.dates]
- this.dataList.forEach(item1 => {
- res.result.mdcEfficiencyList.forEach(item2 => {
- if (item1.equipmentId === item2.equipmentId) {
- item1.dataList = [...item1.dataList, ...item2.dataList]
- }
- })
- })
- this.draw()
- }
- }).finally(() => {
- this.loading = false
- })
- }
- },
-
- /**
- * 褰撴祻瑙堝櫒鍙绐楀彛灏哄鍙戠敓鏀瑰彉鏃惰Е鍙�
- */
- handleWindowResize(){
- if(this.openRateTrendAnalysisChart) this.openRateTrendAnalysisChart.resize()
- }
- }
- }
-</script>
-<style scoped>
- .dataContent {
- white-space: nowrap;
- /*margin: 0;*/
- /*border: none;*/
- border-collapse: separate;
- border-spacing: 0;
- /*table-layout: fixed;*/
- border: 1px solid #ccc;
- /*border: 1px solid #ccc;*/
- width: 100%;
- text-align: center;
- }
-
- .dataContent .thead th {
- background-color: #fafafa;
- text-align: center;
- height: 30px;
- padding: 5px;
- }
-
- .dataContent tr td {
- height: 35px;
- }
-
- .dataContent .mathData td {
- padding: 10px;
- cursor: pointer;
- }
-
- .dataContent .mathData:hover td {
- background-color: #e6f7ff;
- }
-
- .table2 {
- width: 100%;
- height: 100%;
- overflow: auto;
- }
-
- .table2 thead tr th:first-child,
- .table tbody tr .tdgu {
- position: sticky;
- left: 0;
- z-index: 1;
- }
-
- .table tbody tr .kaitou {
- z-index: 1;
- background-color: white;
- }
-
- .table tbody tr .tdgu1 {
- position: sticky;
- left: 150px;
- z-index: 2;
- }
-
- .table tbody tr .tdgu2 {
- position: sticky;
- left: 312px;
- z-index: 2;
- }
-
- .table2 thead tr .timeth,
- .table2 thead tr .thgu {
- position: sticky;
- top: 0;
- z-index: 3;
- }
-
- .table2 thead .gudingth th {
- position: sticky;
- top: 32px;
- z-index: 6 !important;
- }
-
- .table2 thead .equipname .name {
- z-index: 3;
- }
-
- .table2 thead .equipname .dong1 {
- z-index: 4;
- left: 0;
- }
-
- .table2 thead .equipname .dong2 {
- z-index: 5;
- left: 150px;
- }
-
- .table2 thead .equipname .dong3 {
- z-index: 5;
- left: 312px;
- }
-
- .efficiency_list #DeviceList {
- height: 90% !important;
- }
-
- #Efficiency{
- overflow: hidden;
- }
-
- #openRateTrendChart{
- width: 100%;
- height: 60%;
- }
-
- @media screen and (min-width: 1920px) {
- #Efficiency {
- height: 337px !important;
- }
- }
-
- @media screen and (min-width: 1680px) and (max-width: 1920px) {
- #Efficiency {
- height: 337px !important;
- }
- }
-
- @media screen and (min-width: 1400px) and (max-width: 1680px) {
- #Efficiency {
- height: 337px !important;
- }
- }
-
- @media screen and (min-width: 1280px) and (max-width: 1400px) {
- #Efficiency {
- height: 200px !important;
- }
- }
-
- @media screen and (max-width: 1280px) {
- #Efficiency {
- height: 200px !important;
- }
- }
-
-
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue b/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue
deleted file mode 100644
index 6185aa3..0000000
--- a/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue
+++ /dev/null
@@ -1,671 +0,0 @@
-<template>
- <div id="StatisticsLegend" style="width: 100%; height: 100%; overflow: hidden;display: flex;flex-direction: column;background-color: #f5f4f4">
- <!-- 鏌ヨ鍖哄煙 -->
- <div style="width: 100%; height: 44px; background-color: #fff" class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="5" :sm="5" :xs="5">
- <a-form-item label="鍚嶇О">
- <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" :readOnly="readOnly" v-model="queryParam.tierName"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="4" :sm="4" :xs="4">
- <a-form-item label="鏃ユ湡">
- <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" format='YYYY-MM-DD' @change="dataChange" :allowClear="false"/>
- </a-form-item>
- </a-col>
- <a-col :md="2" :sm="2" :xs="2">
- <a-space>
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
- </a-space>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <!--寮�鏈虹巼-->
- <div class="PowerOnRate Line-box">
- <!--<div class="title">-->
- <!--<div class="circle"></div>-->
- <!--<div class="text">鍒╃敤鐜�</div>-->
- <!--</div>-->
- <div class="PowerOnRate-box box-bottom">
- <!--<div class="PowerOnRate-left" ref="PowerOnRatePie" id="PowerOnRatePie"></div>-->
- <div class="PowerOnRate_text" style="width: 8%;">
- <p>寮�鏈虹巼</p>
- <p>{{UtilizationHeight}}%</p>
- <p>鍒╃敤鐜�</p>
- <p>{{StatCharUsedRate}}%</p>
- </div>
- <div class="PowerOnRate-right" ref="PowerOnRateLine" id="PowerOnRateLine"></div>
- <div class="PowerOnRate_text" style="width: 8%">
- <table width="85px;" align="center">
- <tr>
- <td align="right"><div style="width: 15px;height: 15px;background-color: #6496e9;position: static;"/></td>
- <td align="left">寮�鏈�</td>
- </tr>
- <tr>
- <td align="right"><div style="width: 15px;height: 15px;background-color: #A8A8A8;position: static;"/></td>
- <td align="left">鍏虫満</td>
- </tr>
- <tr>
- <td align="right"><div style="width: 15px;height: 15px;background-color: #4ecee1"/></td>
- <td align="left">杩愯</td>
- </tr>
- <tr>
- <td align="right"><div style="width: 15px;height: 15px;background-color: #FCCE10"/></td>
- <td align="left">寰呮満</td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- <!--鍒╃敤鐜囧拰寮�鍔ㄧ巼-->
- <div class="UtilizationStartup">
- <div class="Utilization Line-box">
- <div class="title">
- <!--<div class="circle"></div>-->
- <!--<div class="text"></div>-->
- </div>
- <div class="Utilization-box box-bottom">
- <div class="Utilization-right" ref="UtilizationLine" id="UtilizationLine"></div>
- </div>
- </div>
- <div class="Startup Line-box">
- <div class="title">
- <!--<div class="circle"></div>-->
- <!--<div class="text"></div>-->
- </div>
- <div class="Startup-box box-bottom">
- <div class="Startup-right" ref="StartupLine" id="StartupLine"></div>
- </div>
- </div>
- </div>
- </div>
-</template>
-
-<script>
- import moment from 'moment'
- import { putAction, getAction } from '@/api/manage'
- import $ from 'jquery'
- import * as echarts from 'echarts'
- export default {
- name: 'StatisticalAnalysisMain',
- props: { equip: {} },
- data(){
- return{
- readOnly:true,
- showday:true,
- StatCharOpeningRate:0,
- StatCharUsedRate:0,
- StatCharUsedopeningRate:0,
- openingLong:0,
- waitingLong:0,
- processLong:0,
- closedLong:0,
- totalLong:0,
- UtilizationHeight:0,
- StartupHeight:0,
- quip:{},
- dates: [],
- queryParam: {},
- queryParams:{
- collectTime:null,
- },
- shiftSubList: [],
- shiftList: [],
- url: {
- getEquipmentByPid: '/mdc/mdcequipment/getEquipmentByPid',
- dayStatisticalRate:'/mdc/efficiencyReport/dayStatisticalRate',
- getBaseTree: '/mdc/mdcEquipment/queryTreeListByProduction',
- },
- }
- },
- created(){
- // let collectTime = moment(moment().add(-1,'d'),'YYYY-MM-DD');
- this.queryParams.collectTime = moment().add(-1,'d').format('YYYY-MM-DD')
- this.queryParams.dateTime = moment().add(-1,'d').format('YYYYMMDD')
- this.initEquipmentNode()
- // this.queryStatistical();
- // this.getTime(37800);
- },
-
- methods:{
- disabledDate(current){
- //Can not slect days before today and today
- return current && current > moment().subtract('days', 1);
- },
- //鎶婄璁$畻鎴愬搴旂殑鏃跺垎绉掔殑鍑芥暟
- getTime(time){
- //杞崲涓烘椂鍒嗙
- let h = Math.round(time / 60 / 60)
- h = h <10 ? '0' + h : h
- //浣滀负杩斿洖鍊艰繑鍥�
- // console.log(h);
- return h;
- },
- moment,
- draw(){
- //寮�濮嬫椂闂碶鍏虫満鏃堕棿\杩愯鏃堕棿\寰呮満鏃堕棿
- let PowerOnRateLine = this.$echarts.init(document.getElementById('PowerOnRateLine'), 'macarons');
- let PowerOnRateLine_option = {
- tooltip:{
- trigger: 'axis',
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- top: 60,
- containLabel: true
- },
- // toolbox: {
- // show : true,
- // padding: 15,
- // feature : {
- // saveAsImage : {show: true,title:'淇濆瓨鍥剧墖',name :'璁惧鏁堢巼缁熻鎶ヨ〃'}
- // }
- // },
- xAxis :{
- type : 'category',
- data:['寮�鏈烘椂闀�','鍏虫満鏃堕暱','杩愯鏃堕暱','寰呮満鏃堕暱'],
- axisLabel:{ //鍧愭爣杞村瓧浣撻鑹�
- textStyle:{
- color: '#000'
- }
- },
- axisLine:{
- lineStyle:{
- color:"#e5e5e5"
- }
- },
- axisTick:{ //y杞村埢搴︾嚎
- show:false
- },
- splitLine:{ //缃戞牸
- show: false,
- },
- boundaryGap: true,
- },
- yAxis :{
- name: '鏃堕棿/灏忔椂',
- type : 'value',
- axisLabel:{ //鍧愭爣杞村瓧浣撻鑹�
- textStyle:{
- color: '#000'
- }
- },
- axisLine:{
- show:false,
- },
- axisTick:{ //y杞村埢搴︾嚎
- show:false
- },
- splitLine:{ //缃戞牸
- show: true,
- color:'#dadde4',
- lineStyle:{
- type:"dashed"
- }
- }
- },
- series:[
- // {
- // name:'鏇茬嚎',
- // type: 'line',
- // smooth:true,
- // symbol: 'circle',
- // symbolSize: 8,
- // label:{
- // show:true,
- // position:"top",
- // textStyle:{
- // color:'#000',
- // },
- // formatter:"鏃堕暱锛歿c}H"
- // },
- // itemStyle: {
- // color: "rgb(87, 120, 225)",
- // borderColor: "#fff",
- // borderWidth: 2,
- // shadowColor: 'rgba(0, 0, 0, .3)',
- // },
- // lineStyle: {
- // normal: {
- // color:"rgb(87, 120, 225)",
- // shadowColor: 'rgba(87, 120, 225, .4)',
- // shadowBlur: 8,
- // shadowOffsetY: 10,
- // shadowOffsetX: 0,
- // },
- // },
- // areaStyle: {
- // normal: {
- // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- // offset: 0,
- // color: 'rgba(87, 120, 225, .6)'
- // }, {
- // offset: 1,
- // color: 'rgba(87, 120, 225, .3)'
- // }]),
- // }
- // },
- // data: [this.openingLong, this.closedLong, this.processLong,this.waitingLong],
- // },
- {
- name:'鏌辩姸鍥�',
- type: 'bar',
- data: [this.openingLong, this.closedLong, this.processLong,this.waitingLong],
- // data:[22,3,4,5],
- barWidth: 25,
- label:{
- show:true,
- position:"top",
- textStyle:{
- color:'#000',
- },
- // formatter:"鏃堕暱锛歿c}H",
- formatter:params=>{
- const value=String(params.value)
- return value.length==2&&value[0]==='0'?`鏃堕暱锛�${value.slice(1)}H`:`鏃堕暱锛�${value}H`
- }
- },
- itemStyle: {
- normal: {
- color: function(params) {
- let colorList = [
- ["#6496e9","#6bded3"],
- ["#849db8","#b4b8cc"],
- ["#4fe1c5","#4ecee1"],
- // ["#9978fa","#88a1fa"],
- ["#ffbb65","#fdc68b"],
- ];
- // return colorList[params.dataIndex];
- let colorItem = colorList[params.dataIndex];
- return new echarts.graphic.LinearGradient(0,0,0,1,[{
- offset:0,
- color:colorItem[0]
- },
- {
- offset:1,
- color:colorItem[1]
- }],false)
- },
- barBorderRadius: [5, 5, 0, 0],
- }
- },
- }]
- }
- PowerOnRateLine.setOption(PowerOnRateLine_option);
- //寮�鏈烘椂闂碶鍏虫満鏃堕棿
- let UtilizationLine = this.$echarts.init(document.getElementById('UtilizationLine'), 'macarons');
- let statChartPieOption1 = {
- // title: {
- // x: 'left',
- // subtext: '寮�鏈烘晥鐜�',
- // textStyle: {
- // color: '#268e80',
- // fontSize: 20,
- //
- // },
- // },
- tooltip: {
- trigger: 'item',
- // formatter: "{a} <br/>{b} : {c} ({d}%)"锛�
- formatter:params=>{
- const value=String(params.value)
- return value.length==2&&value[0]==='0'?`${params.seriesName}<br/>${params.name}锛�${value.slice(1)}H锛�${params.percent}%锛塦:`${params.seriesName}<br/>${params.name}锛�${value}H锛�${params.percent}%锛塦
- }
- },
- legend: {
- orient: 'vertical',
- x: '85%',
- y: '50%',
- data: ['寮�鏈烘椂闂�', '鍏虫満鏃堕棿']
- },
- calculable: true,
- series: [{
- name: '寮�鏈烘晥鐜�',
- type: 'pie',
- radius: '70%',
- /*center: ['55%', '55%'],*/
- itemStyle: {
- normal: {
- color: function (params) {
- let colorList = [ '#6496e9','#849db8'];
- return colorList[params.dataIndex]
- },
- label: {
- show: true,
- position: 'top',
- // formatter: '{b}\n{c}',
- // formatter:params=>String(params.value).length==2?params.name+String(params.value).slice(1):params.name+String(params.value)
- formatter:params=>{
- const value=String(params.value)
- return value.length==2&&value[0]==='0'?params.name+' '+value.slice(1)+'H':params.name+' '+value+'H'
- }
- }
- }
- },
- data: [{value: this.openingLong, name: '寮�鏈烘椂闂�'},
- {value: this.closedLong, name: '鍏虫満鏃堕棿'}]
- }]
- };
- UtilizationLine.setOption(statChartPieOption1);
-
- //杩愯鏃堕棿\寰呮満鏃堕棿
- let StartupLine = this.$echarts.init(document.getElementById('StartupLine'), 'macarons');
- let statChartPieOption2 = {
- // title: {
- // x: 'left',
- // subtext: '杩愯鏁堢巼'
- // },
- tooltip: {
- trigger: 'item',
- // formatter: "{a} <br/>{b} : {c} ({d}%)",
- formatter:params=>{
- const value=String(params.value)
- return value.length==2&&value[0]==='0'?`${params.seriesName}<br/>${params.name}锛�${value.slice(1)}H锛�${params.percent}%锛塦:`${params.seriesName}<br/>${params.name}锛�${value}H锛�${params.percent}%锛塦
- }
- },
- legend: {
- orient: 'vertical',
- x: '85%',
- y: '50%',
- data: ['杩愯鏃堕棿', '寰呮満鏃堕棿']
- },
- calculable: true,
- series: [{
- name: '杩愯鏁堢巼',
- type: 'pie',
- radius: '70%',
- itemStyle: {
- normal: {
- color: function (params) {
- var colorList = ['#4ecee1', '#FCCE10'];
- return colorList[params.dataIndex]
- },
- label: {
- show: true,
- position: 'top',
- // formatter: '{b}\n{c}',
- formatter:params=>{
- const value=String(params.value)
- return value.length==2&&value[0]==='0'?params.name+' '+value.slice(1)+'H':params.name+' '+value+'H'
- }
- }
- }
- },
- data: [{value: this.processLong, name: '杩愯鏃堕棿'},
- {value: this.waitingLong, name: '寰呮満鏃堕棿'}]
- }]
- };
- StartupLine.setOption(statChartPieOption2);
- },
- queryStatistical(){
- getAction(this.url.dayStatisticalRate,this.queryParams).then(res =>{
- if(res.success) {
- // console.log(res);
- this.StatCharOpeningRate = res.result.openRate;
- //鍒╃敤鐜�
- this.StatCharUsedRate = res.result.utilizationRate;
- //寮�鏈虹巼
- this.UtilizationHeight = res.result.openRate;
- this.StatCharUsedopeningRate = res.result.StartupHeight;
- this.StartupHeight = res.result.StartupHeight;
- this.openingLong = this.getTime(res.result.openLong)
- this.waitingLong = this.getTime(res.result.waitLong);
- this.processLong = this.getTime(res.result.processLong);
- this.closedLong = this.getTime(res.result.closeLong);
- this.totalLong = parseInt(this.openingLong) + parseInt(this.closedLong);
- this.draw();
- }
- })
- },
- dataChange(val) {
- this.queryParam.collectTime1 = "";
- if(val){
- this.queryParams.dateTime = val.format('YYYYMMDD')
- this.queryParams.collectTime = val.format('YYYY-MM-DD');
- }
- },
- initEquipmentNode() {
- let _this = this
- getAction(this.url.getBaseTree).then((res) => {
- if (res.success) {
- if(res.result[0]){
- _this.$set(this.queryParam, 'tierName', res.result[0].title)
- _this.$set(this.queryParams, 'parentId', res.result[0].key)
- }
- // console.log(res.result[0].entity.tierName)
- _this.queryStatistical()
- } else {
- // this.$message.warn(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- this.cardLoading = false
- })
- // getAction(this.url.getEquipmentByPid, { pid: id }).then((res) => {
- // if (res.success) {
- // if (res.result) {
- // _this.$set(this.queryParam, 'tierName', res.result.tierName)
- // _this.$set(this.queryParam, 'equipmentId', res.result.equipmentId)
- // // _this.quip = res.result
- // _this.searchQuery()
- // } else {
- // _this.$message.warning('璇烽厤缃澶囷紒')
- // }
- // }
- // })
- },
- searchReset() {
- this.queryParam = {}
- this.queryParams = {
- collectTime:moment().add(-1,'d').format('YYYY-MM-DD'),
- dateTime:moment().add(-1,'d').format('YYYYMMDD')
- }
- this.initEquipmentNode()
- // this.dates = []
- // this.queryStatistical()
- // this.onClearSelected()
- },
- searchQuery(){
- this.queryStatistical();
- }
- },
- watch: {
- equip(val) {
- if (val && val.equipmentId) {
- this.$set(this.queryParam, 'tierName', val.title)
- this.$set(this.queryParam, 'equipmentId', val.equipmentId)
- this.queryParams.parentId = ''
- this.queryParams.equipmentId = val.equipmentId
- }else{
- this.queryParams.parentId = val.key
- this.queryParams.equipmentId = ''
- this.$set(this.queryParam, 'tierName', val.title)
- }
- this.searchQuery()
- }
- }
- }
-</script>
-
-<style scoped>
- .charContent{
- display: flex;
- }
- @media screen and (min-width: 1920px){
- #StatisticsLegend{
- height: 748px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1680px) and (max-width: 1920px){
- #StatisticsLegend{
- height: 748px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1400px) and (max-width: 1680px){
- #StatisticsLegend{
- height: 600px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1280px) and (max-width: 1400px){
- #StatisticsLegend{
- height: 501px!important;
- overflow: scroll;
- }
- }
- @media screen and (max-width: 1280px){
- #StatisticsLegend{
- height: 501px!important;
- overflow: scroll;
- }
- }
- #StatisticsLegend .PowerOnRate{
- flex: 1;
- margin-bottom: 15px;
- background-color: #fff;
- }
- #StatisticsLegend .UtilizationStartup{
- flex: 1;
- display: flex;
- }
- #StatisticsLegend .UtilizationStartup>div{
- flex: 1;
- background-color: #fff;
- }
- #StatisticsLegend .UtilizationStartup .Utilization{
- margin-right: 15px;
- }
- .title{
- display: flex;
- align-items: center;
- padding-left: 15px;
- padding-top: 5px;
- }
- .title .circle{
- width: 15px;
- height: 15px;
- background-color: #7282ec;
- border-radius: 100%;
- margin-right: 10px;
- }
- .title .text{
- font-size: 2vh;
- }
- .Line-box{
- display: flex;
- flex-direction: column;
- }
- .Line-box .box-bottom{
- flex: 1;
- }
- .PowerOnRate-box{
- display: flex;
- }
- .PowerOnRate-box .PowerOnRate-left{
- width: 25%;
- }
- .PowerOnRate-box .PowerOnRate_text{
- width: 10%;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- font-weight: 800;
- }
- .PowerOnRate-box .PowerOnRate-right{
- flex: 1;
- }
- .Utilization-box{
- display: flex;
- }
- .Utilization-box .Utilization-left{
- width: 25%;
- }
- .Utilization-box .Utilization-right{
- flex: 1;
- }
- .Startup-box{
- display: flex;
- }
- .Startup-box .Startup-left{
- width: 25%;
- }
- .Startup-box .Startup-right{
- flex: 1;
- }
- .left{
- display: flex;
- align-items: center;
- }
- .left .left-box{
- width: 65%;
- height: 60%;
- margin: 0 auto;
- overflow: hidden;
- border-radius: 8px;
-
- /*border: 6px solid red;*/
- /*!*background-color: yellow;*!*/
- /*border-image: linear-gradient(to top, #2bf3c7, #06a8f8) 1;*/
- }
- .left-box-con{
- width: 100%;
- height: 100%;
- position: relative;
- text-align: center;
- border: 6px solid red;
- /*background-color: yellow;*/
- border-image: linear-gradient(to top, #2bf3c7, #06a8f8) 1;
- }
- .left .left-box .Rate-box-kong{
- width: 100%;
- background: -moz-linear-gradient(bottom, #b5dec2 0%, #f4f5ba 100%);
- background: -webkit-gradient(linear, bottom bottom, top top, color-stop(0%,#b5dec2), color-stop(100%,#f4f5ba));
- background: -webkit-linear-gradient(bottom, #b5dec2 0%,#f4f5ba 100%);
- background: -o-linear-gradient(bottom, #b5dec2 0%,#f4f5ba 100%);
- background: -ms-linear-gradient(bottom, #b5dec2 0%,#f4f5ba 100%);
- background: linear-gradient(to top, #b5dec2 0%,#f4f5ba 100%);
- }
- .left .left-box .Rate-box{
- position: absolute;
- text-align: center;
- bottom: 0;
- width: 100%;
- height: 89%;
- /*background-color: green;*/
- background: -moz-linear-gradient(bottom, #06a8f8 0%, #2bf3c7 100%);
- background: -webkit-gradient(linear, bottom bottom, top top, color-stop(0%,#06a8f8), color-stop(100%,#2bf3c7));
- background: -webkit-linear-gradient(bottom, #06a8f8 0%,#2bf3c7 100%);
- background: -o-linear-gradient(bottom, #06a8f8 0%,#2bf3c7 100%);
- background: -ms-linear-gradient(bottom, #06a8f8 0%,#2bf3c7 100%);
- background: linear-gradient(to top, #06a8f8 0%,#2bf3c7 100%);
- }
- .left .left-box .Rate-box p{
- position: absolute;
- bottom: 0;
- color: #fff;
- width: 100%;
- text-align: center;
- }
- .con-left{
- display: flex;
- flex-direction: column;
- flex-wrap: wrap;
- justify-content: space-around;
- align-items: center;
- }
- .con-left>span{
- flex: 1;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue
deleted file mode 100644
index 7cb1658..0000000
--- a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue
+++ /dev/null
@@ -1,866 +0,0 @@
-<template>
- <div id="StatisticsLegend"
- style="width: 100%; height: 100%; overflow: hidden;display: flex;flex-direction: column;background-color: #f5f4f4">
- <!-- 鏌ヨ鍖哄煙 -->
- <div style="width: 100%; height: 44px; background-color: #fff" class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="5" :sm="5" :xs="5">
- <a-form-item label="鍚嶇О">
- <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" :readOnly="readOnly" v-model="queryParam.tierName"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="4" :sm="4" :xs="4">
- <a-form-item label="鏃ユ湡">
- <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" format='YYYY-MM-DD'
- @change="dataChange" :allowClear="false"/>
- </a-form-item>
- </a-col>
- <a-col :md="2" :sm="2" :xs="2">
- <a-space>
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
- </a-space>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <!--寮�鏈虹巼-->
- <div class="PowerOnRate Line-box">
- <div class="title">
- <div class="circle"></div>
- <div class="text">鍒╃敤鐜�</div>
- </div>
- <div class="PowerOnRate-box box-bottom">
- <div class="PowerOnRate-left" ref="PowerOnRatePie" id="PowerOnRatePie"></div>
- <div class="PowerOnRate-right" ref="PowerOnRateLine" id="PowerOnRateLine"></div>
- </div>
- </div>
- <!--鍒╃敤鐜囧拰寮�鍔ㄧ巼-->
- <div class="UtilizationStartup">
- <div class="Utilization Line-box">
- <div class="title">
- <div class="circle"></div>
- <div class="text">寮�鏈虹巼</div>
- </div>
- <div class="Utilization-box box-bottom">
- <div class="Utilization-left left">
- <div class="left-box">
- <div class="left-box-con">
- <div class="Rate-box-kong" :style="{height:100-UtilizationHeight+'%'}"></div>
- <div class="Rate-box" :style="{height:UtilizationHeight+'%'}">
- <p class="Rate-box-text">
- <span ref="UtilizationRate">{{UtilizationHeight}}%</span>
- <br>
- 寮�鏈虹巼
- </p>
- </div>
- </div>
- </div>
- </div>
- <div class="Utilization-right" ref="UtilizationLine" id="UtilizationLine"></div>
- </div>
- </div>
- <div class="Startup Line-box">
- <div class="title">
- <div class="circle"></div>
- <div class="text">寮�鍔ㄧ巼</div>
- </div>
- <div class="Startup-box box-bottom">
- <div class="Startup-left left" ref="StartupRate">
- <div class="left-box">
- <div class="left-box-con">
- <div class="Rate-box-kong" :style="{height:100-StartupHeight+'%'}"></div>
- <div class="Rate-box" :style="{height:StartupHeight+'%'}">
- <p class="Rate-box-text">
- <span>{{StatCharUsedopeningRate}}%</span>
- <br>
- 寮�鍔ㄧ巼
- </p>
- </div>
- </div>
-
- </div>
- </div>
- <div class="Startup-right" ref="StartupLine" id="StartupLine"></div>
- </div>
- </div>
- </div>
- </div>
-</template>
-
-<script>
- import moment from 'moment'
- import { putAction, getAction } from '@/api/manage'
- import $ from 'jquery'
- import * as echarts from 'echarts'
-
- export default {
- name: 'StatisticsLegend',
- props: { equip: {} },
- data() {
- return {
- readOnly: true,
- showday: true,
- StatCharOpeningRate: 0,
- StatCharUsedRate: 0,
- StatCharUsedopeningRate: 0,
- openingLong: 0,
- waitingLong: 0,
- processLong: 0,
- closedLong: 0,
- totalLong: 0,
- UtilizationHeight: 0,
- StartupHeight: 0,
- quip: {},
- dates: [],
- queryParam: {},
- queryParams: {
- collectTime: undefined
- },
- shiftSubList: [],
- shiftList: [],
- url: {
- getEquipmentByPid: '/mdc/mdcequipment/getEquipmentByPid',
- dayStatisticalRate: '/mdc/efficiencyReport/dayStatisticalRate',
- getBaseTree: '/mdc/mdcEquipment/queryTreeListByProduction'
- }
- }
- },
- created() {
- let collectTime = moment(moment().add(-1, 'd'), 'YYYY-MM-DD')
- this.queryParams.collectTime = moment().add(-1, 'd').format('YYYY-MM-DD')
- this.queryParams.dateTime = moment().add(-1, 'd').format('YYYYMMDD')
- this.initEquipmentNode()
- },
-
- methods: {
- disabledDate(current) {
- //Can not slect days before today and today
- return current && current > moment().subtract('days', 1)
- },
- //鎶婄璁$畻鎴愬搴旂殑鏃跺垎绉掔殑鍑芥暟
- getTime(time) {
- //杞崲涓烘椂鍒嗙
- let h = Math.round(time / 60 / 60)
- h = h < 10 ? '0' + h : h
- //浣滀负杩斿洖鍊艰繑鍥�
- // console.log(h);
- return h
- },
- moment,
- draw() {
- //鍒╃敤鐜�
- //楗煎浘
- let PowerOnRatePie = this.$echarts.init(document.getElementById('PowerOnRatePie'), 'macarons')
- let PowerOnRatePie_option = {
- // color: ["#3859fa", '#ccc'],
- title: {
- text: this.StatCharUsedRate + '%',
- subtext: '鍒╃敤鐜�',
- textStyle: {
- color: '#268e80',
- fontSize: 18
-
- },
- subtextStyle: {
- color: '#292929'
- },
- x: 'center',
- y: 'center'
- },
- series: [{
- name: '',
- type: 'pie',
- radius: ['55%', '70%'],
- itemStyle: {
- normal: {
- borderWidth: 4,//鎵囧尯闂村姞闂撮殧
- borderColor: '#fff'//闂撮殧涓虹櫧鑹�
- }
- },
- label: {
- normal: {
- show: false
- }
- },
- data: [{
- value: 100,
- itemStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: '#88a8fd'
- },
- {
- offset: 1,
- color: '#544cee'
- }], false)
- }
- },
- {
- value: 100 - this.StatCharUsedRate,
- itemStyle: {
- color: '#f0f3f5'
- }
- }
- ]
- }
- ]
- }
- PowerOnRatePie.setOption(PowerOnRatePie_option)
- let PowerOnRateLine = this.$echarts.init(document.getElementById('PowerOnRateLine'), 'macarons')
- let PowerOnRateLine_option = {
- tooltip: {
- trigger: 'axis'
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- top: 60,
- containLabel: true
- },
- legend: {
- // selected:{
- // "鏇茬嚎":false,
- // },
- top: '0',
- right: '10',
- //璁剧疆鍗曢�夊閫夋ā寮�
- // selectedMode:'single',
- icon: 'pin',
- data: [
- // {
- // name:'鏇茬嚎',
- // textStyle:{
- // padding:4,
- // color:'#e957ff',
- // // borderWidth:1,
- // fontSize:16,
- // // borderColor:'#50E6D7'
- // }
- // },
- {
- name: '鏌辩姸鍥�',
- textStyle: {
- padding: 4,
- fontSize: 16,
- color: '#9996f8'
- // borderWidth:1,
- // borderColor:'#50E6D7'
- }
- }
- ]
- },
- xAxis: {
- type: 'category',
- data: ['寮�鏈烘椂闀�', '鍏虫満鏃堕暱', '杩愯鏃堕暱', '寰呮満鏃堕暱'],
- axisLabel: { //鍧愭爣杞村瓧浣撻鑹�
- textStyle: {
- color: '#000'
- }
- },
- axisLine: {
- lineStyle: {
- color: '#e5e5e5'
- }
- },
- axisTick: { //y杞村埢搴︾嚎
- show: false
- },
- splitLine: { //缃戞牸
- show: false
- },
- boundaryGap: true
- },
- yAxis: {
- name: '鏃堕棿/灏忔椂',
- type: 'value',
- axisLabel: { //鍧愭爣杞村瓧浣撻鑹�
- textStyle: {
- color: '#000'
- }
- },
- axisLine: {
- show: false
- },
- axisTick: { //y杞村埢搴︾嚎
- show: false
- },
- splitLine: { //缃戞牸
- show: true,
- lineStyle: {
- color: '#dadde4',
- type: 'dashed'
- }
- }
- },
- series: [
- // {
- // name:'鏇茬嚎',
- // type: 'line',
- // smooth:true,
- // symbol: 'circle',
- // symbolSize: 8,
- // label:{
- // show:true,
- // position:"top",
- // textStyle:{
- // color:'#000',
- // },
- // formatter:"鏃堕暱锛歿c}H"
- // },
- // itemStyle: {
- // color: "rgb(87, 120, 225)",
- // borderColor: "#fff",
- // borderWidth: 2,
- // shadowColor: 'rgba(0, 0, 0, .3)',
- // },
- // lineStyle: {
- // normal: {
- // color:"rgb(87, 120, 225)",
- // shadowColor: 'rgba(87, 120, 225, .4)',
- // shadowBlur: 8,
- // shadowOffsetY: 10,
- // shadowOffsetX: 0,
- // },
- // },
- // areaStyle: {
- // normal: {
- // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- // offset: 0,
- // color: 'rgba(87, 120, 225, .6)'
- // }, {
- // offset: 1,
- // color: 'rgba(87, 120, 225, .3)'
- // }]),
- // }
- // },
- // data: [this.openingLong, this.closedLong, this.processLong,this.waitingLong],
- // },
- {
- name: '鏌辩姸鍥�',
- type: 'bar',
- data: [this.openingLong, this.closedLong, this.processLong, this.waitingLong],
- // data:[22,3,5,6],
- barWidth: 25,
- label: {
- show: true,
- position: 'top',
- textStyle: {
- color: '#000'
- },
- // formatter:"鏃堕暱锛歿c}H",
- formatter: params => {
- const value = String(params.value)
- return value.length == 2 && value[0] === '0' ? `鏃堕暱锛�${value.slice(1)}H` : `鏃堕暱锛�${value}H`
- }
- },
- itemStyle: {
- normal: {
- color: function(params) {
- let colorList = [
- ['#6496e9', '#6bded3'],
- ['#849db8', '#b4b8cc'],
- ['#4fe1c5', '#4ecee1'],
- // ["#9978fa","#88a1fa"],
- ['#ffbb65', '#fdc68b']
- ]
- // return colorList[params.dataIndex];
- let colorItem = colorList[params.dataIndex]
- return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: colorItem[0]
- },
- {
- offset: 1,
- color: colorItem[1]
- }], false)
- },
- barBorderRadius: [5, 5, 0, 0]
- }
- }
- }]
- }
- PowerOnRateLine.setOption(PowerOnRateLine_option)
- //寮�鏈虹巼
- let UtilizationLine = this.$echarts.init(document.getElementById('UtilizationLine'), 'macarons')
- let UtilizationLine_option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- grid: {
- top: '15%',
- right: '3%',
- left: '10%',
- bottom: '12%'
- },
- xAxis: [{
- type: 'category',
- data: ['寮�鏈烘椂闀�', '鎬绘椂闀�'],
- axisLine: {
- lineStyle: {
- // color: 'rgba(70, 196, 255, .8)'
- }
- },
- axisTick: {
- show: false
- },
- axisLabel: {
- // color: 'rgba(111, 132, 189, 1)',
- textStyle: {
- fontSize: 14
- }
- }
- }],
- yAxis: [{
- type: 'value',
- name: '鏃堕棿/灏忔椂',
- nameTextStyle: {
- // color: 'rgba(111, 132, 189, 1)'
- },
- axisLabel: {
- formatter: '{value}'
- // color: 'rgba(111, 132, 189, 1)',
- },
- axisTick: {
- show: false
- },
-
- axisLine: {
- show: false
- },
- splitLine: {
- lineStyle: {
- // color: 'rgba(70, 196, 255, .3)'
- }
- }
- }],
- series: [
- {
- type: 'bar',
- data: [this.openingLong, this.totalLong],
- // data:[22,22],
- barWidth: 25,
- label: {
- show: true,
- position: 'top',
- textStyle: {
- color: '#000'
- },
- // formatter:"鏃堕暱锛歿c}H",
- formatter: params => {
- const value = String(params.value)
- return value.length == 2 && value[0] === '0' ? `鏃堕暱锛�${value.slice(1)}H` : `鏃堕暱锛�${value}H`
- }
- },
- itemStyle: {
- normal: {
- color: function(params) {
- let colorList = [
- ['#6496e9', '#6bded3'],
- ['#9978fa', '#88a1fa']
- ]
- // return colorList[params.dataIndex];
- let colorItem = colorList[params.dataIndex]
- return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: colorItem[0]
- },
- {
- offset: 1,
- color: colorItem[1]
- }], false)
- },
- barBorderRadius: [5, 5, 0, 0]
- }
- }
- }]
- }
- UtilizationLine.setOption(UtilizationLine_option)
- //寮�鍔ㄧ巼
- let StartupLine = this.$echarts.init(document.getElementById('StartupLine'), 'macarons')
- let StartupLine_option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- grid: {
- top: '15%',
- right: '3%',
- left: '10%',
- bottom: '12%'
- },
- xAxis: [{
- type: 'category',
- data: ['杩愯鏃堕暱', '寮�鏈烘椂闀�'],
- axisLine: {
- lineStyle: {
- // color: 'rgba(70, 196, 255, .8)'
- }
- },
- axisTick: {
- show: false
- },
- axisLabel: {
- // color: 'rgba(111, 132, 189, 1)',
- textStyle: {
- fontSize: 14
- }
- }
- }],
- yAxis: [{
- type: 'value',
- name: '鏃堕棿/灏忔椂',
- nameTextStyle: {
- // color: 'rgba(111, 132, 189, 1)'
- },
- axisLabel: {
- formatter: '{value}'
- // color: 'rgba(111, 132, 189, 1)',
- },
- axisTick: {
- show: false
- },
-
- axisLine: {
- show: false
- },
- splitLine: {
- lineStyle: {
- // color: 'rgba(70, 196, 255, .3)'
- }
- }
- }],
- series: [{
- type: 'bar',
- data: [this.processLong, this.openingLong],
- // data:[22,22],
- barWidth: 25,
- label: {
- show: true,
- position: 'top',
- textStyle: {
- color: '#000'
- },
- // formatter:"鏃堕暱锛歿c}H",
- formatter: params => {
- const value = String(params.value)
- return value.length == 2 && value[0] === '0' ? `鏃堕暱锛�${value.slice(1)}H` : `鏃堕暱锛�${value}H`
- }
- },
- itemStyle: {
- normal: {
- color: function(params) {
- let colorList = [
- ['#4fe1c5', '#4ecee1'],
- ['#6496e9', '#6bded3']
- ]
- // return colorList[params.dataIndex];
- let colorItem = colorList[params.dataIndex]
- return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: colorItem[0]
- },
- {
- offset: 1,
- color: colorItem[1]
- }], false)
- },
- barBorderRadius: [5, 5, 0, 0]
- }
- }
- }]
- }
- StartupLine.setOption(StartupLine_option)
- },
- queryStatistical() {
- getAction(this.url.dayStatisticalRate, this.queryParams).then(res => {
- if (res.success) {
- this.StatCharOpeningRate = res.result.openRate
- this.StatCharUsedRate = res.result.utilizationRate
- this.UtilizationHeight = res.result.openRate
- this.StatCharUsedopeningRate = res.result.usedOpenRate
- this.StartupHeight = res.result.usedOpenRate
- this.openingLong = this.getTime(res.result.openLong)
- this.waitingLong = this.getTime(res.result.waitLong)
- this.processLong = this.getTime(res.result.processLong)
- this.closedLong = this.getTime(res.result.closeLong)
- this.totalLong = parseInt(this.openingLong) + parseInt(this.closedLong)
- this.draw()
- }
- })
- },
- dataChange(val) {
- if (val) {
- this.queryParams.dateTime = val.format('YYYYMMDD')
- this.queryParams.collectTime = val.format('YYYY-MM-DD')
- }
- },
- initEquipmentNode() {
- let _this = this
- getAction(this.url.getBaseTree).then((res) => {
- if (res.success) {
- const { isEquipment, productionId, tierName } = this.$route.params
- // 鍒ゆ柇鏄惁鏄粠鐪嬫澘璺宠浆杩囨潵锛宲roductionId 瀛樺湪鍒欎负浠庣湅鏉胯烦杞�
- if (productionId) {
- // 鍒ゆ柇鏄惁鐐瑰嚮鐨勬槸璁惧灞傜骇
- if (!isEquipment) {
- _this.$set(this.queryParams, 'parentId', productionId)
- _this.$set(this.queryParam, 'tierName', tierName)
- } else {
- _this.$set(this.queryParams, 'equipmentId', productionId)
- _this.$set(this.queryParam, 'tierName', productionId + '/' + tierName)
- }
- } else {
- if (res.result[0]) {
- _this.$set(this.queryParam, 'tierName', res.result[0].title)
- _this.$set(this.queryParams, 'parentId', res.result[0].key)
- }
- }
- this.queryStatistical()
- } else {
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- this.loading = false
- this.cardLoading = false
- })
- },
- searchReset() {
- this.queryParam = {}
- this.queryParams = {
- collectTime: moment().add(-1, 'd').format('YYYY-MM-DD'),
- dateTime: moment().add(-1, 'd').format('YYYYMMDD')
- }
- this.initEquipmentNode()
- },
- searchQuery() {
- this.queryStatistical()
- }
- },
- watch: {
- equip(val) {
- // console.log(val);
- if (val && val.equipmentId) {
- this.$set(this.queryParam, 'tierName', val.title)
- this.$set(this.queryParam, 'equipmentId', val.equipmentId)
- this.queryParams.parentId = ''
- this.queryParams.equipmentId = val.equipmentId
- } else {
- this.queryParams.parentId = val.key
- this.queryParams.equipmentId = ''
- this.$set(this.queryParam, 'tierName', val.title)
- }
- this.searchQuery()
- }
- // this.searchQuery();
- }
-
- }
-</script>
-
-<style scoped>
- .charContent {
- display: flex;
- }
-
- @media screen and (min-width: 1920px) {
- #StatisticsLegend {
- height: 748px !important;
- overflow: scroll;
- }
- }
-
- @media screen and (min-width: 1680px) and (max-width: 1920px) {
- #StatisticsLegend {
- height: 748px !important;
- overflow: scroll;
- }
- }
-
- @media screen and (min-width: 1400px) and (max-width: 1680px) {
- #StatisticsLegend {
- height: 600px !important;
- overflow: scroll;
- }
- }
-
- @media screen and (min-width: 1280px) and (max-width: 1400px) {
- #StatisticsLegend {
- height: 501px !important;
- overflow: scroll;
- }
- }
-
- @media screen and (max-width: 1280px) {
- #StatisticsLegend {
- height: 501px !important;
- overflow: scroll;
- }
- }
-
- #StatisticsLegend .PowerOnRate {
- flex: 1;
- margin-bottom: 15px;
- background-color: #fff;
- }
-
- #StatisticsLegend .UtilizationStartup {
- flex: 1;
- display: flex;
- }
-
- #StatisticsLegend .UtilizationStartup > div {
- flex: 1;
- background-color: #fff;
- }
-
- #StatisticsLegend .UtilizationStartup .Utilization {
- margin-right: 15px;
- }
-
- .title {
- display: flex;
- align-items: center;
- padding-left: 15px;
- padding-top: 5px;
- }
-
- .title .circle {
- width: 15px;
- height: 15px;
- background-color: #7282ec;
- border-radius: 100%;
- margin-right: 10px;
- }
-
- .title .text {
- font-size: 2vh;
- }
-
- .Line-box {
- display: flex;
- flex-direction: column;
- }
-
- .Line-box .box-bottom {
- flex: 1;
- }
-
- .PowerOnRate-box {
- display: flex;
- }
-
- .PowerOnRate-box .PowerOnRate-left {
- width: 25%;
- }
-
- .PowerOnRate-box .PowerOnRate-right {
- flex: 1;
- }
-
- .Utilization-box {
- display: flex;
- }
-
- .Utilization-box .Utilization-left {
- width: 25%;
- }
-
- .Utilization-box .Utilization-right {
- flex: 1;
- }
-
- .Startup-box {
- display: flex;
- }
-
- .Startup-box .Startup-left {
- width: 25%;
- }
-
- .Startup-box .Startup-right {
- flex: 1;
- }
-
- .left {
- display: flex;
- align-items: center;
- }
-
- .left .left-box {
- width: 65%;
- height: 60%;
- margin: 0 auto;
- overflow: hidden;
- border-radius: 8px;
-
- /*border: 6px solid red;*/
- /*!*background-color: yellow;*!*/
- /*border-image: linear-gradient(to top, #2bf3c7, #06a8f8) 1;*/
- }
-
- .left-box-con {
- width: 100%;
- height: 100%;
- position: relative;
- text-align: center;
- border: 6px solid red;
- /*background-color: yellow;*/
- border-image: linear-gradient(to top, #2bf3c7, #06a8f8) 1;
- }
-
- .left .left-box .Rate-box-kong {
- width: 100%;
- background: -moz-linear-gradient(bottom, #b5dec2 0%, #f4f5ba 100%);
- background: -webkit-gradient(linear, bottom bottom, top top, color-stop(0%, #b5dec2), color-stop(100%, #f4f5ba));
- background: -webkit-linear-gradient(bottom, #b5dec2 0%, #f4f5ba 100%);
- background: -o-linear-gradient(bottom, #b5dec2 0%, #f4f5ba 100%);
- background: -ms-linear-gradient(bottom, #b5dec2 0%, #f4f5ba 100%);
- background: linear-gradient(to top, #b5dec2 0%, #f4f5ba 100%);
- }
-
- .left .left-box .Rate-box {
- position: absolute;
- text-align: center;
- bottom: 0;
- width: 100%;
- height: 89%;
- /*background-color: green;*/
- background: -moz-linear-gradient(bottom, #06a8f8 0%, #2bf3c7 100%);
- background: -webkit-gradient(linear, bottom bottom, top top, color-stop(0%, #06a8f8), color-stop(100%, #2bf3c7));
- background: -webkit-linear-gradient(bottom, #06a8f8 0%, #2bf3c7 100%);
- background: -o-linear-gradient(bottom, #06a8f8 0%, #2bf3c7 100%);
- background: -ms-linear-gradient(bottom, #06a8f8 0%, #2bf3c7 100%);
- background: linear-gradient(to top, #06a8f8 0%, #2bf3c7 100%);
- }
-
- .left .left-box .Rate-box p {
- position: absolute;
- bottom: 0;
- color: #fff;
- width: 100%;
- text-align: center;
- }
-
- .con-left {
- display: flex;
- flex-direction: column;
- flex-wrap: wrap;
- justify-content: space-around;
- align-items: center;
- }
-
- .con-left > span {
- flex: 1;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationForm.vue b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationForm.vue
deleted file mode 100644
index eef3d6b..0000000
--- a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationForm.vue
+++ /dev/null
@@ -1,124 +0,0 @@
-<template>
- <a-spin :spinning="confirmLoading">
- <j-form-container :disabled="formDisabled">
- <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
- <a-row>
- <a-col :span="24">
- <a-form-model-item label="璁惧缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentid">
- <a-input v-model="model.equipmentid" placeholder="璇疯緭鍏ヨ澶囩紪鍙�" ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="璁惧鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentname">
- <a-input v-model="model.equipmentname" placeholder="璇疯緭鍏ヨ澶囧悕绉�" ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startdate">
- <j-date placeholder="璇烽�夋嫨鏃堕棿" v-model="model.startdate" style="width: 100%" />
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="鎵煩鍊�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="torquevalue">
- <a-input v-model="model.torquevalue" placeholder="璇疯緭鍏ユ壄鐭╁��" ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="澶囨敞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes">
- <a-input v-model="model.notes" placeholder="璇疯緭鍏ュ娉�" ></a-input>
- </a-form-model-item>
- </a-col>
- </a-row>
- </a-form-model>
- </j-form-container>
- </a-spin>
-</template>
-
-<script>
-
- import { httpAction, getAction } from '@/api/manage'
- import { validateDuplicateValue } from '@/utils/util'
-
- export default {
- name: 'TorqueconfigurationForm',
- components: {
- },
- props: {
- //琛ㄥ崟绂佺敤
- disabled: {
- type: Boolean,
- default: false,
- required: false
- }
- },
- data () {
- return {
- model:{
- },
- labelCol: {
- xs: { span: 24 },
- sm: { span: 5 },
- },
- wrapperCol: {
- xs: { span: 24 },
- sm: { span: 16 },
- },
- confirmLoading: false,
- validatorRules: {
- },
- url: {
- add: "/torquec/torqueconfiguration/add",
- edit: "/torquec/torqueconfiguration/edit",
- queryById: "/torquec/torqueconfiguration/queryById"
- }
- }
- },
- computed: {
- formDisabled(){
- return this.disabled
- },
- },
- created () {
- //澶囦唤model鍘熷鍊�
- this.modelDefault = JSON.parse(JSON.stringify(this.model));
- },
- methods: {
- add () {
- this.edit(this.modelDefault);
- },
- edit (record) {
- this.model = Object.assign({}, record);
- this.visible = true;
- },
- submitForm () {
- const that = this;
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.$refs.form.validate(valid => {
- if (valid) {
- that.confirmLoading = true;
- let httpurl = '';
- let method = '';
- if(!this.model.id){
- httpurl+=this.url.add;
- method = 'post';
- }else{
- httpurl+=this.url.edit;
- method = 'put';
- }
- httpAction(httpurl,this.model,method).then((res)=>{
- if(res.success){
- that.$message.success(res.message);
- that.$emit('ok');
- }else{
- that.$message.warning(res.message);
- }
- }).finally(() => {
- that.confirmLoading = false;
- })
- }
-
- })
- },
- }
- }
-</script>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationList.vue b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationList.vue
deleted file mode 100644
index e9f6724..0000000
--- a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationList.vue
+++ /dev/null
@@ -1,762 +0,0 @@
-<template>
- <div class="device_list">
- <!-- 鏌ヨ鍖哄煙 -->
- <div style=" background-color: #fff;overflow: auto" class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24" style="width: 100%;">
- <a-col :md="7" :sm="7">
- <a-form-item label="鏃堕棿">
- <a-range-picker @change="dateParamChange" v-model="dates" format="YYYY-MM-DD HH:mm:ss"/>
- </a-form-item>
- </a-col>
- <a-col :md="5" :sm="5">
- <a-form-item label="璁惧缂栧彿">
- <a-input placeholder="杈撳叆璁惧缂栧彿鏌ヨ" v-model="queryParams.equipmentId"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="5" :sm="5" :xs="5">
- <a-form-item label="璁惧鍚嶇О">
- <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" v-model="queryParams.equipmentName"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="2" :sm="2" :xs="2">
- <a-space>
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
- </a-space>
- </a-col>
- <!--<a-col :md="2" :sm="3" :xs="3">-->
- <!--<a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>-->
- <!--</a-col>-->
- <!--<a-col :md="2" :sm="2" :xs="2">-->
- <!--<a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>-->
- <!--</a-col>-->
- <!--<a-col :lg="2" :md="3" :sm="3" :xs="3">-->
- <!--<a-button type="primary" @click="exportExcel" icon="download">瀵煎嚭</a-button>-->
- <!--</a-col>-->
- </a-row>
- </a-form>
- </div>
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator" style="display: inline;">
- <a-button @click="handleAdd" type="primary" icon="plus">鏂板
- </a-button>
- <a-button type="primary" icon="download" @click="handleExportXls('鎵煩閰嶇疆')">瀵煎嚭</a-button>
- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
- <a-button type="primary" icon="import">瀵煎叆</a-button>
- </a-upload>
- <a-dropdown v-if="selectedRowKeys.length > 0">
- <a-menu slot="overlay">
- <a-menu-item key="1" @click="batchDel">
- <a-icon type="delete"/>
- 鍒犻櫎
- </a-menu-item>
- </a-menu>
- <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔
- <a-icon type="down"/>
- </a-button>
- </a-dropdown>
- </div>
-
- <!-- table鍖哄煙-begin -->
- <div id="DeviceList" style="flex: 1;overflow: hidden">
- <a-table ref="table" bordered size="middle" rowKey="id" :columns="columns"
- :dataSource="dataSource" :pagination="ipagination" :loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
- @change="handleTableChange" :scroll="{x:'max-content',y:scrollY}">
- <span slot="action" slot-scope="text, record">
- <a @click="handleEdit(record)">缂栬緫</a>
- <a-divider type="vertical" />
- <a @click="handleDelete(record.id)">鍒犻櫎</a>
- </span>
- <!--瀛楃涓茶秴闀挎埅鍙栫渷鐣ュ彿鏄剧ず-->
- <span slot="num" slot-scope="text" style="font-weight: bold">
- <j-ellipsis :value="text" :length="8"/>
- </span>
- <span slot="name" slot-scope="text" style="font-weight: bold">
- <j-ellipsis :value="text" :length="8"/>
- </span>
- <span slot="model" slot-scope="text" style="font-weight: bold">
- <j-ellipsis :value="text" :length="8"/>
- </span>
- </a-table>
- </div>
- <!-- table鍖哄煙-end -->
- <!--<device-repair-model></device-repair-model>-->
- <torqueconfiguration-modal ref="modalForm" @ok="modalFormOk"></torqueconfiguration-modal>
- <torqueconfiguration-modaledit ref="modalFormedit" @ok="modalFormOk">></torqueconfiguration-modaledit>
- <!--<device-repair-model-add ref="modalFormadd" @ok="modalFormOk"></device-repair-model-add>-->
- <!--<device-repair-model-edit ref="modalFormedit" @ok="modalFormOk"></device-repair-model-edit>-->
- <!--<repair-model ref="repairModelFrom" @ok="modalFormOk"></repair-model>-->
-
- </div>
-</template>
-
-<script>
- import moment from 'moment'
- import $ from 'jquery'
- import JDictSelectTag from '@/components/dict/JDictSelectTag'
- import JDate from '../../../../../components/jeecg/JDate'
- import {
- requestPut,
- deleteAction,
- getAction,
- downFile,
- getFileAccessHttpUrl
- } from '@/api/manage'
- import TorqueconfigurationModal from './TorqueconfigurationModal'
- import TorqueconfigurationModaledit from './TorqueconfigurationModalEdit'
- // import DeviceRepairModelAdd from './DeviceRepairModelAdd'
- // import DeviceRepairModelEdit from './DeviceRepairModelEdit'
- import '@/components/table2excel/table2excel'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
- import JInput from '@/components/jeecg/JInput'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import Tooltip from 'ant-design-vue/es/tooltip'
- import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
- export default {
- name: 'TorqueconfigurationList',
- mixins: [JeecgListMixin],
- components: {
- Tooltip,
- TorqueconfigurationModal,
- TorqueconfigurationModaledit,
- // DeviceRepairModelAdd,
- // DeviceRepairModelEdit,
- JDictSelectTag,
- JInput,
- JDate,
- JEllipsis
- },
- props: { nodeTree: '', Type:'',nodePeople: '' },
- data() {
- return {
- typeTree:"",
- typeParent:1,
- typeEquipment:1,
- dates: [],
- xianshi:"",
- readOnly:true,
- queryParam: {},
- queryParams:{},
- queryParamEquip:{},
- queryParamPeople:{},
- dataStartsoucre:[],
- scrollY:465,
- /* 鍒嗛〉鍙傛暟 */
- ipagination:{
- current: 1,
- pageSize: 30,
- pageSizeOptions: ['30', '50', '100'],
- showTotal: (total, range) => {
- return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�"
- },
- showQuickJumper: true,
- showSizeChanger: true,
- total: 0
- },
- columns: [
- {
- title: '璁惧缂栧彿',
- align: 'center',
- dataIndex: 'equipmentId',
- width:200
- },
- {
- title: '璁惧鍚嶇О',
- align: 'center',
- dataIndex: 'equipmentName',
- width:250
- // defaultSortOrder:'descend',
- // sorter: (a, b) => {return a.equipmentName>b.equipmentName?1:-1}
- },
- {
- title: '鏃堕棿',
- align: 'center',
- dataIndex: 'torqueDate',
- width:250
- // scopedSlots:{customRender:'startTime'},
- // customRender:(text,row,index) => {
- // return moment(text).format("YYYY-MM-DD HH:mm:ss")
- // }
- },
- {
- title: '鎵煩鍊�',
- align: 'center',
- dataIndex: 'torqueValue',
- width:150
- },
- {
- title: '杩涚粰鍙傛暟',
- align: 'center',
- dataIndex: 'feedParameter',
- width:150
- },
- {
- title: '澶囨敞',
- align: 'center',
- dataIndex: 'notes',
- width:250
- },
- {
- title: '鎿嶄綔',
- dataIndex: 'action',
- scopedSlots: {customRender: 'action'},
- align: "center",
- width: 150,
- fixed:'right'
- }
- ],
- url: {
- list: '/mdc/MdcTorqueConfig/pageList',
- delete: '/mdc/MdcTorqueConfig/deleteMdcTorqueConfig',
- deleteBatch: '/mdc/MdcTorqueConfig/deleteBatchMdcTorqueConfig',
- getEquipmentByPid: '/mdc/mdcequipment/getEquipmentByPid',
- exportXlsUrl: "/mdc/MdcTorqueConfig/exportXls",
- importExcelUrl: "/mdc/MdcTorqueConfig/importExcel",
- }
- }
- },
- watch:{
- Type(valmath){
- this.dataList = [];
- this.queryParams.typeTree = valmath
- console.log(valmath,'瑙﹀彂Type鐨剋atch鏂规硶')
- // console.log(this.queryParams.typeTree)
- },
- nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId) {
- this.queryParamEquip.parentId = ""
- this.queryParams.equipmentId = val.equipmentId
- this.queryParamEquip.equipmentId = val.equipmentId
- } else {
- this.queryParamEquip.parentId = val.key
- this.queryParams.equipmentId = ''
- }
- this.searchQuery()
- }
- },
- nodePeople(val){
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId) {
- this.queryParamEquip.parentId = ""
- this.queryParams.equipmentId = val.equipmentId
- this.queryParamEquip.equipmentId = val.equipmentId
- } else {
- this.queryParamPeople.parentId = val.key
- this.queryParams.equipmentId = ''
- }
- this.searchQuery()
- }
- }
- },
- computed: {
- importExcelUrl: function(){
- return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
- },
- },
- methods: {
- dateParamChange(v1, v2) {
- // console.log(v1,v2)
- this.queryParam.startTime = v2[0]
- this.queryParam.endTime = v2[1]
- // console.log(v2[0],v2[1])
- },
- onChange(value, dateString) {
- // console.log('Selected Time: ', value);
- // console.log('Formatted Selected Time: ', dateString);
- },
- onOk(value) {
- console.log('onOk: ', value);
- },
- /**
- * 鏌ヨ鍖哄煙閲嶇疆鎸夐挳
- */
- searchReset() {
- if(this.queryParams.typeTree == "1"){
- console.log('绗竴涓殑typeTree',this.queryParams.typeTree)
- this.typeTree = this.queryParams.typeTree
- this.typeParent = this.queryParams.parentId
- this.typeEquipment = this.queryParams.equipmentId
- this.queryParams = {}
- this.queryParam = {}
- this.dates = []
- this.queryParams.typeTree = this.typeTree
- this.queryParams.parentId = this.typeParent
- console.log('杩涘叆绗竴涓�')
- if(this.queryParams.parentId != ""){
- this.queryParams.equipmentId = ""
- }else{
- if(this.queryParams.equipmentId == this.queryParamEquip.equipmentId){
- this.queryParams.equipmentId = this.typeEquipment
- }else{
- this.queryParams.equipmentId = this.queryParamEquip.equipmentId
- }
- }
- this.ipagination.current = 1
- this.ResetloadData();
- }else{
- console.log('杩涘叆绗簩涓�')
- console.log('绗簩涓殑typeTree',this.queryParams.typeTree)
- this.typeTree = this.queryParams.typeTree
- this.typeParent = this.queryParams.parentId
- // this.typeEquipment = this.queryParams.equipmentId
- this.queryParams = {}
- this.queryParam = {}
- this.dates = []
- this.queryParams.typeTree = this.typeTree
- this.queryParams.parentId = this.typeParent
- // this.queryParams.equipmentId = this.typeEquipment
- this.ipagination.current = 1
- this.ResetloadData();
- }
-
- },
- ResetloadData() {
- if(!this.url.list){
- this.$message.error("璇疯缃畊rl.list灞炴��!")
- return
- }
- //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
- var params = this.getQueryParams();//鏌ヨ鏉′欢
- if(!params){
- return false;
- }
- params.typeTree = this.queryParams.typeTree
- params.parentId = this.queryParams.parentId
- params.equipmentId = this.queryParams.equipmentId
- this.loading = true;
- getAction(this.url.list, params).then((res) => {
- if (res.success) {
- this.dataSource = res.result.records||res.result;
- // this.initDeviceType(this.dataSource)
- //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- // this.dataSource = res.result.records||res.result;
- if(res.result.total)
- {
- this.ipagination.total = res.result.total;
- }else{
- this.ipagination.total = 0;
- }
- //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- }else{
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- })
- },
- handleEdit: function (record) {
- this.$refs.modalFormedit.edit(record);
- this.$refs.modalFormedit.title = "缂栬緫";
- this.$refs.modalFormedit.disableSubmit = false;
- },
- handleTableChange(pagination, filters, sorter) {
- this.dataSource = []
- //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂
- //TODO 绛涢��
- // console.log(pagination)
- if (Object.keys(sorter).length > 0) {
- this.isorter.column = sorter.field;
- this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
- }
- this.ipagination = pagination;
- //鑾峰彇鏌ヨ鏉′欢
- let sqp = {}
- if(this.superQueryParams){
- sqp['superQueryParams']=encodeURI(this.superQueryParams)
- sqp['superQueryMatchType'] = this.superQueryMatchType
- }
- var param = Object.assign(sqp, this.queryParams, this.isorter ,this.filters);
- param.pageNo = this.ipagination.current;
- param.pageSize = this.ipagination.pageSize;
- param.field = this.getQueryField();
- param.parentId = this.queryParams.parentId;
- param.equipmentId = this.queryParams.equipmentId;
- param.startTime = this.queryParam.startTime;
- param.endTime = this.queryParam.endTime;
- getAction(this.url.list,param).then((res) => {
- if(res.success){
- this.dataSource = res.result.records||res.result;
- if(res.result.total)
- {
- this.ipagination.total = res.result.total;
- }else{
- this.ipagination.total = 0;
- }
- }else{
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- })
- },
- searchQueryEdit(){
- if(this.queryParams.typeTree == "1"){
- this.queryParams.parentId = this.queryParamEquip.parentId
- }else{
- this.queryParams.parentId = this.queryParamPeople.parentId
- this.queryParams.equipmentIds = ""
- }
- this.dataSource = [];
- //鑾峰彇鏌ヨ鏉′欢
- let sqp = {}
- if(this.superQueryParams){
- sqp['superQueryParams']=encodeURI(this.superQueryParams)
- sqp['superQueryMatchType'] = this.superQueryMatchType
- }
- var param = Object.assign(sqp, this.queryParams, this.isorter ,this.filters);
- param.pageNo = this.ipagination.current;
- param.pageSize = this.ipagination.pageSize;
- param.field = this.getQueryField();
- param.parentId = this.queryParams.parentId;
- param.equipmentId = this.queryParams.equipmentId;
- param.startTime = this.queryParam.startTime;
- param.endTime = this.queryParam.endTime;
- getAction(this.url.list,param).then((res) => {
- if(res.success){
- this.dataSource = res.result.records||res.result;
- if(res.result.total)
- {
- this.ipagination.total = res.result.total;
- }else{
- this.ipagination.total = 0;
- }
- }else{
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- })
- },
- searchQuery(){
- if(this.queryParams.typeTree == "1"){
- this.queryParams.parentId = this.queryParamEquip.parentId
- // this.queryParams.equipmentId = this.queryParamEquip.equipmentId
- }else{
- this.queryParams.parentId = this.queryParamPeople.parentId
- // this.queryParams.equipmentId = ""
- }
- this.dataSource = [];
- //鑾峰彇鏌ヨ鏉′欢
- let sqp = {}
- if(this.superQueryParams){
- sqp['superQueryParams']=encodeURI(this.superQueryParams)
- sqp['superQueryMatchType'] = this.superQueryMatchType
- }
- var param = Object.assign(sqp, this.queryParams, this.isorter ,this.filters);
- param.pageNo = 1;
- param.pageSize = this.ipagination.pageSize;
- param.field = this.getQueryField();
- param.parentId = this.queryParams.parentId;
- param.equipmentId = this.queryParams.equipmentId;
- param.startTime = this.queryParam.startTime;
- param.endTime = this.queryParam.endTime;
- console.log('param',param);
- getAction(this.url.list,param).then((res) => {
- if(res.success){
- this.dataSource = res.result.records||res.result;
- if(res.result.total)
- {
- this.ipagination.total = res.result.total;
- }else{
- this.ipagination.total = 0;
- }
- }else{
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
-
- }
- }).finally(() => {
- this.loading = false
- })
- },
- handleExportXls(fileName){
- if(!fileName || typeof fileName != "string"){
- fileName = "瀵煎嚭鏂囦欢"
- }
- let param = this.getQueryParams();
- if(this.selectedRowKeys && this.selectedRowKeys.length>0){
- param['selections'] = this.selectedRowKeys.join(",")
- }
- param.pageSize = this.ipagination.pageSize;
- param.field = this.getQueryField();
- param.parentId = this.queryParams.parentId;
- param.equipmentId = this.queryParams.equipmentId;
- param.startTime = this.queryParam.startTime;
- param.endTime = this.queryParam.endTime;
- console.log("瀵煎嚭鍙傛暟",param)
- downFile(this.url.exportXlsUrl,param).then((data)=>{
- if (!data) {
- this.$message.warning("鏂囦欢涓嬭浇澶辫触")
- return
- }
- if (typeof window.navigator.msSaveBlob !== 'undefined') {
- window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls')
- }else{
- let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'}))
- let link = document.createElement('a')
- link.style.display = 'none'
- link.href = url
- link.setAttribute('download', fileName+'.xls')
- document.body.appendChild(link)
- link.click()
- document.body.removeChild(link); //涓嬭浇瀹屾垚绉婚櫎鍏冪礌
- window.URL.revokeObjectURL(url); //閲婃斁鎺塨lob瀵硅薄
- }
- })
- },
- loadData(arg) {
- if(!this.url.list){
- this.$message.error("璇疯缃畊rl.list灞炴��!")
- return
- }
- //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
- if (arg === 1) {
- this.ipagination.current = 1;
- }
- var params = this.getQueryParams();//鏌ヨ鏉′欢
- if(!params){
- return false;
- }
- this.loading = true;
- getAction(this.url.list, params).then((res) => {
- if (res.success) {
- this.dataSource = res.result.records||res.result;
- // this.initDeviceType(this.dataSource)
- //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- // this.dataSource = res.result.records||res.result;
- if(res.result.total)
- {
- this.ipagination.total = res.result.total;
- }else{
- this.ipagination.total = 0;
- }
- //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- }else{
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- })
- },
- modalFormOk(val) {
- // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- this.searchQueryEdit();
- // this.$emit('openBasetree','')
- this.selectedRowKeys = []
- },
- handleDelete: function (id) {
- if(!this.url.delete){
- this.$message.error("璇疯缃畊rl.delete灞炴��!")
- return
- }
- var that = this;
- deleteAction(that.url.delete, {id: id}).then((res) => {
- if (res.success) {
- //閲嶆柊璁$畻鍒嗛〉闂
- that.reCalculatePage(1)
- // that.$message.success(res.message);
- that.$notification.success({
- message:'娑堟伅',
- description:res.message
- });
- that.searchQuery();
- } else {
- // that.$message.warning(res.message);
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- });
- },
- batchDel: function () {
- if(!this.url.deleteBatch){
- this.$message.error("璇疯缃畊rl.deleteBatch灞炴��!")
- return
- }
- if (this.selectedRowKeys.length <= 0) {
- // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒');
- this.$notification.warning({
- message:'娑堟伅',
- description:"璇烽�夋嫨涓�鏉¤褰�"
- });
- return;
- } else {
- var ids = "";
- for (var a = 0; a < this.selectedRowKeys.length; a++) {
- ids += this.selectedRowKeys[a] + ",";
- }
- var that = this;
- this.$confirm({
- title: "纭鍒犻櫎",
- content: "鏄惁鍒犻櫎閫変腑鏁版嵁?",
- onOk: function () {
- that.loading = true;
- deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => {
- if (res.success) {
- //閲嶆柊璁$畻鍒嗛〉闂
- that.reCalculatePage(that.selectedRowKeys.length)
- // that.$message.success(res.message);
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- that.loadData();
- that.onClearSelected();
- } else {
- // that.$message.warning(res.message);
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- that.loading = false;
- });
- }
- });
- }
- },
- handleAdd() {
- console.log(this.$refs.modalForm.edit)
- this.$refs.modalForm.add(this.node)
- this.$refs.modalForm.title = '鏂板'
- this.$refs.modalForm.disableSubmit = false
- },
- handleAddXIU() {
- this.$refs.modalFormadd.add()
- this.$refs.modalFormadd.title = '鏂板'
- this.$refs.modalFormadd.disableSubmit = false
- },
- pQuery(parentId) {
- this.queryParam.parentId = parentId[0]
- if(this.selectedRowKeys.length >= 1) {
- this.selectedRowKeys.length = 0
- }
- this.loadData()
- },
- onSelectChange(selectedRowKeys) {
- this.selectedRowKeys = selectedRowKeys
- },
- initEquipment(id) {
- let _this = this
- getAction(this.url.getEquipmentByPid, { pid: id }).then((res) => {
- if (res.success) {
- if (res.result) {
- _this.$set(this.queryParams, 'equipmentName', res.result.equipmentName)
- _this.$set(this.queryParams, 'equipmentId', res.result.equipmentId)
- _this.equipment = res.result
- _this.searchQuery()
- } else {
- // _this.$message.warning('璇烽厤缃澶囷紒')
- _this.$notification.warning({
- message:'娑堟伅',
- description:'璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒'
- });
- }
- }
- })
- },
- exportExcel() {
- $("#DeviceList").table2excel({
- exclude: ".noExl",
- name: "Excel Document Name",
- filename: "鎵煩閰嶇疆",
- exclude_img: true,
- fileext: ".xls",
- exclude_links: true,
- exclude_inputs: true
- });
- },
-
- /**
- * 褰撴祻瑙堝櫒鍙绐楀彛灏哄鍙戠敓鏀瑰彉鏃惰Е鍙�
- */
- handleWindowResize(){
- const boxHeight = +window.getComputedStyle(document.getElementById('DeviceList')).height.slice(0,-2)
- const tableHeadHeight = +window.getComputedStyle(document.querySelector('.ant-table-thead th')).height.slice(0,-2)
- this.scrollY = boxHeight - tableHeadHeight - 50
- }
- // /**
- // * 杞﹂棿閫変腑椤瑰彇娑堝悗瑙﹀彂姝や簨浠讹紝鐢盉aseTree缁勪欢鐢变簨浠舵�荤嚎瑙﹀彂
- // * @param value 鎻愮ず淇℃伅
- // */
- // treeClearSelected(value){
- // this.queryParams.equipmentId=''
- // this.queryParams.parentId=''
- // this.ResetloadData()
- // }
- },
- created() {
- this.queryParam.typeTree = "1"
- // this.$bus.$on('treeClearSelected',this.treeClearSelected)
- },
- mounted(){
- window.addEventListener('resize',this.handleWindowResize)
- this.handleWindowResize()
- },
- beforeDestroy(){
- window.removeEventListener('resize',this.handleWindowResize)
- }
- }
-</script>
-
-<style lang="less" scoped>
- @import '~@assets/less/common.less';
-
- .device_list{
- overflow: hidden;
- display: flex;
- flex-direction: column;
- }
-
- @media screen and (min-width: 1920px){
- .device_list{
- height: 811px!important;
- }
- }
- @media screen and (min-width: 1680px) and (max-width: 1920px){
- .device_list{
- height: 811px!important;
- }
- }
- @media screen and (min-width: 1400px) and (max-width: 1680px){
- .device_list{
- height: 663px!important;
- }
- }
- @media screen and (min-width: 1280px) and (max-width: 1400px){
- .device_list{
- height: 564px!important;
- }
- }
- @media screen and (max-width: 1280px){
- .device_list{
- height: 564px!important;
- }
- }
-</style>
diff --git a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue
deleted file mode 100644
index ee2f506..0000000
--- a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue
+++ /dev/null
@@ -1,385 +0,0 @@
-<template>
- <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading"
- :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴">
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="璁惧缁�" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]"
- @search="deviceSearch" enter-button placeholder="璇烽�夋嫨璁惧"/>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="璇烽�夋嫨鏃堕棿"
- v-decorator="['torqueDate', validatorRules.torqueDate]" style="width: 100%"></j-date>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="鎵煩鍊�" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input-number :min="0" :disabled="disableSubmit" placeholder="璇疯緭鍏ユ壄鐭╁��"
- v-decorator="['torqueValue', validatorRules.torqueValue]"/>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="杩涚粰鍙傛暟" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input placeholder="璇疯緭鍏ヨ繘缁欏弬鏁�" v-decorator="['feedParameter', validatorRules.feedParameter]"></a-input>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="24">
- <a-form-item label="澶囨敞" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
- <a-textarea :maxLength="20" v-decorator="['notes', validatorRules.notes]"
- placeholder="璇疯緭鍏ュ娉�"></a-textarea>
- </a-form-item>
- </a-col>
- </a-row>
- </a-form>
- </a-spin>
- <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'閫夋嫨璁惧'"/>
- </a-modal>
-</template>
-
-<script>
- import moment from 'moment'
- import pick from 'lodash.pick'
- import TorqueconfigurationModalList from './TorqueconfigurationModalList'
- // import JDate from './JDate'
- import {
- getAction,
- postAction,
- requestPut
- } from '@/api/manage'
- import {
- duplicateCheck
- } from '@/api/api'
- import SelectDeviceDrawer from '../../../../system/modules/SelectDeviceDrawer'
-
- export default {
- name: 'TorqueconfigurationModal',
- components: { SelectDeviceDrawer },
- props: {},
- data() {
- return {
- mesag: 21,
- readOnly: true,
- title: '',
- visible: false,
- show: false,
- model: {},
- checked: false,
- startData: '',
- endData: '',
- labelCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 6
- }
- },
- wrapperCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 18
- }
- },
- labelColLong: {
- xs: {
- span: 24
- },
- sm: {
- span: 3
- }
- },
- wrapperColLong: {
- xs: {
- span: 24
- },
- sm: {
- span: 21
- }
- },
- confirmLoading: false,
- form: this.$form.createForm(this),
- validatorRules: {
- equipmentIds: {
- rules: [
- {
- required: true,
- message: '璇烽�夋嫨璁惧'
- }
- ]
- },
- torqueDate: {
- rules: [
- {
- required: true,
- message: '璇烽�夋嫨鏃堕棿'
- }
- ]
- },
- torqueValue: {
- rules: [
- {
- required: true,
- message: '璇疯緭鍏ユ壄鐭╁��'
- }
- ]
- },
- feedParameter:{
- rules:[
- {
- required:true,
- message:'璇疯緭鍏ヨ繘缁欏弬鏁�'
- }
- ]
- }
- },
-
- url: {
- add: '/mdc/MdcTorqueConfig/addMdcTorqueConfig',
- edit: '/mdc/MdcTorqueConfig/editMdcTorqueConfig'
- },
-
- disableSubmit: true,
- partCategoryCascade: [],
- cascadeDefaultValue: []
- }
- },
- created() {
- },
-
- methods: {
- // disabledDate(current){
- // //Can not slect days before today and today
- // // return current && current < moment().endOf("day");
- // return current < moment().subtract(+1, 'day')//浠婂ぉ涔嬪墠鐨勫勾鏈堟棩涓嶅彲閫夛紝涓嶅寘鎷粖澶�
- // },
- moment,
- // onChange(dates) {
- // // console.log(111)
- // // console.log(dates,dateStrings)
- // // console.log('From: ', dates[0], ', to: ', dates[1]);
- // // console.log('From: ', dateStrings[0], ', to: ', dateStrings[1]);
- // // this.startTime = dateStrings[0];
- // // this.endData = dateStrings[1];
- // // console.log(this.startData,this.endData);
- // },
- onChangeEnd(dates, dateStrings) {
- this.endTime = dateStrings[0]
- },
- getDeviceRows(val) {
- var equipmentIds
- for (var i = 0; i < val.length; i++) {
- if (i == 0) {
- equipmentIds = val[i].equipmentId
- } else {
- equipmentIds = equipmentIds + ',' + val[i].equipmentId
- }
- }
- // console.log("========",equipmentIds);
- this.form.setFieldsValue({
- equipmentIds: equipmentIds
- })
- // this.form.setFieldsValue({
- // equipmentId: val.equipmentId,
- // equipmentName: val.equipmentName,
- // equipmentModel: val.equipmentModel,
- // equipmentIp: val.equipmentIp,
- // dataPort: val.dataPort,
- // driveType: val.driveType
- // })
- },
- deviceSearch() {
- this.$refs.selectDeviceDrawer.visible = true
- this.$refs.selectDeviceDrawer.selectedRowKeys = []
- this.$refs.selectDeviceDrawer.selectedRows = []
- this.$refs.selectDeviceDrawer.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : []
- },
- //绾ц仈妗唎nChange浜嬩欢
- // onChange(value) {
- //
- // },
- getParentIdsById(id) {
- let that = this
- getAction(this.url.getParentIdsById, {
- id: id
- }).then((res) => {
- if (res.success) {
- that.form.setFieldsValue({
- partCategoryId: res.result
- })
- }
- })
- },
- add(node) {
- let _this = this
- this.visible = true
- this.form.resetFields()
- this.model = {}
- this.$nextTick(() => {
- // _this.form.setFieldsValue({ 'tierType': node.entity.tierType + 1, 'parentName': node.title })
- // _this.model.parentId = node.key
- })
- },
- edit(record) {
- this.form.resetFields()
- this.model = Object.assign({}, record)
- this.visible = true
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'equipmentIds', 'equipmentName', 'mdcRepairType', 'startTime', 'endTime'
- ))
- })
- },
- close() {
- this.$emit('close')
- this.visible = false
- this.show = false
- },
- handleOk() {
- const that = this
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.form.validateFields((err, values) => {
- if (!err) {
- that.confirmLoading = true
- let formData = Object.assign(this.model, values)
- // let start = moment(formData.startTime).format('YYYY-MM-DD HH:mm:ss');
- // let end = moment(formData.endTime).format('YYYY-MM-DD HH:mm:ss');
- // let startOne = start.replace(/:/g,'');
- // let endOne = end.replace(/:/g,'');
- // var data = new Date();
- // let stertDate = moment(data).format("YYYY-MM-DD HH:mm:ss");
- // let dataStart = stertDate.replace(/:/g,'');
- // if(startOne < dataStart){
- // that.$message.warning("寮�濮嬫椂闂翠笉鑳藉皬浜庡綋鍓嶆椂闂�")
- // that.confirmLoading = false
- // }else{
- // if(startOne>=endOne){
- // that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�");
- // // console.log(this.model)
- // // this.endTime = ''
- // that.confirmLoading = false
- // }else{
- let obj
- if (!this.model.id) {
- obj = postAction(this.url.add, formData)
- } else {
- obj = requestPut(this.url.edit, formData, {
- id: this.model.id
- })
- }
- obj.then((res) => {
- if (res.success) {
- // that.$message.success("娣诲姞鎴愬姛")
- that.$notification.success({
- message: '娑堟伅',
- description: '娣诲姞鎴愬姛'
- })
- // that.$message.success(res.message)
- that.$emit('ok', res.result)
- } else {
- // that.$message.warning(res.message)
- that.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- that.confirmLoading = false
- that.close()
- })
- }
- // }
-
- // }
- })
- },
- handleCancel() {
- this.close()
- },
- // loadCascade() {
- // getAction(this.url.loadCascadeData).then((res) => {
- // if (res.success) {
- // this.partCategoryCascade = res.result
- // }
- // })
- // },
- onCascadeChange(value, selectedOptions) {
- this.cascadeDefaultValue = [...value]
- },
- filter(inputValue, path) {
- return path.some(option => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1)
- },
- //楠岃瘉 缂栫爜
- validateNum(rule, value, callback) {
- var params = {
- tableName: 'lxmes_base_part',
- fieldName: 'num',
- fieldVal: value,
- dataId: this.model.id,
- //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
- delFlag: 'true'
- }
- duplicateCheck(params).then((res) => {
- if (res.success) {
- callback()
- } else {
- callback('瀛樿揣缂栫爜宸插瓨鍦�!')
- }
- })
- },
- checkboxChange(e) {
- this.checked = e.target.checked
- },
-
- /**
- * 閫夋嫨宸叉湁璁惧鍚庣偣鍑荤‘瀹氭椂瑙﹀彂
- * @param data 宸查�夋嫨鐨勮澶�
- */
- selectOK(data) {
- // let params = {}
- // params.equipmentIdList = []
- // for (var a = 0; a < data.length; a++) {
- // params.equipmentIdList.push(data[a])
- // }
- console.log('data=', data)
- this.form.setFieldsValue({
- equipmentIds: data.join(',')
- })
- }
-
- }
- }
-</script>
-
-<style scoped lang="less">
- .ant-btn {
- padding: 0 10px;
- margin-left: 3px;
- }
-
- .ant-form-item-control {
- line-height: 0px;
- }
-
- /** 涓昏〃鍗曡闂磋窛 */
- .ant-form .ant-form-item {
- margin-bottom: 10px;
- }
-
- /** Tab椤甸潰琛岄棿璺� */
- .ant-tabs-content .ant-form-item {
- margin-bottom: 0px;
- }
-
- /deep/ .ant-input-number {
- width: 100% !important;
- }
-</style>
diff --git a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalEdit.vue b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalEdit.vue
deleted file mode 100644
index ba239b5..0000000
--- a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalEdit.vue
+++ /dev/null
@@ -1,372 +0,0 @@
-<template>
- <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading"
- :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴">
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="璁惧缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="disableSubmit" :readOnly="readOnly" allow-clear placeholder="璇疯緭鍏ヨ澶囩紪鍙�"
- v-decorator="['equipmentId',validatorRules.equipmentId]"/>
- </a-form-item>
- </a-col>
-
- <a-col :span="12">
- <a-form-item label="璁惧鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="disableSubmit" :readOnly="readOnly" allow-clear placeholder="璇疯緭鍏ヨ澶囧悕绉�"
- v-decorator="['equipmentName',validatorRules.equipmentName]"/>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="璇烽�夋嫨鏃堕棿"
- class="query-group-cust" v-decorator="['torqueDate', validatorRules.torqueDate]" style="width: 100%"></j-date>
- </a-form-item>
- </a-col>
-
- <a-col :span="12">
- <a-form-item label="鎵煩鍊�" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input-number :min="0" :disabled="disableSubmit" placeholder="璇疯緭鍏ユ壄鐭╁��"
- v-decorator="['torqueValue', validatorRules.torqueValue]"/>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="杩涚粰鍙傛暟" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input placeholder="璇疯緭鍏ヨ繘缁欏弬鏁�" v-decorator="['feedParameter', validatorRules.feedParameter]"></a-input>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-form-item label="澶囨敞" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
- <a-textarea :maxLength="20" :disabled="disableSubmit" v-decorator="['notes', validatorRules.notes]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea>
- </a-form-item>
- </a-row>
- </a-form>
- </a-spin>
- <!--<device-repair-list-model ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></device-repair-list-model>-->
- <!--<device-repair-edit-list-model ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></device-repair-edit-list-model>-->
- </a-modal>
-</template>
-
-<script>
- import moment from 'moment'
- import pick from 'lodash.pick'
- // import DeviceRepairListModel from './DeviceRepairListModel'
- // import DeviceRepairEditListModel from './DeviceRepairEditListModel'
- // import JDate from './JDate'
- import {
- getAction,
- postAction,
- requestPut
- } from '@/api/manage'
- import {
- duplicateCheck
- } from '@/api/api'
-
- export default {
- name: 'TorqueconfigurationModalEdit',
- // components: {DeviceRepairListModel,JDate,DeviceRepairEditListModel},
- props: {},
- data() {
- return {
- readOnly:true,
- title: '',
- visible: false,
- show: false,
- model: {},
- checked: false,
- startData:"",
- endData:"",
- labelCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 6
- }
- },
- wrapperCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 18
- }
- },
- labelColLong: {
- xs: {
- span: 24
- },
- sm: {
- span: 3
- }
- },
- wrapperColLong: {
- xs: {
- span: 24
- },
- sm: {
- span: 21
- }
- },
- confirmLoading: false,
- form: this.$form.createForm(this),
- validatorRules: {
- equipmentId:{
- rules:[
- {
- required:true,
- message: ""
- },
- ],
- },
- equipmentName:{
- rules:[
- {
- required:true,
- message: ""
- },
- ],
- },
- torqueDate:{
- rules:[
- {
- required:true,
- message: "璇烽�夋嫨鏃堕棿"
- },
- ],
- },
- torqueValue:{
- rules:[
- {
- required:true,
- message: "璇疯緭鍏ユ壄鐭╁��"
- },
- ],
- },
- feedParameter:{
- rules:[
- {
- required:true,
- message:'璇疯緭鍏ヨ繘缁欏弬鏁�'
- }
- ]
- }
- // mdcRepairType:{
- // rules:[
- // {
- // required:true,
- // message: ""
- // },
- // ],
- // initialValue: '浼戠彮'
- // }
- },
-
- url: {
- add: '/mdc/mdcEquipmentRepair/add',
- edit: '/mdc/MdcTorqueConfig/editMdcTorqueConfig'
- },
-
- disableSubmit: true,
- partCategoryCascade: [],
- cascadeDefaultValue: [],
- editStart:''
- }
- },
- created() {
- },
-
- methods: {
- disabledDate(current){
- //Can not slect days before today and today
- // return current && current < moment().endOf("day");
- return current < moment().subtract(+1, 'day')//浠婂ぉ涔嬪墠鐨勫勾鏈堟棩涓嶅彲閫夛紝涓嶅寘鎷粖澶�
- },
- moment,
- // onChange(dates) {
- // console.log(111)
- // console.log(dates,dateStrings)
- // // console.log('From: ', dates[0], ', to: ', dates[1]);
- // // console.log('From: ', dateStrings[0], ', to: ', dateStrings[1]);
- // // this.startTime = dateStrings[0];
- // // this.endData = dateStrings[1];
- // // console.log(this.startData,this.endData);
- // },
- onChangeEnd(dates, dateStrings){
- this.endTime = dateStrings[0];
- },
- getDeviceRows(val) {
- this.form.setFieldsValue({
- equipmentId: val.equipmentId,
- equipmentName: val.equipmentName,
- // // equipmentModel: val.equipmentModel,
- // // equipmentIp: val.equipmentIp,
- // // dataPort: val.dataPort,
- // // driveType: val.driveType
- })
- // var equipmentIds;
- // for(var i = 0;i<val.length;i++){
- // if (i == 0) {
- // equipmentIds = val[i].equipmentId;
- // } else {
- // equipmentIds = equipmentIds + "," + val[i].equipmentId;
- // }
- // }
- // console.log("========",equipmentIds);
- // this.form.setFieldsValue({
- // equipmentId: equipmentIds,
- // })
- },
- deviceSearch() {
- this.$refs.deviceRepairListModel.openPage()
- this.$refs.deviceRepairListModel.title = '閫夋嫨璁惧'
- this.$refs.deviceRepairListModel.disableSubmit = false
- },
- //绾ц仈妗唎nChange浜嬩欢
- // onChange(value) {
- //
- // },
- getParentIdsById(id) {
- let that = this
- getAction(this.url.getParentIdsById, {
- id: id
- }).then((res) => {
- if (res.success) {
- that.form.setFieldsValue({
- partCategoryId: res.result
- })
- }
- })
- },
- add(node) {
- let _this = this
- this.visible = true
- this.form.resetFields()
- this.model = {}
- this.$nextTick(() => {
- // _this.form.setFieldsValue({ 'tierType': node.entity.tierType + 1, 'parentName': node.title })
- // _this.model.parentId = node.key
- })
- },
- edit(record) {
- this.form.resetFields()
- this.model = Object.assign({}, record)
- // this.editStart = (this.model.startTime).replace(/:/g,'');
- this.visible = true
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model,'equipmentId', 'equipmentName','torqueDate', 'torqueValue','feedParameter','notes'
- ))
- })
- },
- close() {
- this.$emit('close')
- this.visible = false
- this.show = false
- },
- handleOk() {
- const that = this
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.form.validateFields((err, values) => {
- if (!err) {
- that.confirmLoading = true
- let formData = Object.assign(this.model, values)
- let obj
- if (!this.model.id) {
- obj = postAction(this.url.add, formData)
- } else {
- obj = requestPut(this.url.edit, formData, {
- id: this.model.id
- })
- }
- obj.then((res) => {
- if (res.success) {
- // that.$message.success("淇敼鎴愬姛")
- that.$notification.success({
- message:'娑堟伅',
- description:"淇敼鎴愬姛"
- });
- // that.$message.success(res.message)
- that.$emit('ok', res.result)
- } else {
- // that.$message.warning(res.message)
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- that.confirmLoading = false
- that.close()
- })
- }
- })
- },
- handleCancel() {
- this.close()
- },
- // loadCascade() {
- // getAction(this.url.loadCascadeData).then((res) => {
- // if (res.success) {
- // this.partCategoryCascade = res.result
- // }
- // })
- // },
- onCascadeChange(value, selectedOptions) {
- this.cascadeDefaultValue = [...value]
- },
- filter(inputValue, path) {
- return path.some(option => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1)
- },
- //楠岃瘉 缂栫爜
- validateNum(rule, value, callback) {
- var params = {
- tableName: 'lxmes_base_part',
- fieldName: 'num',
- fieldVal: value,
- dataId: this.model.id,
- //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
- delFlag: 'true'
- }
- duplicateCheck(params).then((res) => {
- if (res.success) {
- callback()
- } else {
- callback('瀛樿揣缂栫爜宸插瓨鍦�!')
- }
- })
- },
- checkboxChange(e) {
- this.checked = e.target.checked
- }
- }
- }
-</script>
-
-<style scoped lang="less">
- .ant-btn {
- padding: 0 10px;
- margin-left: 3px;
- }
-
- .ant-form-item-control {
- line-height: 0px;
- }
-
- /** 涓昏〃鍗曡闂磋窛 */
- .ant-form .ant-form-item {
- margin-bottom: 10px;
- }
-
- /** Tab椤甸潰琛岄棿璺� */
- .ant-tabs-content .ant-form-item {
- margin-bottom: 0px;
- }
- /deep/ .ant-input-number{
- width: 100%!important;
- }
-</style>
diff --git a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalList.vue b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalList.vue
deleted file mode 100644
index 3191785..0000000
--- a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalList.vue
+++ /dev/null
@@ -1,340 +0,0 @@
-
-<template>
- <a-modal :title="title" width="70%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
- cancelText="鍏抽棴">
- <a-card :bordered="false">
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="6" :sm="6" v-if="isDepartType == 0">
- <a-form-item label="閮ㄩ棬" v-if="isDepartType == 0">
- <!--<a-select v-model="queryParam.sectionPid" placeholder="璇烽�夋嫨閮ㄩ棬" :options="sectionPData" @change="initGroupOptions" />-->
- <a-tree-select
- v-model="value"
- style="width: 100%"
- :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
- :tree-data="treeData"
- placeholder="璇烽�夋嫨閮ㄩ棬"
- tree-default-expand-all
- >
- <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">-->
- <!--Child Node1 {{ value }}-->
- <!--</span>-->
- </a-tree-select>
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="6">
- <a-form-item label="杞﹂棿" >
- <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨鍥㈤槦" :options="sectionData"/>-->
- <a-tree-select
- v-model="valueProduct"
- style="width: 100%"
- :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
- :tree-data="sectionData"
- placeholder="璇烽�夋嫨杞﹂棿"
- tree-default-expand-all
- >
- <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">-->
- <!--Child Node1 {{ value }}-->
- <!--</span>-->
- </a-tree-select>
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="6">
- <a-form-item label="缁熶竴缂栫爜">
- <a-input placeholder="璇疯緭鍏ョ粺涓�缂栫爜妫�绱�" v-model="queryParam.equipmentId"></a-input>
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="6">
- <a-form-item label="璁惧鍚嶇О">
- <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉版绱�" v-model="queryParam.equipmentName"></a-input>
- </a-form-item>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
- </div>
- <!-- table鍖哄煙-begin -->
- <div>
- <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 400聽}" :columns="columns"
- :dataSource="dataSource" :pagination="ipagination" :loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
- @change="handleTableChange">
- </a-table>
- </div>
- <!-- table鍖哄煙-end -->
- </a-card>
- </a-modal>
-</template>
-
-<script>
- import {mapActions} from 'vuex'
- import {
- ajaxGetSelectItems
- } from '@/api/api'
- import JDictSelectTag from '@/components/dict/JDictSelectTag'
- import {
- deleteAction,
- requestPut,
- getAction,
- postAction
- } from '@/api/manage'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
- import JInput from '@/components/jeecg/JInput'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import Tooltip from 'ant-design-vue/es/tooltip'
- import JDate from '@/components/jeecg/JDate'
- import moment from 'moment'
-
- export default {
- name: 'DeviceCalendarListModel',
- mixins: [JeecgListMixin],
- components: {
- JDictSelectTag,
- JEllipsis,
- JInput,
- Tooltip,
- JDate
- },
- props: {
- status: {
- type: Number,
- default: 1
- }
- },
- data() {
- return {
- isDepartType:'',
- /*readOnly:true,*/
- title:'',
- visible: false,
- SelectedList:[],
- treeData:[],
- /*disableMixinCreated: true,
- queryParam: {},*/
- columns: [
- {
- title: '#',
- dataIndex: '',
- key: 'rowIndex',
- width: 60,
- align: "center",
- customRender: function (t, r, index) {
- return parseInt(index) + 1;
- }
- },{
-
- title: '缁熶竴缂栫爜',
- align: 'center',
- dataIndex: 'equipmentId',
- },
- {
- title: '璁惧鍚嶇О',
- align: 'center',
- dataIndex: 'equipmentName',
- },
- {
- title: '椹卞姩绫诲瀷',
- align: 'center',
- dataIndex: 'driveType'
- },
- {
- title: '鏁版帶绯荤粺',
- align: 'center',
- dataIndex: 'controlSystem'
- },
- ],
- sectionPData: [],
- sectionData: [],
- url: {
- list: '/mdc/mdcEquipment/findEquipmentList',
- loadOptions: '/sys/sysDepart/loadDepartTreeOptions',
- loadProductionOptions:'/mdc/mdcProduction/loadProductionTreeOptions'
- },
- value:undefined,
- valueProduct:undefined
- }
- },
- created() {
- this.queryTreeData()
- },
- watch: {
- value(value) {
- // console.log(value);
- this.queryParam.departId = value
- },
- valueProduct(value){
- this.queryParam.productionId = value
- }
- },
- methods: {
- ...mapActions(['QueryDepartTree']),
- queryTreeData() {
- this.QueryDepartTree().then(res => {
- if (res.success) {
- this.isDepartType = res.result[0].value
- } else {
- // this.$message.warn(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() =>{
- })
- },
- onSelectChange(selectedRowKeys, selectionRows) {
- // this.SelectedList.push(selectedRowKeys);
- this.selectedRowKeys = selectedRowKeys;
- this.selectionRows = selectionRows
- // this.SelectedList =[...this.SelectedList,...selectionRows];
- // console.log(this.SelectedList);
- },
- handleTableChange(pagination, filters, sorter) {
- // this.onClearSelected()
- //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂
- //TODO 绛涢��
- if (Object.keys(sorter).length > 0) {
- this.isorter.column = sorter.field;
- this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
- }
- this.ipagination = pagination;
- this.loadData();
- },
- openPage() {
- this.visible = true
- this.onClearSelected()
- this.dataSource = [];
- this.queryParam = {
- status: this.status
- };
-
- this.loadData();
- this.initOptions();
- this.initGroupOptions()
- },
- loadData(arg) {
- if(!this.url.list){
- this.$message.error("璇疯缃畊rl.list灞炴��!")
- return
- }
- //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
- if (arg === 1) {
- this.ipagination.current = 1;
- }
- var params = this.getQueryParams();//鏌ヨ鏉′欢
-
- if(!params){
- return false;
- }
-
- this.loading = true;
- getAction(this.url.list, params).then((res) => {
- if (res.success) {
- // console.log(res)
- //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- this.dataSource = res.result.records||res.result;
- if(res.result.total)
- {
- this.ipagination.total = res.result.total;
- }else{
- this.ipagination.total = 0;
- }
- //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- }else{
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- })
- },
- modalFormOk(val) {
- // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- this.loadData();
-
- this.selectedRowKeys = [val.id];
- },
- searchQuery() {
- this.loadData();
- this.onClearSelected()
- },
- searchReset() {
- this.queryParam = {
- status: 1
- };
- this.loadData();
- this.onClearSelected()
- },
- close() {
- this.$emit('close')
- this.visible = false
- },
- handleCancel() {
- this.close()
- },
- handleOk() {
- // this.selectionRows = this.SelectedList;
- // console.log(this.selectionRows);
- this.$emit('sendSelectionRows', this.selectionRows)
- this.close()
- },
- initOptions() {
- getAction(this.url.loadOptions).then(res => {
- if (res.success) {
- this.treeData = res.result
- } else {
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- })
- },
-
-
- initGroupOptions() {
- getAction(this.url.loadProductionOptions).then(res => {
- if (res.success) {
- this.sectionData = res.result
- } else {
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- })
- }
- },
- }
-</script>
-<style>
- @import '~@assets/less/common.less';
-
- .frozenRowClass {
- color: #c9c9c9;
- }
-
- .success {
- color: green;
- }
-
- .error {
- color: red;
- }
-</style>
diff --git a/src/views/mdc/base/modules/WorkshopSignage/EquipmentDetailModal.vue b/src/views/mdc/base/modules/WorkshopSignage/EquipmentDetailModal.vue
deleted file mode 100644
index 8f038ea..0000000
--- a/src/views/mdc/base/modules/WorkshopSignage/EquipmentDetailModal.vue
+++ /dev/null
@@ -1,1542 +0,0 @@
-<template>
- <div ref="wrap" @mouseenter="getModalNode">
- <a-modal
- :title="title"
- width="70%"
- :visible="visible"
- :getContainer="() => this.$refs.wrap"
- @cancel="handleCancel"
- cancelText="鍏抽棴"
- wrap-class-name="full-modal"
- centered
- :footer="null"
- >
- <div
- id="mdcEquiInfo"
- style="padding:1px;"
- >
- <table
- width="100%"
- style="border-collapse: separate;border-spacing:0px; color: #fff"
- >
- <tr>
- <td v-if="this.spindlebeilv != null">
- <div
- class="mdcEquipMon"
- style="width: 250px; height: 200px;margin : 0 auto;padding: 0;"
- align="center"
- >
- 涓昏酱鍊嶇巼
- <div
- id="mdcEquiMoniGauge1"
- ref="chart1"
- style="width: 100%; height: 95%;"
- ></div>
- </div>
- </td>
- <td v-if="this.feedbeilv != null">
- <div
- class="mdcEquipMon"
- style="width: 210px; height: 180px;margin : 0 auto;"
- align="center"
- >
- 杩涚粰鍊嶇巼
- <div
- id="mdcEquiMoniGauge2"
- ref="chart2"
- style="width: 100%; height: 95%;"
- ></div>
- </div>
- </td>
- <td v-if="this.spindleload != null">
- <div
- class="mdcEquipMon"
- style="width: 210px; height: 180px;margin : 0 auto;"
- align="center"
- >涓昏酱璐熻嵎
- <div
- id="mdcEquiMoniGauge3"
- ref="mdcEquiMoniGauge3"
- style="width: 100%; height: 95%;"
- ></div>
- </div>
- </td>
- <td v-if="this.rapidfeed != null">
- <div
- class="mdcEquipMon"
- style="width: 210px; height: 180px;margin : 0 auto;"
- align="center"
- >蹇�熻繘缁欏�嶇巼
- <div
- id="mdcEquiMoniGauge4"
- ref="mdcEquiMoniGauge4"
- style="width: 100%; height: 95%;"
- ></div>
- </div>
- </td>
- </tr>
- <tr>
- <td colspan="5">
- <a-descriptions
- title="鍩虹淇℃伅"
- :column="4"
- >
- <a-descriptions-item label="璁惧缂栧彿">{{resultData.equipmentID|formatDescriptionsItem}}</a-descriptions-item>
- <a-descriptions-item label="璁惧鍚嶇О">{{resultData.equipmentName|formatDescriptionsItem}}</a-descriptions-item>
- <a-descriptions-item label="IP鍦板潃">{{resultData.equipmentIP|formatDescriptionsItem}}</a-descriptions-item>
- <a-descriptions-item label="绔彛鍙�">{{resultData.dataPort|formatDescriptionsItem}}</a-descriptions-item>
- <a-descriptions-item label="绯荤粺鐗堟湰鍙�">{{resultData.systemVersion|formatDescriptionsItem}}</a-descriptions-item>
- <a-descriptions-item label="椹卞姩绫诲瀷">{{resultData.driveType|formatDescriptionsItem}}</a-descriptions-item>
- <a-descriptions-item label="璁惧鍨嬪彿">{{resultData.equipmentModel|formatDescriptionsItem}}</a-descriptions-item>
- <a-descriptions-item label="璁惧绫诲瀷">{{resultData.deviceType|formatDescriptionsItem}}</a-descriptions-item>
- <a-descriptions-item label="璁惧鍔熺巼">{{resultData.devicePower|formatDescriptionsItem}}</a-descriptions-item>
- <a-descriptions-item label="鏈夋晥杞存暟">{{resultData.validAxis|formatDescriptionsItem}}</a-descriptions-item>
- <a-descriptions-item label="鏈�澶ц酱鏁�">{{resultData.maxAxis|formatDescriptionsItem}}</a-descriptions-item>
- <a-descriptions-item label="澶囨敞">{{resultData.remark|formatDescriptionsItem}}</a-descriptions-item>
- </a-descriptions>
-
- <!-- <a-descriptions
- title="杩愯鏁版嵁"
- v-if="driverType != 'LSV2' && driverType != 'ZUOLAN' "
- :column="4"
- >
- <a-descriptions-item label="涓昏酱鍊嶇巼(%)">{{resultData.spindlebeilv}}</a-descriptions-item>
- <a-descriptions-item label="杩涚粰鍊嶇巼(%)">{{resultData.feedbeilv}}</a-descriptions-item>
- <a-descriptions-item label="涓昏酱璐熻嵎(%)">{{resultData.spindleload}}</a-descriptions-item>
- <a-descriptions-item label="涓昏酱杞��(rpm)">{{resultData.spindlespeed}}</a-descriptions-item>
- <a-descriptions-item label="杩涚粰閫熷害(mm/min)">{{resultData.feedrate}}</a-descriptions-item>
- </a-descriptions>
-
- <a-descriptions
- title="杩愯鏁版嵁 for lsv2"
- v-if="driverType == 'LSV2'"
- :column="4"
- >
- <a-descriptions-item label="涓昏酱鍊嶇巼(%)">{{resultData.spindlebeilv}}</a-descriptions-item>
- <a-descriptions-item label="璁惧姝e父杩愯鏃堕棿">{{resultData.equipmentNormalTime}}</a-descriptions-item>
- <a-descriptions-item label="蹇�熻繘缁欏�嶇巼(%)">{{resultData.rapidfeed}}</a-descriptions-item>
- <a-descriptions-item label="NC姝e父杩愯鏃堕棿">{{resultData.nCNormalTime}}</a-descriptions-item>
- <a-descriptions-item label="杩涚粰鍊嶇巼(%)">{{resultData.feedbeilv}}</a-descriptions-item>
- <a-descriptions-item label="璁惧杩愯鏃堕棿">{{resultData.equipmentTime}}</a-descriptions-item>
- <a-descriptions-item label="褰撳墠鍒�鍏峰彿">{{resultData.toolNum}}</a-descriptions-item>
- </a-descriptions> -->
-
- <!-- <a-descriptions
- title="绋嬪簭淇℃伅"
- v-if="driverType != 'LSV2' && driverType != 'ZUOLAN' "
- :column="4"
- >
- <a-descriptions-item label="搴忓垪鍙�">{{resultData.sequencenumber}}</a-descriptions-item>
- <a-descriptions-item
- label="褰撳墠鎵ц浠g爜"
- :span="2"
- >{{resultData.executingcode}}</a-descriptions-item>
- <a-descriptions-item label="宸ヤ欢鍚嶇О">{{resultData.productName}}</a-descriptions-item>
- </a-descriptions> -->
-
- <!-- <a-descriptions
- title="绋嬪簭淇℃伅 for lsv2"
- v-if="driverType == 'LSV2'"
- :column="4"
- >
- <a-descriptions-item label="褰撳墠绋嬪簭">{{resultData.program}}</a-descriptions-item>
- <a-descriptions-item label="绋嬪簭鎵ц鐐�">{{resultData.programPosition}}</a-descriptions-item>
- <a-descriptions-item label="鎿嶄綔妯″紡">{{resultData.operationType}}</a-descriptions-item>
- <a-descriptions-item label="閿欒淇℃伅缂栧彿涓�">{{resultData.firstErrorNum}}</a-descriptions-item>
- <a-descriptions-item label="閿欒淇℃伅涓�">{{resultData.firstError}}</a-descriptions-item>
- <a-descriptions-item label="閿欒淇℃伅">{{resultData.errorinfo}}</a-descriptions-item>
- <a-descriptions-item label="閿欒淇℃伅缂栧彿浜�">{{resultData.secondErrorNum}}</a-descriptions-item>
- <a-descriptions-item label="閿欒淇℃伅浜�">{{resultData.secondError}}</a-descriptions-item>
- </a-descriptions> -->
-
- <!--<a-descriptions
- title="杞寸洃鎺ф暟鎹� fro SIEMENS840DSL"
- v-if="driverType == 'SIEMENS840DSL'"
- :column="4"
- >
- <a-descriptions-item label="X杞存俯搴�">{{resultData.temperatureX}}</a-descriptions-item>
- <a-descriptions-item label="Y杞存俯搴�">{{resultData.temperatureY}}</a-descriptions-item>
- <a-descriptions-item label="Z杞存俯搴�">{{resultData.temperatureZ}}</a-descriptions-item>
- <a-descriptions-item label="A杞存俯搴�">{{resultData.temperatureA}}</a-descriptions-item>
- <a-descriptions-item label="B杞存俯搴�">{{resultData.temperatureB}}</a-descriptions-item>
- <a-descriptions-item label="X杞寸數娴�">{{resultData.equipmentCurrentX}}</a-descriptions-item>
- <a-descriptions-item label="Y杞寸數娴�">{{resultData.equipmentCurrentY}}</a-descriptions-item>
- <a-descriptions-item label="Z杞寸數娴�">{{resultData.equipmentCurrentZ}}</a-descriptions-item>
- <a-descriptions-item label="A杞寸數娴�">{{resultData.equipmentCurrentA}}</a-descriptions-item>
- <a-descriptions-item label="B杞寸數娴�">{{resultData.equipmentCurrentB}}</a-descriptions-item>
- <a-descriptions-item label="X杞撮殢鍔ㄨ宸�">{{resultData.equipmentLagErrorX}}</a-descriptions-item>
- <a-descriptions-item label="Y杞撮殢鍔ㄨ宸�">{{resultData.equipmentLagErrorY}}</a-descriptions-item>
- <a-descriptions-item label="Z杞撮殢鍔ㄨ宸�">{{resultData.equipmentLagErrorZ}}</a-descriptions-item>
- <a-descriptions-item label="A杞撮殢鍔ㄨ宸�">{{resultData.equipmentLagErrorA}}</a-descriptions-item>
- <a-descriptions-item label="B杞撮殢鍔ㄨ宸�">{{resultData.equipmentLagErrorB}}</a-descriptions-item>
- </a-descriptions>
--->
- <!-- <a-descriptions
- title="鍧愭爣淇℃伅 "
- v-if="driverType == 'FANUC'"
- :column="3"
- >
- <a-descriptions-item label="缁濆鍧愭爣X">{{resultData.xabsolute}}</a-descriptions-item>
- <a-descriptions-item label="缁濆鍧愭爣Y">{{resultData.yabsolute}}</a-descriptions-item>
- <a-descriptions-item label="缁濆鍧愭爣Z">{{resultData.zabsolute}}</a-descriptions-item>
- <a-descriptions-item label="鏈哄簥鍧愭爣X">{{resultData.xmachine}}</a-descriptions-item>
- <a-descriptions-item label="鏈哄簥鍧愭爣Y">{{resultData.ymachine}}</a-descriptions-item>
- <a-descriptions-item label="鏈哄簥鍧愭爣Z">{{resultData.zmachine}}</a-descriptions-item>
- </a-descriptions>
-
- <a-descriptions
- title="鍧愭爣淇℃伅 for lsv2"
- v-if="driverType == 'LSV2'"
- :column="4"
- >
- <a-descriptions-item label="X鍧愭爣">{{resultData.xmachine}}</a-descriptions-item>
- <a-descriptions-item label="Y鍧愭爣">{{resultData.ymachine}}</a-descriptions-item>
- <a-descriptions-item label="Z鍧愭爣">{{resultData.zmachine}}</a-descriptions-item>
- <a-descriptions-item label="A鍧愭爣">{{resultData.amachine}}</a-descriptions-item>
- <a-descriptions-item label="B鍧愭爣">{{resultData.bmachine}}</a-descriptions-item>
- <a-descriptions-item label="C鍧愭爣">{{resultData.cmachine}}</a-descriptions-item>
- </a-descriptions>
-
- <a-descriptions
- title="鍧愭爣淇℃伅 for lsv2"
- v-if="driverType == 'LSV2'"
- :column="4"
- >
- <a-descriptions-item label="X鍧愭爣">{{resultData.xmachine}}</a-descriptions-item>
- <a-descriptions-item label="Y鍧愭爣">{{resultData.ymachine}}</a-descriptions-item>
- <a-descriptions-item label="Z鍧愭爣">{{resultData.zmachine}}</a-descriptions-item>
- <a-descriptions-item label="A鍧愭爣">{{resultData.amachine}}</a-descriptions-item>
- <a-descriptions-item label="B鍧愭爣">{{resultData.bmachine}}</a-descriptions-item>
- <a-descriptions-item label="C鍧愭爣">{{resultData.cmachine}}</a-descriptions-item>
- </a-descriptions>
-
- <a-descriptions
- title="鍧愭爣淇℃伅"
- v-if="driverType == 'LSV2'"
- :column="4"
- >
- <a-descriptions-item label="X鍧愭爣">{{resultData.xmachine}}</a-descriptions-item>
- <a-descriptions-item label="Y鍧愭爣">{{resultData.ymachine}}</a-descriptions-item>
- <a-descriptions-item label="Z鍧愭爣">{{resultData.zmachine}}</a-descriptions-item>
- <a-descriptions-item label="A鍧愭爣">{{resultData.amachine}}</a-descriptions-item>
- <a-descriptions-item label="B鍧愭爣">{{resultData.bmachine}}</a-descriptions-item>
- <a-descriptions-item label="C鍧愭爣">{{resultData.cmachine}}</a-descriptions-item>
- </a-descriptions> -->
- <!---鏁版嵁婧愯皟鏁� 鍔ㄦ�佸睍绀� 杩愯鏁版嵁---->
-
- <a-descriptions
- title="杩愯鏁版嵁"
- v-show="mdcDriveTypeParamConfigList != null"
- v-if="driverType != 'PLC'"
- :column="4"
- class="operationData"
- >
-
- <a-descriptions-item
- v-for="(item,id) in mdcDriveTypeParamConfigList "
- :key="item.id"
- :label="item.chineseName"
- >
- <a-tooltip @mouseenter="mouseEnterItem">
- <template slot="title">
- {{item.value|formatDescriptionsItem}}
- </template>
- <div class="description-item-class">{{item.value|formatDescriptionsItem}}</div>
- </a-tooltip>
-
- </a-descriptions-item>
-
- </a-descriptions>
-
- <!--<a-descriptions-->
- <!--title="鍧愭爣淇℃伅"-->
- <!--v-show="xyzAliasesList != null"-->
- <!--v-if="driverType != 'PLC'"-->
- <!--:column="4"-->
- <!-->-->
- <!--<a-descriptions-item-->
- <!--v-for="(item,id) in xyzAliasesList "-->
- <!--:key="item.id"-->
- <!--:label="item.title"-->
- <!-->{{item.value}}</a-descriptions-item>-->
- <!--</a-descriptions>-->
-
- <!--<a-descriptions-->
- <!--title="鐗堟湰淇℃伅 for lsv2"-->
- <!--v-if="driverType == 'LSV2'"-->
- <!--:column="4"-->
- <!--class="lsv2Data"-->
- <!-->-->
- <!--<a-descriptions-item label="NC鐗堟湰">{{resultData.ncversion}}</a-descriptions-item>-->
- <!--<a-descriptions-item label="TNC鐗堟湰">{{resultData.tncversion}}</a-descriptions-item>-->
- <!--<a-descriptions-item label="OPT鐗堟湰">{{resultData.optversion}}</a-descriptions-item>-->
- <!--<a-descriptions-item label="PLC鐗堟湰">{{resultData.plcversion}}</a-descriptions-item>-->
- <!--</a-descriptions>-->
-
- </td>
- </tr>
- </table>
- </div>
- <template slot="footer">
- <a-button
- :style="{ marginRight: '8px' }"
- @click="handleCancel"
- style="color: #1191b0;"
- >鍏抽棴
- </a-button>
- </template>
- </a-modal>
- </div>
-</template>
-
-<script>
- import {
- getAction,
- postAction
- } from '@/api/manage'
- import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
- import Template1 from '../../../../jeecg/JVxeDemo/layout-demo/Template1'
-
- export default {
- name: 'EqumentDetaiModal',
- components: { Template1 },
- props: {},
- data() {
- return {
- mdcDriveTypeParamConfigList: [],
- xyzAliasesList: [],
- title: '',
- //涓昏酱鍊嶇巼
- spindlebeilv: 1,
- //杩涚粰鍊嶇巼
- feedbeilv: 1,
- // 涓昏酱璐熻嵎
- spindleload: 1,
- //蹇�熻繘缁欏�嶇巼
- rapidfeed: 1,
- visible: false,
- resultData: {},
- driverType: '',
- deviceTypeDict: '',
- url: {
- mdcEquipmentDetailedInfo: '/mdc/mdcEquipment/mdcEquipmentDetailedInfo'
- },
- modalTimer: null,
- ee: ' ',
- modalNode: null,
- timeout: null
- }
- },
- mounted() {
-
- },
- watch: {},
- filters:{
- formatDescriptionsItem(value){
- return value?value:'鏃�'
- }
- },
- methods: {
- drawLine() {
- let _this = this
- if (_this.spindlebeilv) {
- //鍩轰簬鍑嗗濂界殑dom锛屽垵濮嬪寲echarts瀹炰緥
- let mdcEquiMoniGauge1 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge1'), 'macarons')
- let mdcEquiMoniGaugeOption1 = {
- tooltip: {
- formatter: '{a} <br/>{b} : {c}%'
- },
-
- series: [{
- name: '澶栭儴绾�',
- type: 'gauge',
- radius: '65%', // 鍔ㄦ��
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#31F3FF'] // 鍔ㄦ��
- ],
- width: 1
- }
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: { //鏍囬
- show: false
- }
- },
- {
- name: '澶栭儴鍒诲害',
- type: 'gauge',
- radius: '80%',
- min: 0, //鏈�灏忓埢搴�
- max: 300, //鏈�澶у埢搴�
- splitNumber: 10, //鍒诲害鏁伴噺
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- show: false,
- lineStyle: {
- color: [
- [1, 'rgba(0,0,0,0)']
- ]
- }
- }, //浠〃鐩樿酱绾�
- axisLabel: {
- show: true,
- color: '#31F3FF',
- fontSize: 10, // 鍔ㄦ��
- distance: -20 // 鍔ㄦ��
-
- }, //鍒诲害鏍囩銆�
- axisTick: {
- show: false
- }, //鍒诲害鏍峰紡
- splitLine: {
- show: false
- }
- },
- {
- name: '鍐呴儴瀹界嚎鏉�',
- type: 'gauge',
- radius: '55%',
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#122B3C']
- ],
- width: 4
- }
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: {
- show: false
- }
- },
- {
- name: '鍐呴儴缁嗙嚎鏉�',
- type: 'gauge',
- radius: '40%',
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#122B3C']
- ],
- width: 3
- }
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: {
- show: false
- }
- },
- {
- name: '闂撮殧鏉″舰',
- type: 'gauge',
- radius: '52.5%',
- z: 4,
- splitNumber: 35,
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- opacity: 0
- }
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false,
- length: 20,
- splitNumber: 1,
- lineStyle: {
- color: '#122B3C',
- width: 1
- }
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: {
- show: false
- }
- },
- {
- name: '鏁版嵁',
- type: 'gauge',
- radius: '52.5%',
- z: 3,
- startAngle: 225,
- max: 300,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [_this.spindlebeilv / 300, '#31F3FF'], // 鍔ㄦ��
- [1, '#185363']
- ],
- width: 4
- }
- },
- tooltip: {
- show: false
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false
- },
- splitLine: {
- show: false
- },
- detail: {
- show: true,
- fontWeight: 'bold',
- fontSize: 12,
- color: '#fff'
- },
- pointer: {
- show: true,
- width: 3,
- itemStyle:{
- color:'#fff'
- }
- },
- data: [{
- name: '',
- value: _this.spindlebeilv
- }]
- },
- // 鍐呭渾
- {
- 'name': '鍐呭渾鐜�',
- 'type': 'pie',
- 'radius': ['4%', '2%'],
- 'hoverAnimation': false,
- tooltip: {
- show: false
- },
- cursor: 'default',
- 'labelLine': {
- 'normal': {
- 'show': false
- }
- },
- itemStyle: {
- color: '#fff'
- },
- animation: false,
- 'data': [1]
- },
- // 鍐呭渾
- {
- 'name': '鍐呭渾鐜�2',
- 'type': 'pie',
- 'radius': '2%',
- 'hoverAnimation': false,
- cursor: 'default',
- tooltip: {
- show: false
- },
- 'labelLine': {
- 'normal': {
- 'show': false
- }
- },
- itemStyle: {
- color: '#31F3FF'
- },
- animation: false,
- 'data': [1]
- }
- ]
- }
- mdcEquiMoniGauge1.setOption(mdcEquiMoniGaugeOption1)
- }
- if (_this.feedbeilv) {
- let mdcEquiMoniGauge2 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge2'), 'macarons')
- let mdcEquiMoniGaugeOption2 = {
- tooltip: {
- formatter: '{a} <br/>{b} : {c}%'
- },
-
- series: [{
- name: '澶栭儴绾�',
- type: 'gauge',
- radius: '65%', // 鍔ㄦ��
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#31F3FF'] // 鍔ㄦ��
- ],
- width: 1
- }
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: { //鏍囬
- show: false
- }
- },
- {
- name: '澶栭儴鍒诲害',
- type: 'gauge',
- radius: '80%',
- min: 0, //鏈�灏忓埢搴�
- max: 300, //鏈�澶у埢搴�
- splitNumber: 10, //鍒诲害鏁伴噺
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- show: false,
- lineStyle: {
- color: [
- [1, 'rgba(0,0,0,0)']
- ]
- }
- }, //浠〃鐩樿酱绾�
- axisLabel: {
- show: true,
- color: '#31F3FF',
- fontSize: 10, // 鍔ㄦ��
- distance: -20 // 鍔ㄦ��
-
- }, //鍒诲害鏍囩銆�
- axisTick: {
- show: false
- }, //鍒诲害鏍峰紡
- splitLine: {
- show: false
- }
- },
- {
- name: '鍐呴儴瀹界嚎鏉�',
- type: 'gauge',
- radius: '55%',
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#122B3C']
- ],
- width: 4
- }
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: {
- show: false
- }
- },
- {
- name: '鍐呴儴缁嗙嚎鏉�',
- type: 'gauge',
- radius: '40%',
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#122B3C']
- ],
- width: 3
- }
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: {
- show: false
- }
- },
- {
- name: '闂撮殧鏉″舰',
- type: 'gauge',
- radius: '52.5%',
- z: 4,
- splitNumber: 35,
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- opacity: 0
- }
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false,
- length: 20,
- splitNumber: 1,
- lineStyle: {
- color: '#122B3C',
- width: 1
- }
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: {
- show: false
- }
- },
- {
- name: '鏁版嵁',
- type: 'gauge',
- radius: '52.5%',
- z: 3,
- startAngle: 225,
- max: 300,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [_this.feedbeilv / 300, '#31F3FF'], // 鍔ㄦ��
- [1, '#185363']
- ],
- width: 4
- }
- },
- tooltip: {
- show: false
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false
- },
- splitLine: {
- show: false
- },
- detail: {
- show: true,
- fontWeight: 'bold',
- fontSize: 12,
- color: '#fff'
- },
- pointer: {
- show: true,
- width: 3,
- itemStyle:{
- color:'#fff'
- }
- },
- data: [{
- name: '',
- value: _this.feedbeilv
- }]
- },
- // 鍐呭渾
- {
- 'name': '鍐呭渾鐜�',
- 'type': 'pie',
- 'radius': ['4%', '2%'],
- 'hoverAnimation': false,
- tooltip: {
- show: false
- },
- cursor: 'default',
- 'labelLine': {
- 'normal': {
- 'show': false
- }
- },
- itemStyle: {
- color: '#fff'
- },
- animation: false,
- 'data': [1]
- },
- // 鍐呭渾
- {
- 'name': '鍐呭渾鐜�2',
- 'type': 'pie',
- 'radius': '2%',
- 'hoverAnimation': false,
- cursor: 'default',
- tooltip: {
- show: false
- },
- 'labelLine': {
- 'normal': {
- 'show': false
- }
- },
- itemStyle: {
- color: '#31F3FF'
- },
- animation: false,
- 'data': [1]
- }
- ]
- }
- mdcEquiMoniGauge2.setOption(mdcEquiMoniGaugeOption2)
- }
- if (_this.spindleload) {
- let mdcEquiMoniGauge3 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge3'), 'macarons')
- let mdcEquiMoniGaugeOption3 = {
- tooltip: {
- formatter: '{a} <br/>{b} : {c}%'
- },
-
- series: [{
- name: '澶栭儴绾�',
- type: 'gauge',
- radius: '65%', // 鍔ㄦ��
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#31F3FF'] // 鍔ㄦ��
- ],
- width: 1
- }
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: { //鏍囬
- show: false
- }
- },
- {
- name: '澶栭儴鍒诲害',
- type: 'gauge',
- radius: '80%',
- min: 0, //鏈�灏忓埢搴�
- max: 100, //鏈�澶у埢搴�
- splitNumber: 10, //鍒诲害鏁伴噺
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- show: false,
- lineStyle: {
- color: [
- [1, 'rgba(0,0,0,0)']
- ]
- }
- }, //浠〃鐩樿酱绾�
- axisLabel: {
- show: true,
- color: '#31F3FF',
- fontSize: 10, // 鍔ㄦ��
- distance: -20 // 鍔ㄦ��
-
- }, //鍒诲害鏍囩銆�
- axisTick: {
- show: false
- }, //鍒诲害鏍峰紡
- splitLine: {
- show: false
- }
- },
- {
- name: '鍐呴儴瀹界嚎鏉�',
- type: 'gauge',
- radius: '55%',
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#122B3C']
- ],
- width: 4
- }
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: {
- show: false
- }
- },
- {
- name: '鍐呴儴缁嗙嚎鏉�',
- type: 'gauge',
- radius: '40%',
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#122B3C']
- ],
- width: 3
- }
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: {
- show: false
- }
- },
- {
- name: '闂撮殧鏉″舰',
- type: 'gauge',
- radius: '52.5%',
- z: 4,
- splitNumber: 35,
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- opacity: 0
- }
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false,
- length: 20,
- splitNumber: 1,
- lineStyle: {
- color: '#122B3C',
- width: 1
- }
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: {
- show: false
- }
- },
- {
- name: '鏁版嵁',
- type: 'gauge',
- radius: '52.5%',
- z: 3,
- startAngle: 225,
- max: 100,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [_this.spindleload / 100, '#31F3FF'], // 鍔ㄦ��
- [1, '#185363']
- ],
- width: 4
- }
- },
- tooltip: {
- show: false
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false
- },
- splitLine: {
- show: false
- },
- detail: {
- show: true,
- fontWeight: 'bold',
- fontSize: 12,
- color: '#fff'
- },
- pointer: {
- show: true,
- width: 3,
- itemStyle:{
- color:'#fff'
- }
- },
- data: [{
- name: '',
- value: _this.spindleload
- }]
- },
- // 鍐呭渾
- {
- 'name': '鍐呭渾鐜�',
- 'type': 'pie',
- 'radius': ['4%', '2%'],
- 'hoverAnimation': false,
- tooltip: {
- show: false
- },
- cursor: 'default',
- 'labelLine': {
- 'normal': {
- 'show': false
- }
- },
- itemStyle: {
- color: '#fff'
- },
- animation: false,
- 'data': [1]
- },
- // 鍐呭渾
- {
- 'name': '鍐呭渾鐜�2',
- 'type': 'pie',
- 'radius': '2%',
- 'hoverAnimation': false,
- cursor: 'default',
- tooltip: {
- show: false
- },
- 'labelLine': {
- 'normal': {
- 'show': false
- }
- },
- itemStyle: {
- color: '#31F3FF'
- },
- animation: false,
- 'data': [1]
- }
- ]
- }
- mdcEquiMoniGauge3.setOption(mdcEquiMoniGaugeOption3)
- }
- if (_this.rapidfeed) {
- let mdcEquiMoniGauge4 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge4'), 'macarons')
- let mdcEquiMoniGaugeOption4 = {
- tooltip: {
- formatter: '{a} <br/>{b} : {c}%'
- },
-
- series: [{
- name: '澶栭儴绾�',
- type: 'gauge',
- radius: '65%', // 鍔ㄦ��
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#31F3FF'] // 鍔ㄦ��
- ],
- width: 1
- }
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: { //鏍囬
- show: false
- }
- },
- {
- name: '澶栭儴鍒诲害',
- type: 'gauge',
- radius: '80%',
- min: 0, //鏈�灏忓埢搴�
- max: 300, //鏈�澶у埢搴�
- splitNumber: 10, //鍒诲害鏁伴噺
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- show: false,
- lineStyle: {
- color: [
- [1, 'rgba(0,0,0,0)']
- ]
- }
- }, //浠〃鐩樿酱绾�
- axisLabel: {
- show: true,
- color: '#31F3FF',
- fontSize: 10, // 鍔ㄦ��
- distance: -20 // 鍔ㄦ��
-
- }, //鍒诲害鏍囩銆�
- axisTick: {
- show: false
- }, //鍒诲害鏍峰紡
- splitLine: {
- show: false
- }
- },
- {
- name: '鍐呴儴瀹界嚎鏉�',
- type: 'gauge',
- radius: '55%',
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#122B3C']
- ],
- width: 4
- }
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: {
- show: false
- }
- },
- {
- name: '鍐呴儴缁嗙嚎鏉�',
- type: 'gauge',
- radius: '40%',
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [1, '#122B3C']
- ],
- width: 3
- }
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: {
- show: false
- }
- },
- {
- name: '闂撮殧鏉″舰',
- type: 'gauge',
- radius: '52.5%',
- z: 4,
- splitNumber: 35,
- startAngle: 225,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- opacity: 0
- }
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false,
- length: 20,
- splitNumber: 1,
- lineStyle: {
- color: '#122B3C',
- width: 1
- }
- },
- splitLine: {
- show: false
- },
- detail: {
- show: false
- },
- title: {
- show: false
- }
- },
- {
- name: '鏁版嵁',
- type: 'gauge',
- radius: '52.5%',
- z: 3,
- startAngle: 225,
- max: 300,
- endAngle: -45,
- axisLine: {
- lineStyle: {
- color: [
- [_this.rapidfeed / 300, '#31F3FF'], // 鍔ㄦ��
- [1, '#185363']
- ],
- width: 4
- }
- },
- tooltip: {
- show: false
- },
- axisLabel: {
- show: false
- },
- axisTick: {
- show: false
- },
- splitLine: {
- show: false
- },
- detail: {
- show: true,
- fontWeight: 'bold',
- fontSize: 12,
- color: '#fff'
- },
- pointer: {
- show: true,
- width: 3,
- itemStyle:{
- color:'#fff'
- }
- },
- data: [{
- name: '',
- value: _this.rapidfeed
- }]
- },
- // 鍐呭渾
- {
- 'name': '鍐呭渾鐜�',
- 'type': 'pie',
- 'radius': ['4%', '2%'],
- 'hoverAnimation': false,
- tooltip: {
- show: false
- },
- cursor: 'default',
- 'labelLine': {
- 'normal': {
- 'show': false
- }
- },
- itemStyle: {
- color: '#fff'
- },
- animation: false,
- 'data': [1]
- },
- // 鍐呭渾
- {
- 'name': '鍐呭渾鐜�2',
- 'type': 'pie',
- 'radius': '2%',
- 'hoverAnimation': false,
- cursor: 'default',
- tooltip: {
- show: false
- },
- 'labelLine': {
- 'normal': {
- 'show': false
- }
- },
- itemStyle: {
- color: '#31F3FF'
- },
- animation: false,
- 'data': [1]
- }
- ]
- }
- mdcEquiMoniGauge4.setOption(mdcEquiMoniGaugeOption4)
- }
- },
-
- handleCancel() {
- this.$emit('close')
- this.visible = false
- // this.modalNode.removeEventListener('mouseleave', this.closeModal)
- if(this.modalTimer){
- clearInterval(this.modalTimer)
- this.modalTimer = null
- }
- if (this.timeout) {
- clearTimeout(this.timeout)
- this.timeout = null
- }
- },
-
- timerModel(id) {
- this.ee = id
- this.modalTimer = setInterval(() => {
- setTimeout(this.initData(this.ee), 0)
- }, 1000 * 4)
- },
-
- initData(id) {
- let _this = this
- this.visible = true
- // _this.drawLine()
- getAction(this.url.mdcEquipmentDetailedInfo, { id: id }).then((res) => {
- if (res.success) {
- _this.resultData = res.result
- _this.driverType = res.result.deviceType
- _this.spindlebeilv = res.result.spindlebeilv
- _this.feedbeilv = res.result.feedbeilv
- _this.spindleload = res.result.spindleload
- _this.rapidfeed = res.result.rapidfeed
- _this.mdcDriveTypeParamConfigList = res.result.mdcDriveTypeParamConfigList
- _this.xyzAliasesList = res.result.xyzAliasesList
- this.$nextTick(() => {
- _this.drawLine()
- })
- // _this.initDeviceType(_this.resultData.deviceType)
- } else {
- // _this.$message.warn(res.message)
- _this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- })
- },
-
- getModalNode() {
- // console.log(document.querySelector('.ant-modal-content'))
- // this.modalNode = document.querySelector('.ant-modal-content')
- // this.timeout = setTimeout(() => {
- // this.modalNode.addEventListener('mouseleave', this.closeModal)
- // }, 100)
- },
-
- closeModal() {
- this.handleCancel()
- },
-
- mouseEnterItem(e){
- if (e.target.clientWidth >= e.target.scrollWidth) e.target.style.pointerEvents = 'none' // 闃绘榧犳爣浜嬩欢 pointer-events 灞炴�х敤浜庤缃厓绱犳槸鍚﹀榧犳爣浜嬩欢鍋氬嚭鍙嶅簲銆�
- }
- },
- beforeDestroy() {
- clearInterval(this.modalTimer)
- this.modalTimer = null
- }
- }
-</script>
-
-<style scoped lang="less">
- body {
- overflow-y: hidden !important;
- }
-
- .full-modal {
- .ant-modal {
- top: 0;
- padding-bottom: 0;
- margin: 0;
- background-color: #4a4a48 !important;
- opacity: 0.9;
- }
- /deep/ .ant-modal-content {
- display: flex;
- flex-direction: column;
- /*height: calc(100vh);*/
- background-color: #4a4a48;
- }
- .ant-modal-body {
- flex: 1;
- }
- }
-
- /deep/ .ant-modal-content {
- /*background: -moz-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.27) 100%);*/
- /*background: -webkit-gradient(linear, left left, right right, color-stop(0%, rgba(0, 0, 0, 0.66)), color-stop(100%, rgba(0, 0, 0, 0.4)));*/
- /*background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: -o-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: -ms-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- background-color: #312c2c;
- opacity: 1;
- }
-
- /deep/ .ant-modal-close {
- color: #1191b0;
- font-size: 24px;
- }
-
- /deep/ .ant-modal-close-x {
- font-size: 24px;
- }
-
- /deep/ .ant-modal-footer {
- border-top: none;
- }
-
- /deep/ .ant-descriptions {
- border: 1px solid #16738d;
- margin: 10px 0;
- }
-
- /deep/ .ant-descriptions-title {
- color: #fff;
- padding: 10px;
- margin-bottom: 0;
- }
-
- /*/deep/ .ant-descriptions-view {*/
- /*padding: 0 20px;*/
- /*}*/
-
- /deep/ .ant-descriptions-view .ant-descriptions-row .ant-descriptions-item {
- padding-bottom: 5px;
- }
-
- /deep/ .ant-descriptions-item-colon {
- color: #fff;
- /*width: 5.1vw;*/
- }
-
- /deep/ .ant-descriptions-item-content {
- color: #fff;
- border: 1px solid #4bcfc8;
- padding: 0 10px;
- min-width: 130px;
- }
-
- .mdcEquipMon {
- color: #fff;
- }
-
- /deep/ .ant-descriptions-item-label{
- width: 6.7vw;
- text-align: right;
- margin-right: 10px;
- }
-
- /deep/ .operationData .ant-descriptions-item-content,
- .lsv2Data .ant-descriptions-item-content
- {
- width: 130px;
- vertical-align: bottom;
- }
-
- .description-item-class{
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
-</style>
diff --git a/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue b/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue
deleted file mode 100644
index 8ee1144..0000000
--- a/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue
+++ /dev/null
@@ -1,543 +0,0 @@
-<template>
- <div class="efficiency_list" style="width: 100%;height: 100%;">
- <div :bordered="false" style="height: 100%">
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="7" :sm="7">
- <a-form-item label="鏃堕棿">
- <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD"
- v-model="dates" :allowClear="false"/>
- </a-form-item>
- </a-col>
- <a-col :lg="2" :md="2" :sm="2" :xs="2">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <div id="DeviceList">
- <div class="openRateTrendDg">
- <a-table :columns="columns" :data-source="dataList" bordered :pagination="false" :scroll="{y:210}"
- :customRow="customRow"
- rowKey="alarmCode" @expand="handleExpandChange" :loading="outerDataLoading"
- >
- <span slot="timeCount" slot-scope="text">{{text | getFormattedTime}}</span>
- <a-table
- slot="expandedRowRender"
- slot-scope="row"
- :columns="innerColumns"
- :data-source="row.innerDataList"
- :pagination="false"
- rowKey="rowIndex"
- :loading="innerDataLoading"
- >
- <span slot="duration" slot-scope="text">{{text | getFormattedTime}}</span>
- </a-table>
- </a-table>
- </div>
-
- <a-spin :spinning="echartLoading">
- <div style="width: 100%;height: 100%;display: flex;">
- <div id="MdcEquipmentWarningPie" style="height: 100%;width: 35%;"></div>
- <div id="MdcEquipmentWarningLine" style="height: 100%;width: 65%;"></div>
- </div>
- </a-spin>
- </div>
- </div>
- </div>
-</template>
-
-<script>
- import moment from 'moment'
- import { putAction, getAction } from '@/api/manage'
- import $ from 'jquery'
- import '@/components/table2excel/table2excel'
- import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
-
- const columns = [
- { title: '鎶ヨ鍙�', dataIndex: 'alarmCode', key: 'alarmCode', align: 'center' },
- { title: '鍑虹幇娆℃暟', dataIndex: 'count', key: 'count', align: 'center', sorter: (a, b) => b.count - a.count },
- {
- title: '鍚堣鎸佺画鏃堕棿',
- dataIndex: 'timeCount',
- key: 'timeCount',
- scopedSlots: { customRender: 'timeCount' },
- align: 'center',
- sorter: (a, b) => b.timeCount - a.timeCount
- },
- { title: '鎶ヨ淇℃伅', dataIndex: 'alarmContent', key: 'alarmContent', align: 'center', ellipsis: true }
- ]
-
- const innerColumns = [
- {
- title: '',
- dataIndex: 'rowIndex',
- key: 'rowIndex',
- width: 60,
- align: 'center',
- customRender: function(t, r, index) {
- return parseInt(index) + 1
- }
- },
- { title: '璁惧缂栧彿', dataIndex: 'equipmentId', key: 'equipmentId', align: 'center' },
- { title: '璁惧鍚嶇О', dataIndex: 'equipmentName', key: 'equipmentName', align: 'center' },
- { title: '鎶ヨ鏃堕棿', dataIndex: 'startTime', key: 'startTime', align: 'center' },
- { title: '缁撴潫鏃堕棿', dataIndex: 'endTime', key: 'endTime', align: 'center' },
- {
- title: '鎸佺画鏃堕棿',
- dataIndex: 'duration',
- key: 'duration',
- scopedSlots: { customRender: 'duration' },
- align: 'center'
- }
- ]
-
- export default {
- // mixins: [JeecgListMixin],
- name: 'alarmAnalysisMain',
- components: {},
- data() {
- return {
- dataSource: [],
- /* table鍔犺浇鐘舵�� */
- outerDataLoading: false,
- innerDataLoading: false,
- echartLoading: false,
- typeTree: '',
- typeParent: 1,
- typeEquipment: 1,
- TreeIDOne: 1,
- TreeIDTwo: 2,
- deviceTypeDict: '',
- dates: [],
- identifying: [],
- queryParam: {},
- queryParams: {},
- queryParamEquip: {},
- queryParamPeople: {},
- efficiencyOptions: [
- { label: '鍒╃敤鐜�', value: 'lyl' },
- { label: '寮�鏈虹巼', value: 'kjl' },
- { label: '寮�鏈烘椂闂�', value: 'kjsj' },
- { label: '鍔犲伐鏃堕棿', value: 'jgsj' },
- { label: '寰呮満鏃堕棿', value: 'djsj' },
- { label: '鍏虫満鏃堕棿', value: 'gjsj' }
- ],
- checkedList: ['lyl'],
- dataList: [],
- url: {
- efficiencyList: '/mdc/alarmAnalyze/alarmList',
- listByType: '/mdc/MdcUtilizationRate/getByType',
- alarmTrend: '/mdc/alarmAnalyze/alarmTrend',
- equipmentAlarmList: '/mdc/alarmAnalyze/equipmentAlarmList'
- },
- tableHeads: [],
- pieDate: [0],
- XData: [0],
- YData: [0],
- columns,
- innerColumns,
- hasRequsetAlarmCodeList: []
- }
- },
- props: { nodeTree: '', Type: '', nodePeople: '' },
- /**
- * 鐢熷懡鍛ㄦ湡 鎸傝浇鍓�
- * */
- created() {
- this.dates = [moment().subtract('days', 8), moment().subtract('days', 1)]
- this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD')
- this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD')
- this.queryParam.typeTree = '1'
- this.loadData1()
-
- },
- mounted() {
- this.drawWrin()
- window.addEventListener('resize', this.handleWindowResize)
- },
- beforeDestroy() {
- window.removeEventListener('resize', this.handleWindowResize)
- },
- watch: {
- Type(valmath) {
- this.dataList = []
- this.queryParam.typeTree = valmath
- },
- nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId != null) {
- this.queryParamEquip.parentId = ''
- this.queryParamEquip.equipmentId = val.equipmentId
- } else {
- this.queryParamEquip.parentId = val.key
- this.queryParamEquip.equipmentId = ''
- }
- /*杩欓噷浣犳槸鐩戝惉鍒版爲寰楀彉鍖� 鏄笉鏄姹備竴娆�*/
- this.searchQuery()
- }
- },
- nodePeople(val) {
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId != null) {
- this.queryParamPeople.parentId = val.equipmentId
- this.queryParamPeople.equipmentId = ''
- } else {
- this.queryParamPeople.parentId = val.key
- this.queryParamPeople.equipmentId = ''
- }
- this.searchQuery()
- }
- }
- },
- filters: {
- numFilter(value) {
- if (value) {
- return parseFloat((value * 100).toFixed(2))
- } else {
- return '0'
- }
- },
-
- /**
- * 鏍煎紡鍖栨椂闂�
- * @param seconds 绉掓暟
- * @returns '' 鏍煎紡鍖栧悗鏃堕棿瀛楃涓�
- */
- getFormattedTime(seconds) {
- var hours = Math.floor(seconds / 3600)
- var minutes = Math.floor((seconds % 3600) / 60)
- var secs = seconds % 60
-
- if (hours === 0) {
- if (minutes === 0) {
- return secs === 0 ? 0 : `${secs}绉抈
- } else {
- if (secs === 0) {
- return `${minutes}鍒哷
- }
- return `${minutes}鍒� ${secs}绉抈
- }
- } else {
- if (minutes === 0 && secs === 0) {
- return `${hours}灏忔椂`
- } else if (minutes !== 0 && secs === 0) {
- return `${hours}灏忔椂 ${minutes}鍒哷
- }
- }
- return `${hours}灏忔椂 ${minutes}鍒� ${secs}绉抈
- }
- },
- methods: {
- numBerTwo(value) {
- if (value) {
- return parseFloat((value * 100).toFixed(2))
- } else {
- return '0'
- }
- },
- TableDraw(key, val) {
- let that = this
- that.echartLoading = true
- that.queryParam.alarmCode = val.alarmCode
- console.log(this.queryParam)
- getAction(that.url.alarmTrend, that.queryParam)
- .then(res => {
- if (res.success) {
- that.pieDate = res.result.equipmentCountList.map(item => {
- return {
- name: item.key,
- value: item.count
- }
- })
- that.XData = res.result.dateCountList.map(item => item.key)
- that.YData = res.result.dateCountList.map(item => item.count)
-
- // this.tableHeads = res.result.dates
- // this.dataList = res.result
- // this.draw()
- // this.checkSameData(this.dataList)
- // this.checkSameData1(this.dataList)
- // this.checkSameData2(this.dataList)
- // this.combineCell();
- // this.initDeviceType(this.dataList)
- that.drawWrin()
- }
- })
- .finally(() => {
- that.echartLoading = false
- })
- console.log(this.YData)
-
- },
- disabledDate(current) {
- //Can not slect days before today and today
- return current && current > moment().subtract('days', 1)
- },
- initDeviceType(deviceList) {
- let dictCode = 'mdc_equipmentType'
- let items = []
- items = getDictItemsFromCache(dictCode)
- if (deviceList && items.length > 0) {
- for (let a = 0; a < deviceList.length; a++) {
- if (items && items.length > 0) {
- for (let i = 0; i < items.length; i++) {
- if (deviceList[a].equipmentType == items[i].value) {
- deviceList[a].equipmentType = items[i].title
- }
- }
- } else {
- ajaxGetDictItems(dictCode, null).then((res) => {
- if (res.success) {
- let items = res.result
- for (let i = 0; i < items.length; i++) {
- if (deviceList[a].equipmentType == items[i].value) {
- deviceList[a].equipmentType = items[i].title
- }
- }
- }
- })
- }
- }
- }
- },
- dateParamChange(v1, v2) {
- this.queryParam.startDate = v2[0]
- this.queryParam.endDate = v2[1]
- },
- searchQuery() {
- if (this.queryParam.typeTree == '1') {
- this.queryParam.parentId = this.queryParamEquip.parentId
- this.queryParam.equipmentId = this.queryParamEquip.equipmentId
- } else {
- this.queryParam.parentId = this.queryParamPeople.parentId
- this.queryParam.equipmentId = ''
- }
- this.loadData1()
- },
- loadData1() {
- this.outerDataLoading = true
- this.tableHeads = []
- this.dataList = []
- getAction(this.url.efficiencyList, this.queryParam).then(res => {
- if (res.success) {
- // this.tableHeads = res.result.dates
- this.dataList = res.result
- this.hasRequsetAlarmCodeList = []
- // this.draw()
- // this.checkSameData(this.dataList)
- // this.checkSameData1(this.dataList)
- // this.checkSameData2(this.dataList)
- // this.combineCell();
- // this.initDeviceType(this.dataList)
-
- }
- }).finally(() => {
- this.outerDataLoading = false
- })
- },
- drawWrin() {
- this.equipmentWarningPie = this.$echarts.init(document.getElementById('MdcEquipmentWarningPie'), 'macarons')
- let equipmentWarningPieOption = {
- title: {
- text: '鍚勮澶囧嚭鐜版鎶ヨ鐨勬瘮渚�',
- x: 'center',
- y: 'bottom',
- textStyle: {
- color: '#4FAEDC'
- }
- },
- tooltip: {
- trigger: 'item',
- formatter: '<br/>{b} : {c} ({d}%)'
- },
- calculable: true,
- series: [{
- type: 'pie',
- radius: '60%',
- itemStyle: {
- normal: {
- color: function(params) {
- var colorList = ['#5AB1EF', '#2EC7C9', '#B6A2DE', '#FFB980', '#D87A80', '#8D98B3']
- return colorList[params.dataIndex]
- },
- label: {
- show: true,
- // position: 'top',
- formatter: '{b}\n{c}',
- color: function(params) {
- var colorList = ['#5AB1EF', '#2EC7C9', '#B6A2DE', '#FFB980', '#D87A80', '#8D98B3']
- return colorList[params.dataIndex]
- }
- }
- }
- },
- data: this.pieDate
- // data:[{name:'jjjjjjj',value:'2'}]
- }]
- }
- this.equipmentWarningPie.setOption(equipmentWarningPieOption, true)
- this.equipmentWarningLine = this.$echarts.init(document.getElementById('MdcEquipmentWarningLine'), 'macarons')
- let equipmentWarningLineOption = {
- title: {
- text: '姣忓ぉ鍑虹幇姝ゆ姤璀︾殑鏁伴噺璧板娍',
- x: 'center',
- y: 'bottom',
- textStyle: {
- color: '#4FAEDC'
- }
- },
- tooltip: {
- trigger: 'axis'
- },
- calculable: true,
- xAxis: [
- {
- type: 'category',
- show: true,
- data: this.XData
- /*axisLabel :{
- interval:0
- }*/,
- axisLine: {
- //x杞寸嚎鐨勯鑹蹭互鍙婂搴�
- show: true,
- lineStyle: {
- width: 2,
- color: '#4FAEDC'
- }
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- name: '娆℃暟',
- axisLine: {
- //x杞寸嚎鐨勯鑹蹭互鍙婂搴�
- show: true,
- lineStyle: {
- width: 2,
- color: '#4FAEDC'
- }
- }
- }
- ],
- series: [
- {
- name: '鎶ヨ鏁伴噺',
- type: 'line',
- data: this.YData,
- markPoint: {
- data: [
- { type: 'max', name: '鏈�澶у��' },
- { type: 'min', name: '鏈�灏忓��' }
- ],
- label: {
- color: '#fff'
- }
- },
- itemStyle: {
- normal: {
- color: '#2EC7C9'
- }
- }
- }
- ]
- }
- this.equipmentWarningLine.setOption(equipmentWarningLineOption, true)
- },
-
- /**
- * 鑷畾涔夎〃鏍艰瑙﹀彂
- * @param record 褰撳墠琛屼俊鎭�
- * @param index 褰撳墠琛屼笅鏍�
- * @returns {{on: {click: on.click}}} 杩斿洖瀵硅薄
- */
- customRow(record, index) {
- return {
- on: {
- click: (event) => {
- // 濡傛灉鐐瑰嚮鐨勪笉鏄睍寮�鍥炬爣鍖哄煙鍒欐覆鏌撳浘琛紝鐩稿弽鍒欑浉褰撲簬鐐瑰嚮灞曞紑鍥炬爣
- if (event.target.className !== 'ant-table-row-expand-icon-cell') {
- this.TableDraw(index, record)
- } else {
- if (event.target.children && event.target.children.length > 0) event.target.children[0].click()
- }
- }
- }
- }
- },
-
- /**
- * 鑷畾涔夎〃鏍艰瑙﹀彂
- * @param expanded 褰撳墠琛屾槸鍚︿负灞曞紑鐘舵��
- * @param record 褰撳墠琛屼俊鎭�
- */
- handleExpandChange(expanded, record) {
- let _this = this
- // 褰撳睍寮�鏃惰嫢璇ヨ鏈灞曞紑杩囨墠浼氳姹傚悗鍙版暟鎹紝灞曞紑杩囩殑鏁版嵁浼氳缂撳瓨鏃犻渶閲嶅璇锋眰
- this.queryParam.alarmCode = record.alarmCode
- if (expanded && !this.hasRequsetAlarmCodeList.includes(record.alarmCode)) {
- this.innerDataLoading = true
- getAction(this.url.equipmentAlarmList, this.queryParam).then(res => {
- if (res.success) {
- _this.dataList.forEach(item => {
- if (item.alarmCode === record.alarmCode) {
- item.innerDataList = res.result
- }
- })
- _this.hasRequsetAlarmCodeList.push(record.alarmCode)
- }
- })
- .finally(() => {
- _this.innerDataLoading = false
- })
- }
- },
-
- /**
- * 褰撴祻瑙堝櫒鍙绐楀彛灏哄鍙戠敓鏀瑰彉鏃惰Е鍙�
- */
- handleWindowResize() {
- if (this.equipmentWarningPie) this.equipmentWarningPie.resize()
- if (this.equipmentWarningLine) this.equipmentWarningLine.resize()
- }
- }
- }
-</script>
-<style scoped>
- .efficiency_list #DeviceList {
- height: 90% !important;
- }
-
- /deep/ .ant-table-body .ant-table-row td {
- padding-top: 10px;
- padding-bottom: 10px;
- }
-
- /deep/ .ant-table-scroll > .ant-table-body > table > .ant-table-tbody > .ant-table-row td {
- cursor: pointer;
- }
-
- /deep/ .ant-spin-nested-loading {
- height: 55%;
- }
-
- /deep/ .ant-spin-container {
- height: 100%;
- }
-
- /deep/ .ant-table.ant-table-bordered {
- height: 265px;
- }
-
- /deep/ .ant-table-scroll > .ant-table-placeholder {
- height: 210px;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/alarmManager/alarmManagerEdit.vue b/src/views/mdc/base/modules/alarmManager/alarmManagerEdit.vue
deleted file mode 100644
index 4955e2e..0000000
--- a/src/views/mdc/base/modules/alarmManager/alarmManagerEdit.vue
+++ /dev/null
@@ -1,234 +0,0 @@
-<template>
- <div ref="device">
- <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" :getContainer="() => this.$refs.device"
- :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴">
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
- <a-row :gutter="24">
- <!--<a-col :span="24">-->
- <!--<a-form-item label="璁惧缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<!–<a-input v-decorator="['equipmentId', validatorRules.equipmentId]">–>-->
- <!--<a-input :disabled='disabled' placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-decorator="['equipmentId', validatorRules.equipmentId]"></a-input>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <a-col :span="24">
- <a-form-item label="鎶ヨ鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input placeholder="璇疯緭鍏ユ姤璀﹀彿" v-decorator="['alarmCode', validatorRules.alarmCode]"></a-input>
- </a-form-item>
- </a-col>
- <a-col :span="24">
- <a-form-item label="鎶ヨ鍐呭" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input placeholder="璇疯緭鍏ユ姤璀﹀唴瀹�" v-decorator="['alarmContent', validatorRules.alarmContent]"></a-input>
- </a-form-item>
- </a-col>
- <a-col :span='24'>
- <a-form-item label="椹卞姩绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <!--<a-input v-decorator="['driveType', validatorRules.driveType]"-->
- <!--/>-->
- <a-input :disabled='disabled' placeholder="璇疯緭鍏ラ┍鍔ㄧ被鍨�" v-decorator="['driveType', validatorRules.driveType]"></a-input>
- </a-form-item>
- </a-col>
- <a-col :span="24">
- <a-form-item label="鏄惁鍚敤" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <!--<j-switch v-model="model.isUse"></j-switch>-->
- <a-switch v-model="isUse"/>
- <!--<a-radio-group v-model="model.isUse">-->
- <!--<a-radio :value="1">-->
- <!--鏄�-->
- <!--</a-radio>-->
- <!--<a-radio :value="2">-->
- <!--鍚�-->
- <!--</a-radio>-->
- <!--</a-radio-group>-->
- </a-form-item>
- </a-col>
- </a-row>
- </a-form>
- </a-spin>
- <!--<device-calend-list-model ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></device-calend-list-model>-->
- <!--<alarm-manager-equpment ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></alarm-manager-equpment>-->
- </a-modal>
- </div>
-</template>
-
-<script>
- // import DeviceCalendListModel from './DeviceCalendarListModel'
- // import AlarmManagerEqupment from './alarmManangerEqupment'
- import moment from 'moment'
- import pick from 'lodash.pick'
- import {
- getAction,
- postAction,
- requestPut,
- putAction
- } from '@/api/manage'
- import {
- duplicateCheck
- } from '@/api/api'
-
- export default {
- name: 'alarmManagerEdit',
- components: {},
- props: {
- },
- data() {
- return {
- isUse:false,
- disabled:true,
- title: '',
- visible: false,
- show: false,
- model: {},
- checked: false,
- labelCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 6
- }
- },
- wrapperCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 18
- }
- },
- confirmLoading: false, form: this.$form.createForm(this),
- validatorRules: {
- // shiftId:{
- // rules: [{
- // required: true, message: '璇烽�夋嫨鐝埗!',
- // }],
- // },
- alarmCode:{
- rules: [{
- required: true, message: '璇疯緭鍏ユ姤璀﹀彿!',
- }],
- },
- alarmContent:{
- rules: [{
- required: true, message: '璇疯緭鍏ユ姤璀﹀唴瀹�!',
- }],
- },
- },
- url: {
- // add: '/mdc/alarmInfo/add',
- edit: '/mdc/mdcAlarmInfo/edit',
- //椹卞姩绫诲瀷
- initShiftList: '/mdc/mdcequipment/driveTypeSelected',
- },
- shiftList: [],
- shiftSubList: [],
- disableSubmit: true
- }
- },
- created() {
- },
-
- methods: {
- edit(record) {
- this.form.resetFields()
- this.model = Object.assign({}, record)
- this.visible = true
- this.$nextTick(() => {
- this.isUse=record.isUse===0?true:false
- this.form.setFieldsValue(pick(this.model, 'alarmCode', 'alarmContent','driveType'))
- })
- },
- initShiftList() {
- getAction(this.url.initShiftList).then((res) => {
- if (res.success) {
- this.shiftList = res.result
- }
- })
- },
- close() {
- this.$emit('close')
- this.visible = false
- this.show = false
- },
- handleOk() {
- const that = this
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.form.validateFields((err, values) => {
- if (!err) {
- that.confirmLoading = true
- let formData = Object.assign(this.model, values)
- formData.isUse = this.isUse ? "0" : "-1"
- let obj
- if (!this.model.id) {
- // obj = postAction(this.url.add, formData)
- } else {
- obj = requestPut(this.url.edit, formData, {
- id: this.model.id
- })
- }
- obj.then((res) => {
- if (res.success) {
- // that.$message.success("娣诲姞鎴愬姛")
- that.$notification.success({
- message:'娑堟伅',
- description:"淇敼鎴愬姛"
- });
- // that.$message.success(res.message)
- that.$emit('ok', res.result)
- } else {
- // that.$message.warning(res.message)
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- that.confirmLoading = false
- that.close()
- })
- }
- })
- },
- handleCancel() {
- this.close()
- },
- }
- }
-</script>
-
-<style scoped lang="less">
- /deep/ .ant-modal-content{
- /*background: -moz-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.27) 100%);*/
- /*background: -webkit-gradient(linear, left left, right right, color-stop(0%, rgba(0, 0, 0, 0.66)), color-stop(100%, rgba(0, 0, 0, 0.4)));*/
- /*background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: -o-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: -ms-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background-color: #000;*/
- }
- /deep/ .ant-modal-close{
- color: #1191b0;
- font-size: 24px;
- }
- /deep/ .ant-modal-close-x{
- font-size: 24px;
- }
- .ant-btn {
- padding: 0 10px;
- margin-left: 3px;
- }
-
- .ant-form-item-control {
- line-height: 0px;
- }
-
- /** 涓昏〃鍗曡闂磋窛 */
- .ant-form .ant-form-item {
- margin-bottom: 10px;
- }
-
- /** Tab椤甸潰琛岄棿璺� */
- .ant-tabs-content .ant-form-item {
- margin-bottom: 0px;
- }
-</style>
diff --git a/src/views/mdc/base/modules/alarmManager/alarmManagerForm.vue b/src/views/mdc/base/modules/alarmManager/alarmManagerForm.vue
deleted file mode 100644
index 23245fd..0000000
--- a/src/views/mdc/base/modules/alarmManager/alarmManagerForm.vue
+++ /dev/null
@@ -1,260 +0,0 @@
-<template>
- <div ref="device">
- <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" :getContainer="() => this.$refs.device"
- :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴">
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
- <a-row :gutter="24">
- <a-col :span="24">
- <a-form-item label="鎶ヨ鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input placeholder="璇疯緭鍏ユ姤璀﹀彿" v-decorator="['alarmCode', validatorRules.alarmCode]" ></a-input>
- </a-form-item>
- </a-col>
- <a-col :span="24">
- <a-form-item label="鎶ヨ鍐呭" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input placeholder="璇疯緭鍏ユ姤璀﹀唴瀹�" v-decorator="['alarmContent', validatorRules.alarmContent]"></a-input>
- </a-form-item>
- </a-col>
- <a-col :span='24'>
- <a-form-item label="椹卞姩绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <!--<a-select v-decorator="['driveType', validatorRules. driveType]" placeholder="璇烽�夋嫨椹卞姩绫诲瀷"-->
- <!--:options="shiftList">-->
- <!--</a-select>-->
- <!--<j-dict-select-tag-->
- <!--placeholder="璇烽�夋嫨椹卞姩绫诲瀷"-->
- <!--v-decorator="['driveType', validatorRules.driveType]"-->
- <!--dictCode="mdc_driveType"-->
- <!--/>-->
- <a-auto-complete
- v-decorator="['driveType', validatorRules.driveType]"
- :data-source="driveTypeList"
- placeholder="璇烽�夋嫨椹卞姩绫诲瀷"
- :filter-option="filterOption"
- :allowClear="true"
- />
- </a-form-item>
- </a-col>
- <a-col :span="24">
- <a-form-item label="鏄惁鍚敤" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-switch :checked="isFilterChecked" v-decorator="['isUse', validatorRules.isUse]" @change="isFilterChange"></a-switch>
- </a-form-item>
- </a-col>
- <!--<a-col :span='24'>-->
- <!--<a-form-item-->
- <!--:labelCol="labelCol"-->
- <!--:wrapperCol="wrapperCol"-->
- <!--label="鏂板鏂瑰紡"-->
- <!--hidden>-->
- <!--<a-input-->
- <!--v-decorator="[-->
- <!--'addWay',-->
- <!--{ rules:-->
- <!--[-->
- <!--{ required: true, message: '' }-->
- <!--],-->
- <!--initialValue: '2'-->
- <!--}-->
- <!--]"-->
- <!--placeholder="璇疯緭鍏ユ柊澧炴柟寮�"-->
- <!--allowClear-->
- <!-->-->
- <!--</a-input>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- </a-row>
- </a-form>
- </a-spin>
- </a-modal>
- </div>
-</template>
-
-<script>
- import moment from 'moment'
- import pick from 'lodash.pick'
- import {
- getAction,
- postAction,
- requestPut,
- putAction
- } from '@/api/manage'
- import {
- duplicateCheck
- } from '@/api/api'
-
- export default {
- name: 'alarmManagerForm',
- // components: {AlarmManagerEqupment},
- props: {
- driveTypeList:{
- type:Array
- },
- filterOption:{
- type:Function
- }
- },
- data() {
- return {
- isFilterChecked:true,
- isUse:true,
- title: '',
- visible: false,
- show: false,
- model: {},
- checked: false,
- labelCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 6
- }
- },
- wrapperCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 18
- }
- },
- confirmLoading: false,
- form: this.$form.createForm(this),
- validatorRules: {
- driveType:{
- rules: [{
- required: true, message: '璇烽�夋嫨椹卞姩绫诲瀷!',
- }],
- },
- alarmCode:{
- rules: [{
- required: true, message: '璇疯緭鍏ユ姤璀﹀彿!',
- }],
- },
- alarmContent:{
- rules: [{
- required: true, message: '璇疯緭鍏ユ姤璀﹀唴瀹�!',
- }],
- },
- },
- url: {
- add: '/mdc/mdcAlarmInfo/add',
- // edit:'/mdc/alarmInfo/edit',
- //椹卞姩绫诲瀷
- initShiftList: '/mdc/mdcequipment/driveTypeSelected',
-
- //鏂板鏂瑰紡
- },
- shiftList: [],
- shiftSubList: [],
- disableSubmit: true
- }
- },
- created() {
- },
-
- methods: {
- initShiftList() {
- getAction(this.url.initShiftList).then((res) => {
- if (res.success) {
- this.shiftList = res.result
- }
- })
- },
- add(record) {
- let _this = this
- this.isFilterChecked=true
- this.form.resetFields()
- this.model = Object.assign({}, record)
- // this.initShiftList()
- this.visible = true
- this.$nextTick(() => {
-
- })
- },
- close() {
- this.$emit('close')
- this.visible = false
- this.show = false
- },
- handleOk() {
- const that = this
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.form.validateFields((err, values) => {
- if (!err) {
- that.confirmLoading = true
- let formData = Object.assign(this.model, values)
- // console.log(formData)
- // formData.isUse = formData.isUse ? "1" : "2"
- formData.isUse = formData.isUse == true || formData.isUse == undefined ? "0" : "-1"
- postAction(this.url.add, formData).then((res) => {
- if (res.success) {
- // that.$message.success(res.message)
- that.$notification.success({
- message:'娑堟伅',
- description:res.message
- });
- that.$emit('ok', res.result)
- } else {
- // that.$message.warning(res.message)
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- that.confirmLoading = false
- that.close()
- })
- }
- })
- },
- handleCancel() {
- this.close()
- },
- /**
- * 鏄惁杩囨护鍒囨崲鍣╟hange浜嬩欢
- * @param checked 鍒囨崲鍚庣殑鐘舵��
- */
- isFilterChange(checked){
- this.isFilterChecked=checked
- }
- }
- }
-</script>
-
-<style scoped lang="less">
- /deep/ .ant-modal-content{
- /*background: -moz-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.27) 100%);*/
- /*background: -webkit-gradient(linear, left left, right right, color-stop(0%, rgba(0, 0, 0, 0.66)), color-stop(100%, rgba(0, 0, 0, 0.4)));*/
- /*background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: -o-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: -ms-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background-color: #000;*/
- }
- /deep/ .ant-modal-close{
- color: #1191b0;
- font-size: 24px;
- }
- /deep/ .ant-modal-close-x{
- font-size: 24px;
- }
- .ant-btn {
- padding: 0 10px;
- margin-left: 3px;
- }
-
- .ant-form-item-control {
- line-height: 0px;
- }
-
- /** 涓昏〃鍗曡闂磋窛 */
- .ant-form .ant-form-item {
- margin-bottom: 10px;
- }
-
- /** Tab椤甸潰琛岄棿璺� */
- .ant-tabs-content .ant-form-item {
- margin-bottom: 0px;
- }
-</style>
diff --git a/src/views/mdc/base/modules/alarmManager/alarmManagerModal.vue b/src/views/mdc/base/modules/alarmManager/alarmManagerModal.vue
deleted file mode 100644
index 951523b..0000000
--- a/src/views/mdc/base/modules/alarmManager/alarmManagerModal.vue
+++ /dev/null
@@ -1,284 +0,0 @@
-<template>
- <div ref="device">
- <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" :getContainer="() => this.$refs.device"
- :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴">
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
- <a-row :gutter="24">
- <a-col :span="24">
- <a-form-item label="璁惧缁�" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]"
- @search="deviceSearch" enter-button/>
- </a-form-item>
- </a-col>
- <a-col :span="24">
- <a-form-item label="鎶ヨ鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input placeholder="璇疯緭鍏ユ姤璀﹀彿" v-decorator="['alarmCode', validatorRules.alarmCode]"></a-input>
- </a-form-item>
- </a-col>
- <a-col :span="24">
- <a-form-item label="鎶ヨ鎻忚堪" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input placeholder="璇疯緭鍏ユ姤璀︽弿杩�" v-decorator="['alarmDescription', validatorRules.alarmDescription]"></a-input>
- </a-form-item>
- </a-col>
- <a-col :span="24">
- <a-form-item label="鏄惁鍚敤" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-switch :default-checked = 'showM' v-decorator="['isUse', validatorRules.isUse]"></a-switch>
- </a-form-item>
- </a-col>
- <a-col :span='24'>
- <a-form-item
- :labelCol="labelCol"
- :wrapperCol="wrapperCol"
- label="鏂板鏂瑰紡"
- hidden>
- <a-input
- v-decorator="[
- 'addWay',
- { rules:
- [
- { required: true, message: '' }
- ],
- initialValue: '1'
- }
- ]"
- placeholder="璇疯緭鍏ユ柊澧炴柟寮�"
- allowClear
- >
- </a-input>
- </a-form-item>
- </a-col>
- </a-row>
- </a-form>
- </a-spin>
- <!--<device-calend-list-model ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></device-calend-list-model>-->
- <alarm-manager-equpment ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></alarm-manager-equpment>
- </a-modal>
- </div>
-</template>
-
-<script>
- // import DeviceCalendListModel from './DeviceCalendarListModel'
- import AlarmManagerEqupment from './alarmManangerEqupment'
- import moment from 'moment'
- import pick from 'lodash.pick'
- import {
- getAction,
- postAction,
- requestPut,
- putAction
- } from '@/api/manage'
- import {
- duplicateCheck
- } from '@/api/api'
-
- export default {
- name: 'alarmManagerModal',
- components: {AlarmManagerEqupment},
- props: {
- options:{
- type:Array,
- required:false,
- default:()=>['1','2']
- },
- },
- data() {
- return {
- showM:true,
- // isUse:true,
- title: '',
- isDaySpan: false,
- visible: false,
- show: false,
- model: {
- isUse: 'Y',
- },
- checked: true,
- labelColLong: {
- xs: {
- span: 24
- },
- sm: {
- span: 3
- }
- },
- wrapperColLong: {
- xs: {
- span: 24
- },
- sm: {
- span: 21
- }
- },
- labelCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 6
- }
- },
- wrapperCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 18
- }
- },
- confirmLoading: false, form: this.$form.createForm(this),
- validatorRules: {
- equipmentIds:{
- rules: [{
- required: true, message: '璇烽�夋嫨璁惧!',
- }],
- },
- alarmCode:{
- rules: [{
- required: true, message: '璇疯緭鍏ユ姤璀﹀彿!',
- }],
- },
- alarmDescription:{
- rules: [{
- required: true, message: '璇疯緭鍏ユ姤璀︽弿杩�!',
- }],
- },
- },
- url: {
- add: '/mdc/alarmInfo/add',
- edit: '/mdc/mdcshiftsub/edit',
- //椹卞姩绫诲瀷
- initShiftList: '/mdc/mdcequipment/driveTypeSelected',
- initShiftSubList: '/mdc/mdcshiftsub/initShiftSubList',
- getShiftSubById: '/mdc/mdcshiftsub/getShiftSubById',
- settingCalendar: '/mdc/mdcdevicecalendar/saveUpdateBatchList',
- //鏂板鏂瑰紡
- },
- shiftList: [],
- shiftSubList: [],
- disableSubmit: true
- }
- },
- created() {
- },
-
- methods: {
- deviceSearch() {
- this.$refs.deviceRepairListModel.openPage()
- this.$refs.deviceRepairListModel.title = '閫夋嫨璁惧'
- this.$refs.deviceRepairListModel.disableSubmit = false
- },
- getDeviceRows(val) {
- console.log("========",val);
- var equipmentIds = "";
- for(var i = 0;i<val.length;i++){
- //equipmentIds = equipmentIds + "," + val[i].equipmentId;
- if (i == 0) {
- equipmentIds = val[i].equipmentId;
- } else {
- equipmentIds = equipmentIds + "," + val[i].equipmentId;
- }
- }
- this.form.setFieldsValue({
- equipmentIds: equipmentIds,
- })
- },
-
- initShiftList() {
- getAction(this.url.initShiftList).then((res) => {
- if (res.success) {
- this.shiftList = res.result
- }
- })
- },
-
-
- add(record) {
- let _this = this
- this.visible = true
- this.form.resetFields()
- this.model = Object.assign({}, record)
- this.initShiftList()
- this.$nextTick(() => {
-
- })
- },
- close() {
- this.$emit('close')
- this.visible = false
- this.show = false
- },
- handleOk() {
- const that = this
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.form.validateFields((err, values) => {
- if (!err) {
- that.confirmLoading = true
- let formData = Object.assign(this.model, values)
- // console.log(formData)
- formData.isUse = formData.isUse == true || formData.isUse == undefined ? "1" : "2"
- putAction(this.url.add, formData).then((res) => {
- if (res.success) {
- // that.$message.success(res.message)
- that.$notification.success({
- message:'娑堟伅',
- description:res.message
- });
- that.$emit('ok', res.result)
- } else {
- // that.$message.warning(res.message)
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- that.confirmLoading = false
- that.close()
- })
- }
- })
- },
- handleCancel() {
- this.close()
- },
- }
- }
-</script>
-
-<style scoped lang="less">
- /deep/ .ant-modal-content{
- /*background: -moz-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.27) 100%);*/
- /*background: -webkit-gradient(linear, left left, right right, color-stop(0%, rgba(0, 0, 0, 0.66)), color-stop(100%, rgba(0, 0, 0, 0.4)));*/
- /*background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: -o-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: -ms-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background-color: #000;*/
- }
- /deep/ .ant-modal-close{
- color: #1191b0;
- font-size: 24px;
- }
- /deep/ .ant-modal-close-x{
- font-size: 24px;
- }
- .ant-btn {
- padding: 0 10px;
- margin-left: 3px;
- }
-
- .ant-form-item-control {
- line-height: 0px;
- }
-
- /** 涓昏〃鍗曡闂磋窛 */
- .ant-form .ant-form-item {
- margin-bottom: 10px;
- }
-
- /** Tab椤甸潰琛岄棿璺� */
- .ant-tabs-content .ant-form-item {
- margin-bottom: 0px;
- }
-</style>
diff --git a/src/views/mdc/base/modules/alarmManager/alarmManangerEqupment.vue b/src/views/mdc/base/modules/alarmManager/alarmManangerEqupment.vue
deleted file mode 100644
index b3001ba..0000000
--- a/src/views/mdc/base/modules/alarmManager/alarmManangerEqupment.vue
+++ /dev/null
@@ -1,286 +0,0 @@
-<template>
- <a-modal :title="title" width="70%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
- cancelText="鍏抽棴">
- <a-card :bordered="false">
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="6" :sm="6">
- <a-form-item label="閮ㄩ棬" >
- <a-select v-model="queryParam.sectionPid" placeholder="璇烽�夋嫨閮ㄩ棬" :options="sectionPData" @change="initGroupOptions" />
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="6">
- <a-form-item label="鍥㈤槦" >
- <a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨鍥㈤槦" :options="sectionData"/>
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="6">
- <a-form-item label="缁熶竴缂栫爜">
- <a-input placeholder="璇疯緭鍏ョ粺涓�缂栫爜妫�绱�" v-model="queryParam.equipmentId"></a-input>
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="6">
- <a-form-item label="璁惧鍚嶇О">
- <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉版绱�" v-model="queryParam.equipmentName"></a-input>
- </a-form-item>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
- </div>
- <!-- table鍖哄煙-begin -->
- <div>
- <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 400聽}" :columns="columns"
- :dataSource="dataSource" :pagination="ipagination" :loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
- @change="handleTableChange">
- </a-table>
- </div>
- <!-- table鍖哄煙-end -->
- </a-card>
- </a-modal>
-</template>
-
-<script>
- import {
- ajaxGetSelectItems
- } from '@/api/api'
- import JDictSelectTag from '@/components/dict/JDictSelectTag'
- import {
- deleteAction,
- requestPut,
- getAction,
- postAction
- } from '@/api/manage'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
- import JInput from '@/components/jeecg/JInput'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import Tooltip from 'ant-design-vue/es/tooltip'
- import JDate from '@/components/jeecg/JDate'
- import moment from 'moment'
-
- export default {
- name: 'alarmManangerEqupment',
- mixins: [JeecgListMixin],
- components: {
- JDictSelectTag,
- JEllipsis,
- JInput,
- Tooltip,
- JDate
- },
- props: {
- status: {
- type: Number,
- default: 1
- }
- },
- data() {
- return {
- /*readOnly:true,*/
- title:'',
- visible: false,
- SelectedList:[],
- /*disableMixinCreated: true,
- queryParam: {},*/
- columns: [
- {
- title: '#',
- dataIndex: '',
- key: 'rowIndex',
- width: 60,
- align: "center",
- customRender: function (t, r, index) {
- return parseInt(index) + 1;
- }
- },{
-
- title: '缁熶竴缂栫爜',
- align: 'center',
- dataIndex: 'equipmentId',
- },
- {
- title: '璁惧鍚嶇О',
- align: 'center',
- dataIndex: 'equipmentName',
- },
- {
- title: '椹卞姩绫诲瀷',
- align: 'center',
- dataIndex: 'driveType'
- },
- {
- title: '鏁版帶绯荤粺',
- align: 'center',
- dataIndex: 'controlSystem'
- },
- ],
- sectionPData: [],
- sectionData: [],
- url: {
- list: '/mdc/mdcequipment/findEquipmentList',
- loadOptions: '/mdc/sectionEquipment/loadOptions'
- },
-
- }
- },
- created() {
-
- },
- methods: {
- onSelectChange(selectedRowKeys, selectionRows) {
- // this.SelectedList.push(selectedRowKeys);
- this.selectedRowKeys = selectedRowKeys;
- this.selectionRows = selectionRows
- // this.SelectedList =[...this.SelectedList,...selectionRows];
- // console.log(this.SelectedList);
- },
- handleTableChange(pagination, filters, sorter) {
- // this.onClearSelected()
- //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂
- //TODO 绛涢��
- console.log(pagination)
- if (Object.keys(sorter).length > 0) {
- this.isorter.column = sorter.field;
- this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
- }
- this.ipagination = pagination;
- this.loadData();
- },
- openPage() {
- this.visible = true
- this.onClearSelected()
- this.dataSource = [];
- this.queryParam = {
- status: this.status
- };
-
- this.loadData();
- this.initOptions();
- },
- loadData(arg) {
- if(!this.url.list){
- this.$message.error("璇疯缃畊rl.list灞炴��!")
- return
- }
- //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
- if (arg === 1) {
- this.ipagination.current = 1;
- }
- var params = this.getQueryParams();//鏌ヨ鏉′欢
-
- if(!params){
- return false;
- }
-
- this.loading = true;
- postAction(this.url.list, params).then((res) => {
- if (res.success) {
- // console.log(res)
- //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- this.dataSource = res.result.records||res.result;
- if(res.result.total)
- {
- this.ipagination.total = res.result.total;
- }else{
- this.ipagination.total = 0;
- }
- //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- }else{
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- })
- },
- modalFormOk(val) {
- // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- this.loadData();
-
- this.selectedRowKeys = [val.id];
- },
- searchQuery() {
- this.loadData();
- this.onClearSelected()
- },
- searchReset() {
- this.queryParam = {
- status: 1
- };
- this.loadData();
- this.onClearSelected()
- },
- close() {
- this.$emit('close')
- this.visible = false
- },
- handleCancel() {
- this.close()
- },
- handleOk() {
- // this.selectionRows = this.SelectedList;
- // console.log(this.selectionRows);
- this.$emit('sendSelectionRows', this.selectionRows)
- this.close()
- },
- initOptions() {
- postAction(this.url.loadOptions, { sectionRank: 2 }).then(res => {
- if (res.success) {
- this.sectionPData = res.result
- } else {
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- })
- },
- initGroupOptions() {
- //娓呴櫎涓�绾т笅鎷夋閫変腑鍚庝簩绾т笅鎷夋宸叉湁閫変腑鍊�
- this.$set(this.queryParam, 'sectionId', undefined)
- postAction(this.url.loadOptions, { parentId: this.queryParam.sectionPid }).then(res => {
- if (res.success) {
- this.sectionData = res.result
- } else {
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- })
- }
- },
- }
-</script>
-<style>
- @import '~@assets/less/common.less';
-
- .frozenRowClass {
- color: #c9c9c9;
- }
-
- .success {
- color: green;
- }
-
- .error {
- color: red;
- }
-</style>
diff --git a/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisBar.vue b/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisBar.vue
deleted file mode 100644
index 2cedc86..0000000
--- a/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisBar.vue
+++ /dev/null
@@ -1,663 +0,0 @@
-<template>
- <div class="comparative_Bar" style="width: 100%;height: 900px;display: flex;flex-direction: column;overflow: scroll">
- <div id="compAnalBar1" style="flex: 1;"></div>
- <div id="compAnalBar2" style="flex: 1;"></div>
- </div>
-</template>
-
-<script>
- import * as echarts from 'echarts'
- export default {
- name: 'comparativeAnalysisBar',
- props:{
- dataList:''
-
- },
- data(){
- return{
- OpenCloseList:[],
- openRate:[],
- utilizationRate:[],
- openLong:[],
- closeLong:[],
- equipmentList:[]
- }
- },
- created(){
-
- },
- watch:{
- dataList(val){
- this.OpenCloseList = val
- this.drawTu()
- },
- },
- mounted() {
- this.drawTu()
- },
- methods:{
- drawTu(){
- let compAnalBar1 = this.$echarts.init(document.getElementById('compAnalBar1'), 'macarons');
- let compAnalBar2 = this.$echarts.init(document.getElementById('compAnalBar2'), 'macarons');
- let compAnalBarOption1 = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: "shadow",
- textStyle: {
- color: "#fff"
- }
-
- }
- },
- legend: {
- x: '4%',
- top: '11%',
- textStyle: {
- color: '#90979c'
- },
- color: ['#6496e9', '#4fe1c5'],
- data: ['寮�鏈虹巼', '鍒╃敤鐜�']
- },
- toolbox: {
- show : true,
- feature : {
- mark : {show: true},
- magicType : {show: true, type: ['line', 'bar']},
- restore : {show: true},
- saveAsImage : {show: true,name:'璁惧杩愯鏁堢巼瀵规瘮鍒嗘瀽鍥�'}
- }
- },
- calculable: true,
- grid: {
- borderWidth: 0,
- top: 110,
- bottom: 95,
- textStyle: {
- color: "#fff"
- }
- },
- xAxis: [
- {
- type: 'category',
- splitLine: {
- "show": false
- },
- axisTick: {
- "show": false
- },
- splitArea: {
- show: false
- },
- boundaryGap : true,
- axisLabel : {
- interval : 0,
- rotate : 0,
- show: true,
- wigth:20,
- splitNumber: 8,
- textStyle: {
- fontFamily: "寰蒋闆呴粦",
- fontSize: 12
- }
- },
- data : [0]
- }
- ],
- yAxis: [
- {
- type: 'value',
- splitLine: {
- show: false
- },
- axisLine: {
- lineStyle: {
- color: '#90979c'
- }
- },
- axisTick: {
- show: false
- },
- axisLabel: {
- interval: 0
-
- },
- splitArea: {
- show: false
- }
- }
- ],
- dataZoom: [{
- show: true,
- height: 30,
- xAxisIndex: [0],
- bottom: 30,
- start: 0,
- end: 100,
- handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
- handleSize: '110%',
- handleStyle: {
- color: "#d3dee5"
- },
- textStyle: {
- color: "#fff"
- },
- borderColor: "#90979c"
- }, {
- type: "inside",
- show: true,
- height: 15,
- start: 1,
- end: 35
- }],
- series: [
- {
- name: '寮�鏈虹巼',
- type: 'bar',
- //barWidth: 30,
- barWidth: 25,
- itemStyle: {
- normal: {
- color: function(params) {
- let colorList = [
- ["#6496e9","#6bded3"],
- // ["#849db8","#b4b8cc"],
- // ["#4fe1c5","#4ecee1"],
- // // ["#9978fa","#88a1fa"],
- // ["#ffbb65","#fdc68b"],
- ];
- // return colorList[params.dataIndex];
- let colorItem = colorList[params.dataIndex];
- return new echarts.graphic.LinearGradient(0,0,0,1,[{
- offset:0,
- color:'#6496e9'
- },
- {
- offset:1,
- color:"#6bded3"
- }],false)
- },
- barBorderRadius: [5, 5, 0, 0],
- }
- },
- data: [0],
- // barCategoryGap: '20%',
- // barGap : '-10%',
- markPoint : {
- data : [
- {type : 'max', name: '鏈�澶у��',symbolSize:70},
- {type : 'min', name: '鏈�灏忓��',symbolSize:70}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '骞冲潎鍊�'}
- ]
- }
- },
- {
- name: '鍒╃敤鐜�',
- type: 'bar',
- //barWidth: 30,
- barWidth: 25,
- // barCategoryGap: '20%',
- // barGap : '-10%',
- itemStyle: {
- normal: {
- color: function(params) {
- let colorList = [
- // ["#6496e9","#6bded3"],
- // ["#849db8","#b4b8cc"],
- ["#4fe1c5","#4ecee1"],
- // ["#9978fa","#88a1fa"],
- // ["#ffbb65","#fdc68b"],
- ];
- // return colorList[params.dataIndex];
- let colorItem = colorList[params.dataIndex];
- return new echarts.graphic.LinearGradient(0,0,0,1,[{
- offset:0,
- color:"#4fe1c5"
- },
- {
- offset:1,
- color:"#4ecee1"
- }],false)
- },
- barBorderRadius: [5, 5, 0, 0],
- }
- },
- data: [0],
- markPoint : {
- data : [
- {type : 'max', name: '鏈�澶у��',symbolSize:70},
- {type : 'min', name: '鏈�灏忓��',symbolSize:70}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '骞冲潎鍊�'}
- ]
- }
- }
- ]
- };
- // let compAnalBarOption2 = {
- // tooltip: {
- // trigger: 'axis',
- // axisPointer: {
- // type: "shadow",
- // textStyle: {
- // color: "#fff"
- // }
- //
- // }
- // },
- // legend: {
- // x: '4%',
- // top: '11%',
- // textStyle: {
- // color: '#90979c'
- // },
- // data: ['寮�鏈烘椂闂�', '鍏虫満鏃堕棿'],
- // color:['#6496e9','#b4b8cc']
- // },
- // toolbox: {
- // show : true,
- // feature : {
- // mark : {show: true},
- // magicType : {show: true, type: ['line', 'bar']},
- // restore : {show: true},
- // saveAsImage : {show: true,name:'璁惧杩愯鏃堕棿瀵规瘮鍒嗘瀽鍥�'}
- // }
- // },
- // calculable: true,
- // grid: {
- // borderWidth: 0,
- // top: 110,
- // bottom: 95,
- // textStyle: {
- // color: "#fff"
- // }
- // },
- // xAxis: [
- // {
- // type: 'category',
- // splitLine: {
- // "show": false
- // },
- // axisTick: {
- // "show": false
- // },
- // splitArea: {
- // show: false
- // },
- // boundaryGap : true,
- // axisLabel : {
- // interval : 0,
- // rotate : 0,
- // show: true,
- // wigth:20,
- // splitNumber: 8,
- // textStyle: {
- // fontFamily: "寰蒋闆呴粦",
- // fontSize: 12
- // }
- // },
- // data : [0]
- // }
- // ],
- // yAxis: [
- // {
- // type: 'value',
- // splitLine: {
- // show: false
- // },
- // axisLine: {
- // lineStyle: {
- // color: '#90979c'
- // }
- // },
- // axisTick: {
- // show: false
- // },
- // axisLabel: {
- // interval: 0
- //
- // },
- // splitArea: {
- // show: false
- // }
- // }
- // ],
- // dataZoom: [{
- // show: true,
- // height: 30,
- // xAxisIndex: [0],
- // bottom: 30,
- // start: 0,
- // end: 100,
- // handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
- // handleSize: '110%',
- // handleStyle: {
- // color: "#d3dee5"
- // },
- // textStyle: {
- // color: "#fff"
- // },
- // borderColor: "#90979c"
- // }, {
- // type: "inside",
- // show: true,
- // height: 15,
- // start: 1,
- // end: 35
- // }],
- // series: [
- // {
- // name: '寮�鏈烘椂闂�',
- // type: 'bar',
- // //barWidth: 30,
- // barWidth: 25,
- // // stack: 'sum',
- // // barCategoryGap: '20%',
- // itemStyle: {
- // normal: {
- // color: function(params) {
- // let colorList = [
- // ["#6496e9","#6bded3"],
- // // ["#849db8","#b4b8cc"],
- // // ["#4fe1c5","#4ecee1"],
- // // // ["#9978fa","#88a1fa"],
- // // ["#ffbb65","#fdc68b"],
- // ];
- // // return colorList[params.dataIndex];
- // let colorItem = colorList[params.dataIndex];
- // return new echarts.graphic.LinearGradient(0,0,0,1,[{
- // offset:0,
- // color:'#6496e9'
- // },
- // {
- // offset:1,
- // color:"#6bded3"
- // }],false)
- // },
- // barBorderRadius: [5, 5, 0, 0],
- // }
- // },
- // data: [0]
- // },
- // {
- // name: '鍏虫満鏃堕棿',
- // type: 'bar',
- // //barWidth: 30,
- // barWidth: 25,
- // // stack: 'sum',
- // // barCategoryGap: '20%',
- // itemStyle: {
- // normal: {
- // color: function(params) {
- // let colorList = [
- // // ["#6496e9","#6bded3"],
- // ["#849db8","#b4b8cc"],
- // // ["#4fe1c5","#4ecee1"],
- // // // ["#9978fa","#88a1fa"],
- // // ["#ffbb65","#fdc68b"],
- // ];
- // // return colorList[params.dataIndex];
- // let colorItem = colorList[params.dataIndex];
- // return new echarts.graphic.LinearGradient(0,0,0,1,[{
- // offset:0,
- // color:'#849db8'
- // },
- // {
- // offset:1,
- // color:"#b4b8cc"
- // }],false)
- // },
- // barBorderRadius: [5, 5, 0, 0],
- // }
- // },
- // data: [0]
- // }
- // ]
- // };
- let compAnalBarOption2 = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: "shadow",
- textStyle: {
- color: "#fff"
- }
-
- }
- },
- legend: {
- x: '4%',
- top: '11%',
- textStyle: {
- color: '#90979c'
- },
- color:['#6496e9','#b4b8cc'],
- data: ['寮�鏈烘椂闂�', '鍏虫満鏃堕棿']
- },
- toolbox: {
- show : true,
- feature : {
- mark : {show: true},
- magicType : {show: true, type: ['line', 'bar']},
- restore : {show: true},
- saveAsImage : {show: true,name:'璁惧杩愯鏁堢巼瀵规瘮鍒嗘瀽鍥�'}
- }
- },
- calculable: true,
- grid: {
- borderWidth: 0,
- top: 110,
- bottom: 95,
- textStyle: {
- color: "#fff"
- }
- },
- xAxis: [
- {
- type: 'category',
- splitLine: {
- "show": false
- },
- axisTick: {
- "show": false
- },
- splitArea: {
- show: false
- },
- boundaryGap : true,
- axisLabel : {
- interval : 0,
- rotate : 0,
- show: true,
- wigth:20,
- splitNumber: 8,
- textStyle: {
- fontFamily: "寰蒋闆呴粦",
- fontSize: 12
- }
- },
- data : [0]
- }
- ],
- yAxis: [
- {
- type: 'value',
- splitLine: {
- show: false
- },
- axisLine: {
- lineStyle: {
- color: '#90979c'
- }
- },
- axisTick: {
- show: false
- },
- axisLabel: {
- interval: 0
-
- },
- splitArea: {
- show: false
- }
- }
- ],
- dataZoom: [{
- show: true,
- height: 30,
- xAxisIndex: [0],
- bottom: 30,
- start: 0,
- end: 100,
- handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
- handleSize: '110%',
- handleStyle: {
- color: "#d3dee5"
- },
- textStyle: {
- color: "#fff"
- },
- borderColor: "#90979c"
- }, {
- type: "inside",
- show: true,
- height: 15,
- start: 1,
- end: 35
- }],
- series: [
- {
- name: '寮�鏈烘椂闂�',
- type: 'bar',
- //barWidth: 30,
- barWidth: 25,
- itemStyle: {
- normal: {
- color: function(params) {
- let colorList = [
- ["#6496e9","#6bded3"],
- // ["#849db8","#b4b8cc"],
- // ["#4fe1c5","#4ecee1"],
- // // ["#9978fa","#88a1fa"],
- // ["#ffbb65","#fdc68b"],
- ];
- // return colorList[params.dataIndex];
- let colorItem = colorList[params.dataIndex];
- return new echarts.graphic.LinearGradient(0,0,0,1,[{
- offset:0,
- color:'#6496e9'
- },
- {
- offset:1,
- color:"#6bded3"
- }],false)
- },
- barBorderRadius: [5, 5, 0, 0],
- }
- },
- data: [0],
- // barCategoryGap: '20%',
- // barGap : '-10%',
- markPoint : {
- data : [
- {type : 'max', name: '鏈�澶у��',symbolSize:70},
- {type : 'min', name: '鏈�灏忓��',symbolSize:70}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '骞冲潎鍊�'}
- ]
- }
- },
- {
- name: '鍏虫満鏃堕棿',
- type: 'bar',
- //barWidth: 30,
- barWidth: 25,
- // barCategoryGap: '20%',
- // barGap : '-10%',
- itemStyle: {
- normal: {
- color: function(params) {
- let colorList = [
- // ["#6496e9","#6bded3"],
- ["#849db8","#b4b8cc"],
- // ["#4fe1c5","#4ecee1"],
- // ["#9978fa","#88a1fa"],
- // ["#ffbb65","#fdc68b"],
- ];
- // return colorList[params.dataIndex];
- let colorItem = colorList[params.dataIndex];
- return new echarts.graphic.LinearGradient(0,0,0,1,[{
- offset:0,
- color:"#849db8"
- },
- {
- offset:1,
- color:"#b4b8cc"
- }],false)
- },
- barBorderRadius: [5, 5, 0, 0],
- }
- },
- data: [0],
- markPoint : {
- data : [
- {type : 'max', name: '鏈�澶у��',symbolSize:70},
- {type : 'min', name: '鏈�灏忓��',symbolSize:70}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '骞冲潎鍊�'}
- ]
- }
- }
- ]
- };
- if(this.OpenCloseList != null){
- this.equipmentList = []
- this.openRate =[]
- this.utilizationRate =[]
- this.openLong = []
- this.closeLong = []
- for(var i = 0;i<this.OpenCloseList.length;i++){
- this.equipmentList.push(this.OpenCloseList[i].equipmentId)
- this.openRate.push((this.OpenCloseList[i].openRate*100).toFixed(2))
- // (this.openRate * 100).toFixed(2)
- this.utilizationRate.push((this.OpenCloseList[i].utilizationRate*100).toFixed(2))
- this.openLong.push(this.OpenCloseList[i].openLong)
- this.closeLong.push(this.OpenCloseList[i].closeLong)
- }
- compAnalBarOption1.xAxis[0].data = this.equipmentList
- compAnalBarOption1.series[0].data = this.openRate
- compAnalBarOption1.series[1].data = this.utilizationRate
- compAnalBarOption2.xAxis[0].data = this.equipmentList
- compAnalBarOption2.series[0].data = this.openLong
- compAnalBarOption2.series[1].data = this.closeLong
- compAnalBar1.setOption(compAnalBarOption1);
- compAnalBar2.setOption(compAnalBarOption2);
- }else{
- compAnalBar1.setOption(compAnalBarOption1);
- compAnalBar2.setOption(compAnalBarOption2);
- }
- window.addEventListener('resize', function() {
- compAnalBar1.resize()
- compAnalBar2.resize()
- })
- }
- }
- }
-</script>
-
-<style scoped>
-
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisGauge.vue b/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisGauge.vue
deleted file mode 100644
index 1fa304c..0000000
--- a/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisGauge.vue
+++ /dev/null
@@ -1,836 +0,0 @@
-<template>
- <div class="comparative_Gauge" style="width: 100%;height: 700px;display: flex;flex-direction: column;overflow: scroll">
- <div style="flex: 1;text-align:center;display: flex;flex-direction: column">
- <h3 style="height: 18px;margin: 0 auto;">鍒╃敤鐜� Top 5</h3>
-
- <div style="flex: 1;display: flex;">
- <div id="top1Gauge" class="div-inline"></div>
- <div id="top2Gauge" class="div-inline"></div>
- <div id="top3Gauge" class="div-inline"></div>
- <div id="top4Gauge" class="div-inline"></div>
- <div id="top5Gauge" class="div-inline"></div>
- </div>
- </div>
- <div style="flex: 1;text-align:center;display: flex;flex-direction: column">
- <h3 style="height: 18px; margin: 0 auto;">鍒╃敤鐜� Last 5</h3>
-
- <div style="flex: 1;display: flex;">
- <div id="last1Gauge" class="div-inline"></div>
- <div id="last2Gauge" class="div-inline"></div>
- <div id="last3Gauge" class="div-inline"></div>
- <div id="last4Gauge" class="div-inline"></div>
- <div id="last5Gauge" class="div-inline"></div>
- </div>
- </div>
- </div>
-</template>
-
-<script>
- import * as echarts from 'echarts'
- export default {
- name: 'comparativeAnalysisGauge',
- props:{dataList:''},
- data(){
- return{
- utilizationRateTopOne:0,
- utilizationRateTopOneEquipment:0,
- utilizationRateTopTwo:0,
- utilizationRateTopTwoEquipment:0,
- utilizationRateTopThree:0,
- utilizationRateTopThreeEquipment:0,
- utilizationRateTopFour:0,
- utilizationRateTopFourEquipment:0,
- utilizationRateTopFive:0,
- utilizationRateTopFiveEquipment:0,
- utilizationRateLastOne:0,
- utilizationRateLastOneEquipment:0,
- utilizationRateLastTwo:0,
- utilizationRateLastTwoEquipment:0,
- utilizationRateLastThree:0,
- utilizationRateLastThreeEquipment:0,
- utilizationRateLastFour:0,
- utilizationRateLastFourEquipment:0,
- utilizationRateLastFive:0,
- utilizationRateLastFiveEquipment:0,
- TopLastList:[]
- }
- },
- watch:{
- dataList(val){
- console.log(val);
- this.TopLastList = val
- this.draw()
- },
- },
- mounted(){
- this.draw();
- },
- methods:{
- draw(){
- let gaugeTopChart1 = this.$echarts.init(document.getElementById('top1Gauge'),'macarons');
- let gaugeTopChart2 = this.$echarts.init(document.getElementById('top2Gauge'),'macarons');
- let gaugeTopChart3 = this.$echarts.init(document.getElementById('top3Gauge'),'macarons');
- let gaugeTopChart4 = this.$echarts.init(document.getElementById('top4Gauge'),'macarons');
- let gaugeTopChart5 = this.$echarts.init(document.getElementById('top5Gauge'),'macarons');
- let gaugeLastChart1 = this.$echarts.init(document.getElementById('last1Gauge'),'macarons');
- let gaugeLastChart2 = this.$echarts.init(document.getElementById('last2Gauge'),'macarons');
- let gaugeLastChart3 = this.$echarts.init(document.getElementById('last3Gauge'),'macarons');
- let gaugeLastChart4 = this.$echarts.init(document.getElementById('last4Gauge'),'macarons');
- let gaugeLastChart5 = this.$echarts.init(document.getElementById('last5Gauge'),'macarons');
- let gaugeTopOption1 = {
- title : {
- x : 'center',
- y : 'bottom',
- text : 'TOP1'
- },
- tooltip : {
- formatter: "{a} <br/>{b} : {c}%"
- },
- series : [
- {
- name:'TOP1',
- type:'gauge',
- splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5
- axisLine: { // 鍧愭爣杞寸嚎
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']],
- width: 8
- }
- },
- axisTick: { // 鍧愭爣杞村皬鏍囪
- splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈�
- length :12, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: 'auto'
- }
- },
- axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto'
- }
- },
- splitLine: { // 鍒嗛殧绾�
- show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁
- length :30, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮�
- color: 'auto'
- }
- },
- pointer : {
- width : 5
- },
- title : {
- show : false,
- offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- fontWeight: 'bolder'
- }
- },
- detail : {
- formatter:'{value}%',
- offsetCenter: [0, '60%'],
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto',
- fontWeight: 'bolder',
- fontSize:20
- }
- },
- data:[{value: 0, name: '鍒╃敤鐜�'}]
- }
- ]
- };
- let gaugeTopOption2 = {
- title : {
- x : 'center',
- y : 'bottom',
- text : 'TOP2'
- },
- tooltip : {
- formatter: "{a} <br/>{b} : {c}%"
- },
- series : [
- {
- name:'TOP2',
- type:'gauge',
- splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5
- axisLine: { // 鍧愭爣杞寸嚎
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']],
- width: 8
- }
- },
- axisTick: { // 鍧愭爣杞村皬鏍囪
- splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈�
- length :12, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: 'auto'
- }
- },
- axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto'
- }
- },
- splitLine: { // 鍒嗛殧绾�
- show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁
- length :30, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮�
- color: 'auto'
- }
- },
- pointer : {
- width : 5
- },
- title : {
- show : false,
- offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- fontWeight: 'bolder'
- }
- },
- detail : {
- formatter:'{value}%',
- offsetCenter: [0, '60%'],
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto',
- fontWeight: 'bolder',
- fontSize:20
- }
- },
- data:[{value: 0, name: '鍒╃敤鐜�'}]
- }
- ]
- };
- let gaugeTopOption3 = {
- title : {
- x : 'center',
- y : 'bottom',
- text : 'TOP3'
- },
- tooltip : {
- formatter: "{a} <br/>{b} : {c}%"
- },
- series : [
- {
- name:'TOP3',
- type:'gauge',
- splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5
- axisLine: { // 鍧愭爣杞寸嚎
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']],
- width: 8
- }
- },
- axisTick: { // 鍧愭爣杞村皬鏍囪
- splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈�
- length :12, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: 'auto'
- }
- },
- axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto'
- }
- },
- splitLine: { // 鍒嗛殧绾�
- show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁
- length :30, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮�
- color: 'auto'
- }
- },
- pointer : {
- width : 5
- },
- title : {
- show : false,
- offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- fontWeight: 'bolder'
- }
- },
- detail : {
- formatter:'{value}%',
- offsetCenter: [0, '60%'],
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto',
- fontWeight: 'bolder',
- fontSize:20
- }
- },
- data:[{value: 0, name: '鍒╃敤鐜�'}]
- }
- ]
- };
- let gaugeTopOption4 = {
- title : {
- x : 'center',
- y : 'bottom',
- text : 'TOP4'
- },
- tooltip : {
- formatter: "{a} <br/>{b} : {c}%"
- },
- series : [
- {
- name:'TOP4',
- type:'gauge',
- splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5
- axisLine: { // 鍧愭爣杞寸嚎
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']],
- width: 8
- }
- },
- axisTick: { // 鍧愭爣杞村皬鏍囪
- splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈�
- length :12, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: 'auto'
- }
- },
- axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto'
- }
- },
- splitLine: { // 鍒嗛殧绾�
- show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁
- length :30, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮�
- color: 'auto'
- }
- },
- pointer : {
- width : 5
- },
- title : {
- show : false,
- offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- fontWeight: 'bolder'
- }
- },
- detail : {
- formatter:'{value}%',
- offsetCenter: [0, '60%'],
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto',
- fontWeight: 'bolder',
- fontSize:20
- }
- },
- data:[{value: 0, name: '鍒╃敤鐜�'}]
- }
- ]
- };
- let gaugeTopOption5 = {
- title : {
- x : 'center',
- y : 'bottom',
- text : 'TOP5'
- },
- tooltip : {
- formatter: "{a} <br/>{b} : {c}%"
- },
- series : [
- {
- name:'TOP5',
- type:'gauge',
- splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5
- axisLine: { // 鍧愭爣杞寸嚎
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']],
- width: 8
- }
- },
- axisTick: { // 鍧愭爣杞村皬鏍囪
- splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈�
- length :12, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: 'auto'
- }
- },
- axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto'
- }
- },
- splitLine: { // 鍒嗛殧绾�
- show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁
- length :30, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮�
- color: 'auto'
- }
- },
- pointer : {
- width : 5
- },
- title : {
- show : false,
- offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- fontWeight: 'bolder'
- }
- },
- detail : {
- formatter:'{value}%',
- offsetCenter: [0, '60%'],
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto',
- fontWeight: 'bolder',
- fontSize:20
- }
- },
- data:[{value: 0, name: '鍒╃敤鐜�'}]
- }
- ]
- };
- let gaugeLessOption1 = {
- title : {
- x : 'center',
- y : 'bottom',
- text : 'LAST1'
- },
- tooltip : {
- formatter: "{a} <br/>{b} : {c}%"
- },
- series : [
- {
- name:'LAST1',
- type:'gauge',
- splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5
- axisLine: { // 鍧愭爣杞寸嚎
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']],
- width: 8
- }
- },
- axisTick: { // 鍧愭爣杞村皬鏍囪
- splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈�
- length :12, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: 'auto'
- }
- },
- axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto'
- }
- },
- splitLine: { // 鍒嗛殧绾�
- show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁
- length :30, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮�
- color: 'auto'
- }
- },
- pointer : {
- width : 5
- },
- title : {
- show : false,
- offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- fontWeight: 'bolder'
- }
- },
- detail : {
- formatter:'{value}%',
- offsetCenter: [0, '60%'],
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto',
- fontWeight: 'bolder',
- fontSize:20
- }
- },
- data:[{value: 0, name: '鍒╃敤鐜�'}]
- }
- ]
- };
- let gaugeLessOption2 = {
- title : {
- x : 'center',
- y : 'bottom',
- text : 'LAST2'
- },
- tooltip : {
- formatter: "{a} <br/>{b} : {c}%"
- },
- series : [
- {
- name:'LAST2',
- type:'gauge',
- splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5
- axisLine: { // 鍧愭爣杞寸嚎
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']],
- width: 8
- }
- },
- axisTick: { // 鍧愭爣杞村皬鏍囪
- splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈�
- length :12, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: 'auto'
- }
- },
- axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto'
- }
- },
- splitLine: { // 鍒嗛殧绾�
- show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁
- length :30, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮�
- color: 'auto'
- }
- },
- pointer : {
- width : 5
- },
- title : {
- show : false,
- offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- fontWeight: 'bolder'
- }
- },
- detail : {
- formatter:'{value}%',
- offsetCenter: [0, '60%'],
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto',
- fontWeight: 'bolder',
- fontSize:20
- }
- },
- data:[{value: 0, name: '鍒╃敤鐜�'}]
- }
- ]
- };
- let gaugeLessOption3 = {
- title : {
- x : 'center',
- y : 'bottom',
- text : 'LAST3'
- },
- tooltip : {
- formatter: "{a} <br/>{b} : {c}%"
- },
- series : [
- {
- name:'LAST3',
- type:'gauge',
- splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5
- axisLine: { // 鍧愭爣杞寸嚎
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']],
- width: 8
- }
- },
- axisTick: { // 鍧愭爣杞村皬鏍囪
- splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈�
- length :12, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: 'auto'
- }
- },
- axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto'
- }
- },
- splitLine: { // 鍒嗛殧绾�
- show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁
- length :30, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮�
- color: 'auto'
- }
- },
- pointer : {
- width : 5
- },
- title : {
- show : false,
- offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- fontWeight: 'bolder'
- }
- },
- detail : {
- formatter:'{value}%',
- offsetCenter: [0, '60%'],
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto',
- fontWeight: 'bolder',
- fontSize:20
- }
- },
- data:[{value: 0, name: '鍒╃敤鐜�'}]
- }
- ]
- };
- let gaugeLessOption4 = {
- title : {
- x : 'center',
- y : 'bottom',
- text : 'LAST4'
- },
- tooltip : {
- formatter: "{a} <br/>{b} : {c}%"
- },
- series : [
- {
- name:'LAST4',
- type:'gauge',
- splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5
- axisLine: { // 鍧愭爣杞寸嚎
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']],
- width: 8
- }
- },
- axisTick: { // 鍧愭爣杞村皬鏍囪
- splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈�
- length :12, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: 'auto'
- }
- },
- axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto'
- }
- },
- splitLine: { // 鍒嗛殧绾�
- show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁
- length :30, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮�
- color: 'auto'
- }
- },
- pointer : {
- width : 5
- },
- title : {
- show : false,
- offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- fontWeight: 'bolder'
- }
- },
- detail : {
- formatter:'{value}%',
- offsetCenter: [0, '60%'],
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto',
- fontWeight: 'bolder',
- fontSize:20
- }
- },
- data:[{value: 0, name: '鍒╃敤鐜�'}]
- }
- ]
- };
- let gaugeLessOption5 = {
- title : {
- x : 'center',
- y : 'bottom',
- text : 'LAST5'
- },
- tooltip : {
- formatter: "{a} <br/>{b} : {c}%"
- },
- series : [
- {
- name:'LAST5',
- type:'gauge',
- splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5
- axisLine: { // 鍧愭爣杞寸嚎
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']],
- width: 8
- }
- },
- axisTick: { // 鍧愭爣杞村皬鏍囪
- splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈�
- length :12, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
- color: 'auto'
- }
- },
- axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto'
- }
- },
- splitLine: { // 鍒嗛殧绾�
- show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁
- length :30, // 灞炴�ength鎺у埗绾块暱
- lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮�
- color: 'auto'
- }
- },
- pointer : {
- width : 5
- },
- title : {
- show : false,
- offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- fontWeight: 'bolder'
- }
- },
- detail : {
- formatter:'{value}%',
- offsetCenter: [0, '60%'],
- textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE
- color: 'auto',
- fontWeight: 'bolder',
- fontSize:20
- }
- },
- data:[{value: 0, name: '鍒╃敤鐜�'}]
- }
- ]
- };
- if(this.TopLastList != null){
- this.utilizationRateTopOne=0
- this.utilizationRateTopOneEquipment = 'TOP1'
- this.utilizationRateTopTwo=0
- this.utilizationRateTopTwoEquipment = 'TOP2'
- this.utilizationRateTopThree=0
- this.utilizationRateTopThreeEquipment = 'TOP3'
- this.utilizationRateTopFour =0
- this.utilizationRateTopFourEquipment = 'TOP4'
- this.utilizationRateTopFive=0
- this.utilizationRateTopFiveEquipment = 'TOP5'
- this.utilizationRateLastOne=0
- this.utilizationRateLastOneEquipment = 'LAST1'
- this.utilizationRateLastTwo=0
- this.utilizationRateLastTwoEquipment = 'LAST2'
- this.utilizationRateLastThree=0
- this.utilizationRateLastThreeEquipment = 'LAST3'
- this.utilizationRateLastFour=0
- this.utilizationRateLastFourEquipment = 'LAST4'
- this.utilizationRateLastFive=0
- this.utilizationRateLastFiveEquipment = 'LAST5'
- if(this.TopLastList.tops){
- for(var i = 0;i<this.TopLastList.tops.length;i++){
- if(i == 0){
- this.utilizationRateTopOneEquipment=this.TopLastList.tops[0].equipmentId
- this.utilizationRateTopOne=this.TopLastList.tops[0].utilizationRate
- }else if(i == 1){
- this.utilizationRateTopTwoEquipment=this.TopLastList.tops[1].equipmentId
- this.utilizationRateTopTwo=this.TopLastList.tops[1].utilizationRate
- }else if(i == 2){
- this.utilizationRateTopThreeEquipment=this.TopLastList.tops[2].equipmentId
- this.utilizationRateTopThree=this.TopLastList.tops[2].utilizationRate
- }else if(i == 3){
- this.utilizationRateTopFourEquipment=this.TopLastList.tops[3].equipmentId
- this.utilizationRateTopFour=this.TopLastList.tops[3].utilizationRate
- }else if(i == 4){
- this.utilizationRateTopFiveEquipment=this.TopLastList.tops[4].equipmentId
- this.utilizationRateTopFive=this.TopLastList.tops[4].utilizationRate
- }
- }
- }
- if(this.TopLastList.lasts){
- for(var j = 0;j<this.TopLastList.lasts.length;j++){
- if(j == 0){
- this.utilizationRateLastOneEquipment=this.TopLastList.lasts[0].equipmentId
- this.utilizationRateLastOne=this.TopLastList.lasts[0].utilizationRate
- }else if(j == 1){
- this.utilizationRateLastTwoEquipment=this.TopLastList.lasts[1].equipmentId
- this.utilizationRateLastTwo=this.TopLastList.lasts[1].utilizationRate
- }else if(j == 2){
- this.utilizationRateLastThreeEquipment=this.TopLastList.lasts[2].equipmentId
- this.utilizationRateLastThree=this.TopLastList.lasts[2].utilizationRate
- }else if(j == 3){
- this.utilizationRateLastFourEquipment=this.TopLastList.lasts[3].equipmentId
- this.utilizationRateLastFour=this.TopLastList.lasts[3].utilizationRate
- }else if(j == 4){
- this.utilizationRateLastFiveEquipment=this.TopLastList.lasts[4].equipmentId
- this.utilizationRateLastFive=this.TopLastList.lasts[4].utilizationRate
- }
- }
- }
- gaugeTopOption1.title.text = this.utilizationRateTopOneEquipment
- gaugeTopOption1.series[0].data = [{value : (this.utilizationRateTopOne * 100).toFixed(2), name : '鍒╃敤鐜�'}];
- gaugeTopOption2.title.text = this.utilizationRateTopTwoEquipment
- gaugeTopOption2.series[0].data = [{value : (this.utilizationRateTopTwo * 100).toFixed(2), name : '鍒╃敤鐜�'}];
- gaugeTopOption3.title.text = this.utilizationRateTopThreeEquipment
- gaugeTopOption3.series[0].data = [{value : (this.utilizationRateTopThree * 100).toFixed(2), name : '鍒╃敤鐜�'}];
- gaugeTopOption4.title.text = this.utilizationRateTopFourEquipment
- gaugeTopOption4.series[0].data = [{value : (this.utilizationRateTopFour * 100).toFixed(2), name : '鍒╃敤鐜�'}];
- gaugeTopOption5.title.text = this.utilizationRateTopFiveEquipment
- gaugeTopOption5.series[0].data = [{value : (this.utilizationRateTopFive * 100).toFixed(2), name : '鍒╃敤鐜�'}];
-
- gaugeLessOption1.title.text = this.utilizationRateLastOneEquipment
- gaugeLessOption1.series[0].data = [{value : (this.utilizationRateLastOne * 100).toFixed(2), name : '鍒╃敤鐜�'}];
- gaugeLessOption2.title.text = this.utilizationRateLastTwoEquipment
- gaugeLessOption2.series[0].data = [{value : (this.utilizationRateLastTwo * 100).toFixed(2), name : '鍒╃敤鐜�'}];
- gaugeLessOption3.title.text = this.utilizationRateLastThreeEquipment
- gaugeLessOption3.series[0].data = [{value : (this.utilizationRateLastThree * 100).toFixed(2), name : '鍒╃敤鐜�'}];
- gaugeLessOption4.title.text = this.utilizationRateLastFourEquipment
- gaugeLessOption4.series[0].data = [{value : (this.utilizationRateLastFour * 100).toFixed(2), name : '鍒╃敤鐜�'}];
- gaugeLessOption5.title.text = this.utilizationRateLastFiveEquipment
- gaugeLessOption5.series[0].data = [{value : (this.utilizationRateLastFive * 100).toFixed(2), name : '鍒╃敤鐜�'}];
- gaugeTopChart1.setOption(gaugeTopOption1);
- gaugeTopChart2.setOption(gaugeTopOption2);
- gaugeTopChart3.setOption(gaugeTopOption3);
- gaugeTopChart4.setOption(gaugeTopOption4);
- gaugeTopChart5.setOption(gaugeTopOption5);
- gaugeLastChart1.setOption(gaugeLessOption1);
- gaugeLastChart2.setOption(gaugeLessOption2);
- gaugeLastChart3.setOption(gaugeLessOption3);
- gaugeLastChart4.setOption(gaugeLessOption4);
- gaugeLastChart5.setOption(gaugeLessOption5);
- }else{
- gaugeTopChart1.setOption(gaugeTopOption1);
- gaugeTopChart2.setOption(gaugeTopOption2);
- gaugeTopChart3.setOption(gaugeTopOption3);
- gaugeTopChart4.setOption(gaugeTopOption4);
- gaugeTopChart5.setOption(gaugeTopOption5);
- gaugeLastChart1.setOption(gaugeLessOption1);
- gaugeLastChart2.setOption(gaugeLessOption2);
- gaugeLastChart3.setOption(gaugeLessOption3);
- gaugeLastChart4.setOption(gaugeLessOption4);
- gaugeLastChart5.setOption(gaugeLessOption5);
- }
- gaugeTopChart1.setOption(gaugeTopOption1);
- gaugeTopChart2.setOption(gaugeTopOption2);
- gaugeTopChart3.setOption(gaugeTopOption3);
- gaugeTopChart4.setOption(gaugeTopOption4);
- gaugeTopChart5.setOption(gaugeTopOption5);
- gaugeLastChart1.setOption(gaugeLessOption1);
- gaugeLastChart2.setOption(gaugeLessOption2);
- gaugeLastChart3.setOption(gaugeLessOption3);
- gaugeLastChart4.setOption(gaugeLessOption4);
- gaugeLastChart5.setOption(gaugeLessOption5);
- window.addEventListener('resize', function() {
- gaugeTopChart1.resize()
- gaugeTopChart2.resize()
- gaugeTopChart3.resize()
- gaugeTopChart4.resize()
- gaugeTopChart5.resize()
- gaugeLastChart1.resize()
- gaugeLastChart2.resize()
- gaugeLastChart3.resize()
- gaugeLastChart4.resize()
- gaugeLastChart5.resize()
- })
- }
-
- }
- }
-</script>
-
-<style scoped>
- .div-inline{
- flex: 1;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue b/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue
deleted file mode 100644
index 32121ec..0000000
--- a/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue
+++ /dev/null
@@ -1,535 +0,0 @@
-<template>
- <div :bordered="false" class="device_list">
- <div class="com_box">
- <!-- 鏌ヨ鍖哄煙 -->
- <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <!--<a-col :md="5" :sm="5">-->
- <!--<a-form-item label="鍚嶇О">-->
- <!--<a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" :readOnly="readOnly" v-model="queryParam.tierName"></a-input>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <a-col :md="5" :sm="5">
- <a-form-item label="璁惧">
- <a-input-search :readOnly="true" v-model="queryParam.equipmentId" @search="deviceSearch"
- placeholder='璇烽�夋嫨璁惧'/>
- </a-form-item>
- </a-col>
-
- <a-col :md="5" :sm="5">
- <a-form-item label="椹卞姩绫诲瀷">
- <!--<j-dict-select-tag placeholder="璇烽�夋嫨椹卞姩绫诲瀷"-->
- <!--:triggerChange="true" dictCode="mdc_driveType"-->
- <!--v-model="queryParam.driveType" allow-clear/>-->
- <a-auto-complete
- v-model="queryParam.driveType"
- :data-source="driveTypeList"
- placeholder="椹卞姩绫诲瀷"
- :filter-option="filterOption"
- :allowClear="true"
- />
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="6" :xs="6">
- <a-form-item label="鏃堕棿">
- <a-range-picker @change="dateParamChange" v-model="dates" format="YYYYMMDD"/>
- </a-form-item>
- </a-col>
- <a-col>
- <a-space>
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
- </a-space>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <!-- table鍖哄煙-begin -->
- <div id="DeviceList">
- <a-tabs :activeKey="activeKey" @change="tabChange" tabPosition="top">
- <a-tab-pane key="1" tab="鍥惧舰">
- <ComparativeAnalysisBar ref="AnalysisBar" :dataList='AnalysisBarList'></ComparativeAnalysisBar>
- </a-tab-pane>
- <a-tab-pane key="2" tab="浠〃" forceRender>
- <ComparativeAnalysisGauge ref="AnalysisGauge" :dataList="AnalysisGauge"></ComparativeAnalysisGauge>
- </a-tab-pane>
- <a-tab-pane key="3" tab="楗煎浘" forceRender>
- <ComparativeAnalysisPie ref="AnalysisPie" :dataList="AnalysisPie"></ComparativeAnalysisPie>
- </a-tab-pane>
- </a-tabs>
- </div>
- <!-- table鍖哄煙-end -->
- </div>
-
- <SelectDeviceDrawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'閫夋嫨璁惧'"></SelectDeviceDrawer>
- </div>
-</template>
-
-<script>
- import moment from 'moment'
- import $ from 'jquery'
- import JDictSelectTag from '@/components/dict/JDictSelectTag'
- import JDate from '../../../../../components/jeecg/JDate'
- import {
- requestPut,
- deleteAction,
- getAction
- } from '@/api/manage'
- import ComparativeAnalysisBar from './ComparativeAnalysisBar'
- import ComparativeAnalysisGauge from './ComparativeAnalysisGauge'
- import ComparativeAnalysisPie from './ComparativeAnalysisPie'
- import '@/components/table2excel/table2excel'
- import JInput from '@/components/jeecg/JInput'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import Tooltip from 'ant-design-vue/es/tooltip'
- import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
- import api from '@/api/mdc'
- import SelectDeviceDrawer from '../../../../system/modules/SelectDeviceDrawer.vue'
-
- export default {
- name: 'ComparativeAnalysisMain',
- // mixins: [JeecgListMixin],
- components: {
- Tooltip,
- ComparativeAnalysisBar,
- ComparativeAnalysisGauge,
- ComparativeAnalysisPie,
- JDictSelectTag,
- JInput,
- JDate,
- JEllipsis,
- SelectDeviceDrawer
- },
- props: { nodeTree: '', Type: '', nodePeople: '' },
- data() {
- return {
- activeKey: '1',
- typeTree: '',
- typeParent: 1,
- typeEquipment: 1,
- AnalysisBarList: [],
- AnalysisGauge: [],
- AnalysisPie: [],
- dates: [],
- xianshi: '',
- readOnly: true,
- queryParam: {
- equipmentId: ''
- },
- queryParams: {},
- queryParamEquip: {},
- queryParamPeople: {},
- dataStartsoucre: [],
- url: {
- comparativeAnalysis: '/mdc/efficiencyReport/comparativeAnalysis'
- },
- AnalysisList: {},
- driveTypeList: []
- }
- },
- watch: {
- Type(valmath) {
- this.dataList = []
- this.queryParams.typeTree = valmath
- // console.log(this.queryParams.typeTree)
- },
- nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId) {
- // this.$set(this.queryParam, 'tierName', val.title)
- this.queryParamEquip.parentId = ''
- // this.queryParams.equipmentId = val.equipmentId
- this.queryParam.equipmentId = val.equipmentId
- this.queryParamEquip.equipmentId = val.equipmentId
- } else {
- // this.$set(this.queryParam, 'tierName', val.title)
- this.queryParamEquip.parentId = val.key
- this.queryParams.equipmentId = ''
- }
- this.searchQuery()
- }
- },
- nodePeople(val) {
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId) {
- // this.$set(this.queryParam, 'tierName', val.title)
- this.queryParamEquip.parentId = ''
- this.queryParams.equipmentId = val.equipmentId
- this.queryParamEquip.equipmentId = val.equipmentId
- } else {
- // this.$set(this.queryParam, 'tierName', val.title)
- this.queryParamEquip.parentId = val.key
- this.queryParams.equipmentId = ''
- }
- this.searchQuery()
- }
- }
- },
- methods: {
- tabChange(val) {
- this.activeKey = val
- },
- dateParamChange(v1, v2) {
- // console.log(v1,v2)
- this.queryParam.startTime = v2[0]
- this.queryParam.endTime = v2[1]
- console.log(v2[0], v2[1])
- },
- loadAnalysis() {
- getAction(this.url.comparativeAnalysis, this.queryParam).then(res => {
- if (res.success) {
- this.AnalysisList = res.result
- this.AnalysisBarList = res.result.graphics
- this.AnalysisGauge = res.result.meters
- this.AnalysisPie.push(res.result.pieCharts)
- } else {
- this.$message.warning(res.message)
- }
- }).finally(() => {
- this.loading = false
- })
- },
- searchQuery() {
- if (this.dates && this.dates.length > 0) {
- this.AnalysisList = []
- this.AnalysisBarList = []
- this.AnalysisGauge = []
- this.AnalysisPie = []
- if (this.queryParams.typeTree == '1') {
- this.queryParams.parentId = this.queryParamEquip.parentId
- // this.queryParams.equipmentId = this.queryParamEquip.equipmentId
- } else {
- this.queryParams.parentId = this.queryParamEquip.parentId
- // this.queryParams.equipmentId = ""
- }
- this.AnalysisList = []
- //鑾峰彇鏌ヨ鏉′欢
- this.queryParam.parentId = this.queryParams.parentId
- // this.queryParam.equipmentId = this.queryParams.equipmentId
- this.queryParam.typeTree = this.queryParams.typeTree
- getAction(this.url.comparativeAnalysis, this.queryParam).then((res) => {
- if (res.success) {
- this.AnalysisList = res.result
- this.AnalysisBarList = res.result.graphics
- this.AnalysisGauge = res.result.meters
- this.AnalysisPie.push(res.result.pieCharts)
- } else {
- // this.$message.warning(res.message)
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- this.loading = false
- })
- } else {
- this.$notification.warning({
- message: '鎻愮ず',
- description: '璇烽�夋嫨鏃堕棿'
- })
- }
-
- },
- searchReset() {
- this.AnalysisList = []
- this.AnalysisBarList = []
- this.AnalysisGauge = []
- this.AnalysisPie = []
- if (this.queryParams.typeTree == '1') {
- this.typeTree = this.queryParams.typeTree
- this.typeParent = this.queryParams.parentId
- this.typeEquipment = this.queryParams.equipmentId
- this.queryParams = {}
- this.queryParam = {}
- this.dates = []
- this.queryParams.typeTree = this.typeTree
- this.queryParams.parentId = this.typeParent
- if (this.queryParams.parentId != '') {
- this.queryParams.equipmentId = ''
- } else {
- if (this.queryParams.equipmentId == this.queryParamEquip.equipmentId) {
- this.queryParams.equipmentId = this.typeEquipment
- } else {
- this.queryParams.equipmentId = this.queryParamEquip.equipmentId
- }
- }
- getAction(this.url.comparativeAnalysis, this.queryParams).then((res) => {
- if (res.success) {
- this.AnalysisList = res.result
- this.AnalysisBarList = res.result.graphics
- this.AnalysisGauge = res.result.meters
- this.AnalysisPie.push(res.result.pieCharts)
- } else {
- // this.$message.warning(res.message)
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- this.loading = false
- })
- } else {
- this.typeTree = this.queryParams.typeTree
- this.typeParent = this.queryParams.parentId
- this.typeEquipment = this.queryParams.equipmentId
- this.queryParams = {}
- this.queryParam = {}
- this.dates = []
- this.queryParams.typeTree = this.typeTree
- this.queryParams.parentId = this.typeParent
- if (this.queryParams.parentId != '') {
- this.queryParams.equipmentId = ''
- } else {
- if (this.queryParams.equipmentId == this.queryParamEquip.equipmentId) {
- this.queryParams.equipmentId = this.typeEquipment
- } else {
- this.queryParams.equipmentId = this.queryParamEquip.equipmentId
- }
- }
- getAction(this.url.comparativeAnalysis, this.queryParams).then((res) => {
- if (res.success) {
- this.AnalysisList = res.result
- this.AnalysisBarList = res.result.graphics
- this.AnalysisGauge = res.result.meters
- this.AnalysisPie.push(res.result.pieCharts)
- } else {
- // this.$message.warning(res.message)
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- this.loading = false
- })
- }
- },
- /**
- * 璋冪敤鎺ュ彛鑾峰彇鎺у埗绯荤粺绫诲瀷
- */
- getDriveTypeByApi() {
- api.getDriveTypeApi().then((res) => {
- this.driveTypeList = res.result.map(item => item.value)
- })
- },
- /**
- * 鑱旀兂杈撳叆妗嗙瓫閫夊姛鑳�
- * @param input 杈撳叆鐨勫唴瀹�
- * @param option 閰嶇疆
- * @returns {boolean} 鍒ゆ柇鏄惁绛涢��
- */
- filterOption(input, option) {
- return (
- option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0
- )
- },
- // onChange(value, dateString) {
- // // console.log('Selected Time: ', value);
- // // console.log('Formatted Selected Time: ', dateString);
- // },
- // searchReset() {
- // if(this.queryParams.typeTree == "1"){
- // this.typeTree = this.queryParams.typeTree
- // this.typeParent = this.queryParams.parentId
- // this.typeEquipment = this.queryParams.equipmentId
- // this.queryParams = {}
- // this.queryParam = {}
- // this.dates = []
- // this.queryParams.typeTree = this.typeTree
- // this.queryParams.parentId = this.typeParent
- // if(this.queryParams.parentId != ""){
- // this.queryParams.equipmentId = ""
- // }else{
- // if(this.queryParams.equipmentId == this.queryParamEquip.equipmentId){
- // this.queryParams.equipmentId = this.typeEquipment
- // }else{
- // this.queryParams.equipmentId = this.queryParamEquip.equipmentId
- // }
- //
- // }
- //
- // this.ipagination.current = 1
- // this.ResetloadData();
- // }else{
- // this.typeTree = this.queryParams.typeTree
- // this.typeParent = this.queryParams.parentId
- // // this.typeEquipment = this.queryParams.equipmentId
- // this.queryParams = {}
- // this.queryParam = {}
- // this.dates = []
- // this.queryParams.typeTree = this.typeTree
- // this.queryParams.parentId = this.typeParent
- // // this.queryParams.equipmentId = this.typeEquipment
- // this.ipagination.current = 1
- // this.ResetloadData();
- // }
- //
- // },
- // ResetloadData() {
- // if(!this.url.list){
- // this.$message.error("璇疯缃畊rl.list灞炴��!")
- // return
- // }
- // var params = {}
- // params.typeTree = this.queryParams.typeTree
- // params.parentId = this.queryParams.parentId
- // params.equipmentId = this.queryParams.equipmentId
- // this.loading = true;
- // getAction(this.url.list, params).then((res) => {
- // if (res.success) {
- // this.dataSource = res.result.records||res.result;
- // }else{
- // this.$message.warning(res.message)
- // }
- // }).finally(() => {
- // this.loading = false
- // })
- // },
- // searchQuery(){
- // if(this.queryParams.typeTree == "1"){
- // this.queryParams.parentId = this.queryParamEquip.parentId
- // // this.queryParams.equipmentId = this.queryParamEquip.equipmentId
- //
- // }else{
- // this.queryParams.parentId = this.queryParamPeople.parentId
- //
- // // this.queryParams.equipmentId = ""
- // }
- // this.dataSource = [];
- // //鑾峰彇鏌ヨ鏉′欢
- // let param = {}
- // param.parentId = this.queryParams.parentId;
- // param.equipmentId = this.queryParams.equipmentId;
- // param.startTime = this.queryParam.startTime;
- // param.driveType = this.queryParam.driveType;
- // param.endTime = this.queryParam.endTime;
- // getAction(this.url.list,param).then((res) => {
- // if(res.success){
- // this.dataSource = res.result.records||res.result;
- // }else{
- // this.$message.warning(res.message)
- // }
- // }).finally(() => {
- // this.loading = false
- // })
- // },
- // loadData() {
- // if(!this.url.list){
- // this.$message.error("璇疯缃畊rl.list灞炴��!")
- // return
- // }
- // //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
- // var params = {}
- // this.loading = true;
- // params.startTime = this.queryParam.startTime;
- // params.endTime = this.queryParam.endTime;
- // params.typeTree = this.queryParams.typeTree
- // getAction(this.url.list, params).then((res) => {
- // if (res.success) {
- // this.dataSource = res.result.records||res.result;
- // }else{
- // this.$message.warning(res.message)
- // }
- // }).finally(() => {
- // this.loading = false
- // })
- // },
- deviceSearch() {
- console.log('瑙﹀彂')
- this.$refs.selectDeviceDrawer.visible = true
- this.$refs.selectDeviceDrawer.selectedRowKeys = []
- this.$refs.selectDeviceDrawer.selectedRows = []
- this.$refs.selectDeviceDrawer.checkedKeys = this.queryParam.equipmentId.split(',')
- },
-
- /**
- * 閫夋嫨宸叉湁璁惧鍚庣偣鍑荤‘瀹氭椂瑙﹀彂
- * @param data 宸查�夋嫨鐨勮澶�
- */
- selectOK(data) {
- // let params = {}
- // params.equipmentIdList = []
- // for (var a = 0; a < data.length; a++) {
- // params.equipmentIdList.push(data[a])
- // }
- console.log('data=', data)
- this.queryParam.equipmentId = data.join(',')
- console.log('queryParam', this.queryParam.equipmentId)
- }
- },
- created() {
- this.dates = [moment().subtract('days', 7), moment().subtract('days', 0)]
- this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD')
- this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
- this.queryParam.typeTree = '1'
- this.loadAnalysis()
- this.getDriveTypeByApi()
- }
- }
-</script>
-
-<style lang="less" scoped>
- /*@import '~@assets/less/common.less';*/
-
- @media screen and (min-width: 1920px) {
- .device_list {
- height: 811px !important;
- overflow: scroll;
- }
- }
-
- @media screen and (min-width: 1680px) and (max-width: 1920px) {
- .device_list {
- height: 811px !important;
- overflow: scroll;
- }
- }
-
- @media screen and (min-width: 1400px) and (max-width: 1680px) {
- .device_list {
- height: 663px !important;
- overflow: scroll;
- }
- }
-
- @media screen and (min-width: 1280px) and (max-width: 1400px) {
- .device_list {
- height: 564px !important;
- overflow: scroll;
- }
- }
-
- @media screen and (max-width: 1280px) {
- .device_list {
- height: 564px !important;
- overflow: scroll;
- }
- }
-
- /*.device_list{*/
- /*display: flex;*/
- /*}*/
- /*.device_list .table-page-search-wrapper{*/
- /**/
- /*}*/
- /deep/ .ant-card-body {
- height: 100% !important;
- }
-
- .device_list .com_box {
- display: flex !important;
- height: 100% !important;
- flex-direction: column !important;
- }
-
- .device_list .table-page-search-wrapper {
- height: 6% !important;
- }
-
- .device_list #DeviceList {
- height: 90% !important;
- }
-</style>
diff --git a/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisPie.vue b/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisPie.vue
deleted file mode 100644
index 70872cb..0000000
--- a/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisPie.vue
+++ /dev/null
@@ -1,153 +0,0 @@
-<template>
- <div class="comparative_pie" style="width: 100%;height: 600px;display: flex;overflow: scroll">
- <div id="compAnalPie1" style="flex: 1;"></div>
- <div id="compAnalPie2" style="flex: 1;"></div>
- </div>
-</template>
-
-<script>
- import * as echarts from 'echarts'
- export default {
- name: 'conparativeAnalysisPie',
- props:{ dataList:''},
- data(){
- return{
- closeRate:0,
- openRate:0,
- usedRate:0,
- waitRate:0,
- RateList:[]
- }
- },
- created(){
-
- },
- watch:{
- dataList(val){
- this.RateList = val
- console.log(val)
- this.drawTu()
- },
- },
- mounted() {
- this.drawTu()
- },
- methods:{
- drawTu(){
- let pieCompChart1 = this.$echarts.init(document.getElementById('compAnalPie1'),'macarons');
- let pieCompChart2 = this.$echarts.init(document.getElementById('compAnalPie2'),'macarons');
- let pieCompChartOption1 = {
- title: {
- x: 'center',
- subtext: '寮�鏈烘晥鐜�'
- },
- tooltip: {
- trigger: 'item',
- formatter: "{a} <br/>{b} : {c} ({d}%)"
- },
- legend: {
- orient: 'vertical',
- x: 'left',
- y: 'bottom',
- data: ['寮�鏈虹巼', '鍏虫満鐜�']
- },
- calculable: true,
- series: [{
- name: '寮�鏈烘晥鐜�',
- type: 'pie',
- radius: '70%',
- center: ['55%', '55%'],
- itemStyle: {
- normal: {
- color: function (params) {
- var colorList = ['#4169E1', '#A8A8A8'];
- return colorList[params.dataIndex]
- },
- label: {
- show: true,
- position: 'top',
- formatter: '{b}\n{c}'
- }
- }
- },
- data: [{value: 0, name: '寮�鏈虹巼'},
- {value: 0, name: '鍏虫満鐜�'}]
- }]
- };
- let pieCompChartOption2 = {
- title: {
- x: 'center',
- subtext: '杩愯鏁堢巼'
- },
- tooltip: {
- trigger: 'item',
- formatter: "{a} <br/>{b} : {c} ({d}%)"
- },
- legend: {
- orient: 'vertical',
- x: 'left',
- y: 'bottom',
- data: ['鍔犲伐鐜�', '寰呮満鐜�', '鍏虫満鐜�']
- },
- calculable: true,
- series: [{
- name: '杩愯鏁堢巼',
- type: 'pie',
- radius: '70%',
- center: ['55%', '55%'],
- itemStyle: {
- normal: {
- color: function (params) {
- var colorList = ['#00ee00', '#FCCE10', '#A8A8A8'];
- return colorList[params.dataIndex]
- },
- label: {
- show: true,
- position: 'top',
- formatter: '{b}\n{c}'
- }
- }
- },
- data: [{value: 0, name: '鍔犲伐鐜�'},
- {value: 0, name: '寰呮満鐜�'},
- {value: 0, name: '鍏虫満鐜�'}]
- }]
- };
- if(this.RateList != null){
- this.closeRate =[]
- this.openRate =[]
- this.usedRate = []
- this.waitRate = []
- if(this.RateList.length>0){
- this.closeRate=this.RateList[0].closeRate
- this.openRate=this.RateList[0].openRate
- this.usedRate=this.RateList[0].processRate
- this.waitRate=this.RateList[0].waitRate
- pieCompChartOption1.series[0].data = [{value:(this.openRate * 100).toFixed(2), name:'寮�鏈虹巼'},{value:(this.closeRate * 100).toFixed(2), name:'鍏虫満鐜�'}];
- pieCompChartOption2.series[0].data = [{value:(this.usedRate * 100).toFixed(2), name:'鍔犲伐鐜�'},{value:(this.waitRate * 100).toFixed(2), name:'寰呮満鐜�'},{value:(this.closeRate * 100).toFixed(2), name:'鍏虫満鐜�'}];
- pieCompChart1.setOption(pieCompChartOption1);
- pieCompChart2.setOption(pieCompChartOption2);
- }else{
- pieCompChart1.setOption(pieCompChartOption1);
- pieCompChart2.setOption(pieCompChartOption2);
- }
-
- }else{
- pieCompChart1.setOption(pieCompChartOption1);
- pieCompChart2.setOption(pieCompChartOption2);
- }
-
- pieCompChart1.setOption(pieCompChartOption1);
- pieCompChart2.setOption(pieCompChartOption2);
- window.addEventListener('resize', function() {
- pieCompChart1.resize()
- pieCompChart2.resize()
- })
- }
- }
- }
-</script>
-
-<style scoped>
-
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAdd.vue b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAdd.vue
deleted file mode 100644
index a5e511a..0000000
--- a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAdd.vue
+++ /dev/null
@@ -1,528 +0,0 @@
-<template>
-
- <a-card class="tree_con" :loading="cardLoading" :bordered="false" >
- <a-spin :spinning="loading">
- <a-alert type="info" :showIcon="false" style="margin-right: 54px;padding-left: 5px">
- <div slot="message">
- <span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span>
- <span v-else>鏃�</span>
- </div>
- </a-alert>
- <div class="drawer-bootom-button">
- <a-dropdown :trigger="['click']" placement="bottomCenter">
- <a-menu slot="overlay">
- <!--<a-menu-item key="1" @click="switchCheckStrictly(1)">鐖跺瓙鍏宠仈</a-menu-item>-->
- <!--<a-menu-item key="2" @click="switchCheckStrictly(2)">鍙栨秷鍏宠仈</a-menu-item>-->
- <!--<a-menu-item key="3" @click="checkALL">鍏ㄩ儴鍕鹃��</a-menu-item>-->
- <!--<a-menu-item key="4" @click="cancelCheckALL">鍙栨秷鍏ㄩ��</a-menu-item>-->
- <a-menu-item key="1" @click="expandAll">灞曞紑鎵�鏈�</a-menu-item>
- <a-menu-item key="2" @click="closeAll">鍚堝苟鎵�鏈�</a-menu-item>
- <a-menu-item key="3" @click="refreshTree">鍒锋柊</a-menu-item>
- </a-menu>
- <a-button>
- <a-icon type="bars"/>
- </a-button>
- </a-dropdown>
- </div>
- <a-input-search @search="handleSearch" style="width:100%;margin-top: 10px" placeholder="妫�绱� 绫诲埆缂栫爜/鍚嶇О" allowClear
- v-model="searchInput" @change="handleChange"/>
-
- <a-form>
- <a-form-item>
- <a-tree ref="tree"
- checkable
- @check="onCheck"
- :checkStrictly="checkStrictly"
- :expandedKeys="expandedKeys"
- :checkedKeys="checkedKeys"
- :selectedKeys="selectedKeys"
- :treeData="treeDataSource"
- :autoExpandParent="autoExpandParent"
- @select="onSelect"
- @expand="onExpand">
- </a-tree>
-
- </a-form-item>
- </a-form>
-
- </a-spin>
-
- <!--<tier-model ref="tierModalForm" @ok="modalFormOk"></tier-model>-->
-
-
- </a-card>
- <!--<div class="drawer-bootom-button">-->
- <!--<a-dropdown style="float: left" :trigger="['click']" placement="topCenter">-->
- <!--<a-menu slot="overlay">-->
- <!--<a-menu-item key="1" @click="switchCheckStrictly(1)">鐖跺瓙鍏宠仈</a-menu-item>-->
- <!--<a-menu-item key="2" @click="switchCheckStrictly(2)">鍙栨秷鍏宠仈</a-menu-item>-->
- <!--<a-menu-item key="3" @click="checkALL">鍏ㄩ儴鍕鹃��</a-menu-item>-->
- <!--<a-menu-item key="4" @click="cancelCheckALL">鍙栨秷鍏ㄩ��</a-menu-item>-->
- <!--<a-menu-item key="5" @click="expandAll">灞曞紑鎵�鏈�</a-menu-item>-->
- <!--<a-menu-item key="6" @click="closeAll">鍚堝苟鎵�鏈�</a-menu-item>-->
- <!--</a-menu>-->
- <!--<a-button>-->
- <!--鏍戞搷浣� <a-icon type="up" />-->
- <!--</a-button>-->
- <!--</a-dropdown>-->
- <!--<!–<!–<a-popconfirm title="纭畾鏀惧純缂栬緫锛�" @confirm="close" okText="纭畾" cancelText="鍙栨秷">–>–>-->
- <!--<!–<!–<a-button style="margin-right: .8rem">鍙栨秷</a-button>–>–>-->
- <!--<!–<!–</a-popconfirm>–>–>-->
- <!--<!–<!–<a-button @click="handleSubmit(false)" type="primary" :loading="loading" ghost style="margin-right: 0.8rem">浠呬繚瀛�</a-button>–>–>-->
- <!--<!–<!–<a-button @click="handleSubmit(true)" type="primary" :loading="loading">淇濆瓨骞跺叧闂�</a-button>–>–>-->
- <!--</div>-->
-</template>
-
-<script>
- import {
- getAction,
- postAction,
- deleteAction
- } from '@/api/manage'
- import Tooltip from 'ant-design-vue/es/tooltip'
- // import TierModel from './modules/baseTree/TierModel'
-
- export default {
- name: 'BaseTree',
- props: {
- editDisable: {
- type: Boolean,
- default() {
- return true
- }
- }
- },
- components: {
- Tooltip,
- // TierModel
- },
- data() {
- return {
- searchInput: '',
- cardLoading: false,
- loading: false,
- treeDataSource: [],
- selectedKeys: [],
- expandedKeys: [],
- checkedKeys:[],
- checkedId:[],
- url: {
- getBaseTree: '/mdc/mdcequipment/loadTree',
- deleteBatch: '/mdc/mdcequipment/deleteBatch'
- },
- searchValue: '',
- dataList: [],
- autoExpandParent: false,
- checkStrictly: false,
- allTreeKeys: [],
- currSelected: {},
- currentSlectList:[],
- hiding: false,
- mathChange:''
- }
- }
- ,
- created() {
- this.queryTreeData()
- // this.closeAll()
- }
- ,
- methods: {
- switchCheckStrictly (v) {
- if(v==1){
- this.checkStrictly = false
- }else if(v==2){
- this.checkStrictly = true
- }
- },
- checkALL (e) {
- this.checkedKeys = this.allTreeKeys
- // console.log(this.checkedKeys);
- this.currentSlectList = this.treeDataSource;
- // console.log(this.currentSlectList)
- },
- cancelCheckALL () {
- //this.checkedKeys = this.defaultCheckedKeys
- this.checkedKeys = [];
- this.currentSlectList = [];
- // console.log(this.checkedKeys);
- // console.log(this.currentSlectList)
- },
- onCheck (o,checkedNodes) {
- console.log(o);
- console.log(checkedNodes);
- if(this.checkStrictly){
- this.checkedKeys = o.checked;
- }else{
- this.checkedKeys = o
- }
- // console.log(checkedNodes)
- // console.log(o)
- // console.log(o.checked)
- // console.log(checkedNodes.node.dataRef);
- // console.log( this.currentSlectList);
- // if(checkedNodes.checked == true && this.checkStrictly){
- // this.currentSlectList.push(checkedNodes.node.dataRef)
- // }else if(checkedNodes.checked == false && this.checkStrictly.length == 0){
- // console.log(111)
- // }
- // console.log(this.checkStrictly)
- if(checkedNodes.checked == true){
- this.currentSlectList.push(checkedNodes.node.dataRef)
- }else{
- for(var i = 0;i<this.currentSlectList.length;i++){
- if(this.currentSlectList[i].key == checkedNodes.node.dataRef.key){
- this.currentSlectList.splice(i,1);
- }
- }
- }
- // console.log(this.currentSlectList)
- // // if(this.checkStrictly = false){
- // // if(checkedNodes.checked == true){
- // // this.currentSlectList.push(checkedNodes.node.dataRef)
- // // }else{
- // // for(var i = 0;i<this.currentSlectList.length;i++){
- // // if(this.currentSlectList[i].key == checkedNodes.node.dataRef.key){
- // // this.currentSlectList.splice(i,1);
- // // }
- // // }
- // // }
- // // console.log(this.currentSlectList);
- // // }else{
- // // console.log(checkedNodes)
- // // if(checkedNodes.checked == true){
- // // this.currentSlectList.push(checkedNodes.node.dataRef)
- // // }
- // // else{
- // // for(var i = 0;i<this.currentSlectList.length;i++){
- // // if(this.currentSlectList[i].key == checkedNodes.node.dataRef.key){
- // // this.currentSlectList.splice(i,1);
- // // }
- // // }
- // // }
- // // console.log(this.currentSlectList)
- // // }
- // // console.log( this.currentSlectList);
- // if(this.checkStrictly){
- // this.checkedKeys = o.checked;
- // console.log(checkedNodes)
- // // this.
- // console.log(this.checkedKeys)
- // }else{
- // this.checkedKeys = o;
- // console.log(this.checkedKeys)
- // }
- },
- clearSelect(){
- this.checkedKeys = [];
- this.currentSlectList = [];
- },
- getCurrSelectedTitle() {
- return !this.currSelected.title ? '' : this.currSelected.title
- }
- ,
- // onClearSelected() {
- // this.hiding = true
- // this.currSelected = {}
- // this.selectedKeys = []
- // this.$emit('sendSelectBaseTree', '')
- // },
-
- onSelect(selectedKeys, e) {
- // console.log(e);
- this.hiding = false
- let record = e.node.dataRef
- this.currSelected = Object.assign({}, record)
- // console.log(this.currSelected)
- this.selectedKeys = [record.key]
- this.$emit('sendSelectBaseTree', this.selectedKeys)
- },
- handleEdit(entity) {
- this.$refs.tierModalForm.edit(entity)
- this.$refs.tierModalForm.title = '缂栬緫灞傜骇'
- this.$refs.tierModalForm.disableSubmit = false
- },
- onExpand(expandedKeys) {
- this.expandedKeys = expandedKeys
- this.autoExpandParent = false
- },
- queryTreeData() {
- this.loading = true
- this.cardLoading = true
- getAction(this.url.getBaseTree).then((res) => {
- if (res.success) {
- this.dataList = []
- this.allTreeKeys = []
- this.treeDataSource = res.result
- this.generateList(res.result)
- } else {
- // this.$message.warn(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- this.cardLoading = false
- })
- },
- handleChange() {
- let search = this.searchInput
- let expandedKeys = this.dataList
- .map(item => {
- if (item.title.indexOf(search) > -1) {
- return this.getParentKey(item.key, this.treeDataSource)
- }
- return null
- })
- .filter((item, i, self) => item && self.indexOf(item) === i)
- Object.assign(this, {
- expandedKeys,
- searchValue: search,
- autoExpandParent: true
- })
- }
- ,
- handleSearch(value) {
- let search = value
- let expandedKeys = this.dataList
- .map(item => {
- if (item.title.indexOf(search) > -1) {
- return this.getParentKey(item.key, this.treeDataSource)
- }
- return null
- })
- .filter((item, i, self) => item && self.indexOf(item) === i)
- Object.assign(this, {
- expandedKeys,
- searchValue: search,
- autoExpandParent: true
- })
- }
- ,
- getParentKey(key, tree) {
- let parentKey
- for (let i = 0; i < tree.length; i++) {
- const node = tree[i]
- if (node.children) {
- if (node.children.some(item => item.key === key)) {
- parentKey = node.key
- } else if (
- this.getParentKey(key, node.children)) {
- parentKey = this.getParentKey(key, node.children)
- }
- }
- }
- return parentKey
- },
-
- generateList(data) {
- for (let i = 0; i < data.length; i++) {
- const node = data[i]
- const key = node.key
- const title = node.title
- this.dataList.push({
- key,
- title: title
- })
- this.allTreeKeys.push(key)
- if (node.children) {
- this.generateList(node.children)
- }
- }
- },
- expandAll() {
- this.expandedKeys = this.allTreeKeys
- },
- closeAll() {
- this.expandedKeys = ['-1']
- },
- refreshTree() {
- this.queryTreeData()
- },
- batchDel: function(entity) {
- if (!this.url.deleteBatch) {
- this.$message.error('璇疯缃畊rl.deleteBatch灞炴��!')
- return
- }
- let ids = entity.id
- if (!ids) {
- // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒')
- this.$notification.warning({
- message:'娑堟伅',
- description:'璇烽�夋嫨涓�鏉¤褰�'
- });
- return
- } else {
- var that = this
- this.$confirm({
- title: '纭鍒犻櫎',
- content: '鏄惁鍒犻櫎閫変腑鏁版嵁?',
- onOk: function() {
- that.loading = true
- deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => {
- if (res.success) {
- // that.$message.success(res.message)
- that.$notification.success({
- message:'娑堟伅',
- description:res.message
- });
- that.queryTreeData();
- } else {
- // that.$message.warning(res.message)
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- that.loading = false
- })
- }
- })
- }
- },
- modalFormOk(val) {
- console.log("mmm")
- // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- this.queryTreeData()
- // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- }
-
- }
- ,
- //鐩戝惉
- watch: {
- currSelected(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
- this.$emit('getCurrSelected', val)
-
- },
- currentSlectList(msg){
- this.$emit('getcurrentSlectList',msg)
- },
- checkedKeys(valId){
- this.$emit('getcheckedKeys',valId)
- }
- }
- }
-</script>
-
-<style lang="less" scoped>
- /*.tree_con{*/
- /*position: relative;*/
- /*}*/
- .drawer-bootom-button {
- position: absolute;
- top: 1px;
- /* padding: 10px 16px; */
- text-align: left;
- right: 0;
- background: #fff;
- border-radius: 0 0 2px 2px;
- }
- .draw-bootom-button {
- position: absolute;
- bottom: 0;
- width: 100%;
- border-top: 1px solid #e8e8e8;
- padding: 10px 16px;
- text-align: right;
- left: 0;
- background: #fff;
- border-radius: 0 0 2px 2px;
- }
- .replaceSearch {
- color: #40a9ff;
- font-weight: bold;
- background-color: rgb(204, 204, 204);
- }
-
- .ant-card-body .table-operator {
- margin: 15px;
- }
-
- .anty-form-btn {
- width: 100%;
- text-align: center;
- }
-
- .anty-form-btn button {
- margin: 0 5px;
- }
-
- .anty-node-layout .ant-layout-header {
- padding-right: 0;
- }
-
- .header {
- padding: 0 8px;
- }
-
- .header button {
- margin: 0 3px;
- }
-
- .ant-modal-cust-warp {
- height: 100%;
- }
-
- .ant-modal-cust-warp .ant-modal-body {
- height: calc(100% - 110px) !important;
- overflow-y: auto;
- }
-
- .ant-modal-cust-warp .ant-modal-content {
- height: 90% !important;
- overflow-y: hidden;
- }
-
- /** Button鎸夐挳闂磋窛 */
- .ant-btn {
- margin-left: 3px;
- }
-
- .ant-alert {
- padding: 5px 15px 5px 37px;
- }
-
- /*.drawer-bootom-button {*/
- /*position: absolute;*/
- /*bottom: 1px;*/
- /*padding: 10px 16px;*/
- /*text-align: left;*/
- /*left: 0;*/
- /*background: #fff;*/
- /*border-radius: 0 0 2px 2px;*/
- /*}*/
- @media screen and (min-width: 1920px){
- .tree_con{
- height: 748px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1680px) and (max-width: 1920px){
- .tree_con{
- height: 748px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1400px) and (max-width: 1680px){
- .tree_con{
- height: 600px!important;
- overflow: scroll;
- }
- }
- @media screen and (min-width: 1280px) and (max-width: 1400px){
- .tree_con{
- height: 501px!important;
- overflow: scroll;
- }
- }
- @media screen and (max-width: 1280px){
- .tree_con{
- height: 501px!important;
- overflow: scroll;
- }
- }
-</style>
diff --git a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddCon.vue b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddCon.vue
deleted file mode 100644
index 0d19c1a..0000000
--- a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddCon.vue
+++ /dev/null
@@ -1,307 +0,0 @@
-<template>
- <div ref="device">
- <a-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" :getContainer="() => this.$refs.device"
- :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴">
-
- <a-row type="flex" :gutter="24">
- <a-col :md="5">
- <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
- </a-col>
- <a-col :md="19">
- <device-calendar-add-tree></device-calendar-add-tree>
- <!--<a-spin :spinning="confirmLoading">-->
- <!--<a-form :form="form">-->
- <!--<a-row :gutter="24">-->
- <!--<a-col :span="12">-->
- <!--<a-form-item label="鐢熸晥鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<a-date-picker v-decorator="['takeEffectDate',validatorRules.takeEffectDate]" :disabled="disableSubmit"-->
- <!--:readOnly="disableSubmit" :disabledDate="disabledDate"/>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <!--<a-col :span="12">-->
- <!--<a-form-item label="澶辨晥鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<a-date-picker v-decorator="['invalidDate',validatorRules.invalidDate]" :disabled="disableSubmit"-->
- <!--:readOnly="disableSubmit" :disabledDate="disabledDate"/>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <!--</a-row>-->
- <!--<a-row :gutter="24">-->
- <!--<a-col :span="12">-->
- <!--<a-form-item label="鐝埗鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<a-select v-decorator="['shiftId', validatorRules.shiftId]" placeholder="璇烽�夋嫨鐝埗"-->
- <!--@change="initShiftSubList">-->
- <!--<a-select-option v-for="(em,index) in shiftList" :key="index" :value="em.id">-->
- <!--{{ em.shiftName }}-->
- <!--</a-select-option>-->
- <!--</a-select>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <!--<a-col :span="12">-->
- <!--<a-form-item label="鏄熸湡閫夋嫨" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<a-select v-decorator="['weekId', validatorRules.weekId]" placeholder="璇烽�夋嫨鏄熸湡"-->
- <!--@change="weekChange" mode="multiple">-->
- <!--<a-select-option v-for="(em,index) in weekList" :key="index" :value="em.id">-->
- <!--{{ em.name }}-->
- <!--</a-select-option>-->
- <!--</a-select>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <!--</a-row>-->
-
- <!--</a-form>-->
- <!--</a-spin>-->
- </a-col>
- </a-row>
-
- </a-modal>
- </div>
-</template>
-
-<script>
- import BaseTree from '../../../common/BaseTree'
- import DeviceCalendarAddTree from './DeviceCalendarAddTree'
- import moment from 'moment'
- import pick from 'lodash.pick'
- import {
- getAction,
- postAction,
- requestPut
- } from '@/api/manage'
- import {
- duplicateCheck
- } from '@/api/api'
- import AFormItem from 'ant-design-vue/es/form/FormItem'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
- export default {
- name: 'DeviceCalendarAddCon',
- mixins: [JeecgListMixin],
- components: { AFormItem,BaseTree,DeviceCalendarAddTree},
- props: {node:{}},
- data() {
- return {
- weekList:[
- {
- id:0,
- name:"鏄熸湡澶�"
- },
- {
- id:1,
- name:"鏄熸湡涓�"
- },
- {
- id:2,
- name:"鏄熸湡浜�"
- },
- {
- id:3,
- name:"鏄熸湡涓�"
- },
- {
- id:4,
- name:"鏄熸湡鍥�"
- },
- {
- id:5,
- name:"鏄熸湡浜�"
- },
- {
- id:6,
- name:"鏄熸湡鍏�"
- }
-
- ],
- title: '',
- isDaySpan: false,
- visible: false,
- show: false,
- model: {},
- checked: false,
-
-
- url: {
- list: '/mdc/mdcequipment/findListEquipment',
- add: '/mdc/mdcshiftsub/add',
- edit: '/mdc/mdcshiftsub/edit',
- initShiftList: '/mdc/mdcshift/initShiftList',
- initShiftSubList: '/mdc/mdcshiftsub/initShiftSubList',
- getShiftSubById: '/mdc/mdcshiftsub/getShiftSubById',
- settingCalendar: '/mdc/mdcdevicecalendar/settingCalendar',
- },
- shiftList: [],
- shiftSubList: [],
- disableSubmit: true,
- selectEquementId:{}
- }
- },
- created() {
- },
- // watch:{
- // node(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
- // if (JSON.stringify(val) != '{}') {
- // // if (val.entity.equipmentId) {
- // // this.queryParams.equipmentName = val.entity.equipmentName
- // // this.queryParams.parentId = ''
- // // this.queryParams.equipmentId = val.entity.equipmentId
- // // } else {
- // // this.queryParams.parentId = val.entity.id
- // // this.queryParams.equipmentId = ''
- // // this.queryParams.equipmentName = ''
- // // }
- // // this.searchQuery()
- // }
- // }
- // },
- methods: {
- changeSelection(val) {
- this.selectEquementId = val
- },
- // close() {
- // this.$emit('close')
- // this.visible = false
- // },
- // handleCancel() {
- // this.close()
- // },
- // handleOk() {
- // // this.selectionRows = this.SelectedList;
- // // console.log(this.selectionRows);
- // this.$emit('sendSelectionRows', this.selectionRows)
- // this.close()
- // },
- disabledDate(current){
- //Can not slect days before today and today
- return current && current < moment().endOf("day");
- },
- initShiftList() {
- getAction(this.url.initShiftList).then((res) => {
- if (res.success) {
- this.shiftList = res.result
- }
- })
- },
- weekChange(shiftId) {
- // getAction(this.url.initShiftSubList, { shiftId, shiftId }).then((res) => {
- // if (res.success) {
- // this.shiftSubList = res.result
- // }
- // })
- },
- add(record) {
- // let _this = this
- // this.visible = true
- // this.form.resetFields()
- // this.model = Object.assign({}, record)
- // this.initShiftList()
- // this.$nextTick(() => {
- // this.form.setFieldsValue(pick(this.model, 'equmentName'))
- // this.form.setFieldsValue({
- // takeEffectDate: moment(),
- // invalidDate: moment().endOf('month')
- // })
- // })
- },
- close() {
- this.$emit('close')
- this.visible = false
- this.show = false
- },
- handleOk() {
- const that = this
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.form.validateFields((err, values) => {
- if (!err) {
- that.confirmLoading = true
- let formData = Object.assign(this.model, values)
- postAction(this.url.settingCalendar, formData).then((res) => {
- if (res.success) {
- // that.$message.success(res.message)
- that.$notification.success({
- message:'娑堟伅',
- description:res.message
- });
- that.$emit('ok', res.result)
- } else {
- // that.$message.warning(res.message)
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- that.confirmLoading = false
- that.close()
- })
- }
- })
- },
- handleCancel() {
- this.close()
- },
- // shiftSubChange(val) {
- // let _this = this
- // getAction(this.url.getShiftSubById, { shiftSubId: val }).then((res) => {
- // if (res.success) {
- // if (res.result.isDaySpan == 'true') {
- // _this.isDaySpan = true
- // } else {
- // _this.isDaySpan = false
- // }
- // _this.form.setFieldsValue({
- // startDate: res.result.startDate,
- // endDate: res.result.endDate
- // })
- // if (res.result.sleepStartDate) {
- // _this.form.setFieldsValue({
- // sleepStartDate: res.result.sleepStartDate
- // })
- // }
- // if (res.result.sleepStartDate) {
- // _this.form.setFieldsValue({
- // sleepEndDate: res.result.sleepEndDate
- // })
- // }
- // }
- // })
- // }
- }
- }
-</script>
-
-<style scoped lang="less">
- /deep/ .ant-modal-content{
- /*background: -moz-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.27) 100%);*/
- /*background: -webkit-gradient(linear, left left, right right, color-stop(0%, rgba(0, 0, 0, 0.66)), color-stop(100%, rgba(0, 0, 0, 0.4)));*/
- /*background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: -o-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: -ms-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
- /*background-color: #000;*/
- }
- /deep/ .ant-modal-close{
- color: #1191b0;
- font-size: 24px;
- }
- /deep/ .ant-modal-close-x{
- font-size: 24px;
- }
- .ant-btn {
- padding: 0 10px;
- margin-left: 3px;
- }
-
- .ant-form-item-control {
- line-height: 0px;
- }
-
- /** 涓昏〃鍗曡闂磋窛 */
- .ant-form .ant-form-item {
- margin-bottom: 10px;
- }
-
- /** Tab椤甸潰琛岄棿璺� */
- .ant-tabs-content .ant-form-item {
- margin-bottom: 0px;
- }
-</style>
diff --git a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddTree.vue b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddTree.vue
deleted file mode 100644
index fb238f0..0000000
--- a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddTree.vue
+++ /dev/null
@@ -1,256 +0,0 @@
-<template>
- <div>
-
-
- <a-drawer
- :title="title"
- :maskClosable="true"
- width=650
- placement="right"
- :closable="true"
- @close="close"
- :visible="visible"
- style="overflow: auto;padding-bottom: 53px;">
-
- <a-form>
- <a-form-item label='鎵�鎷ユ湁鐨勬潈闄�'>
- <a-tree
- checkable
- @check="onCheck"
- :checkedKeys="checkedKeys"
- :treeData="treeData"
- @expand="onExpand"
- @select="onTreeNodeSelect"
- :selectedKeys="selectedKeys"
- :expandedKeys="expandedKeysss"
- :checkStrictly="checkStrictly">
- <span slot="hasDatarule" slot-scope="{slotTitle,ruleFlag}">
- {{ slotTitle }}<a-icon v-if="ruleFlag" type="align-left" style="margin-left:5px;color: red;"></a-icon>
- </span>
- </a-tree>
- </a-form-item>
- </a-form>
-
- <!--<div class="drawer-bootom-button">-->
- <!--<a-dropdown style="float: left" :trigger="['click']" placement="topCenter">-->
- <!--<a-menu slot="overlay">-->
- <!--<a-menu-item key="1" @click="switchCheckStrictly(1)">鐖跺瓙鍏宠仈</a-menu-item>-->
- <!--<a-menu-item key="2" @click="switchCheckStrictly(2)">鍙栨秷鍏宠仈</a-menu-item>-->
- <!--<a-menu-item key="3" @click="checkALL">鍏ㄩ儴鍕鹃��</a-menu-item>-->
- <!--<a-menu-item key="4" @click="cancelCheckALL">鍙栨秷鍏ㄩ��</a-menu-item>-->
- <!--<a-menu-item key="5" @click="expandAll">灞曞紑鎵�鏈�</a-menu-item>-->
- <!--<a-menu-item key="6" @click="closeAll">鍚堝苟鎵�鏈�</a-menu-item>-->
- <!--</a-menu>-->
- <!--<a-button>-->
- <!--鏍戞搷浣� <a-icon type="up" />-->
- <!--</a-button>-->
- <!--</a-dropdown>-->
- <!--<a-popconfirm title="纭畾鏀惧純缂栬緫锛�" @confirm="close" okText="纭畾" cancelText="鍙栨秷">-->
- <!--<a-button style="margin-right: .8rem">鍙栨秷</a-button>-->
- <!--</a-popconfirm>-->
- <!--<a-button @click="handleSubmit(false)" type="primary" :loading="loading" ghost style="margin-right: 0.8rem">浠呬繚瀛�</a-button>-->
- <!--<a-button @click="handleSubmit(true)" type="primary" :loading="loading">淇濆瓨骞跺叧闂�</a-button>-->
- <!--</div>-->
-
- <!--<role-datarule-modal ref="datarule"></role-datarule-modal>-->
-
- </a-drawer>
- </div>
-</template>
-<script>
- // import {queryTreeListForRole,queryRolePermission,saveRolePermission} from '@/api/api'
- // import RoleDataruleModal from './RoleDataruleModal.vue'
- import {
- getAction,
- postAction,
- requestPut
- } from '@/api/manage'
- export default {
- name: "DeviceCalendarAddTree",
- components:{
- // RoleDataruleModal
- },
- data(){
- return {
- roleId:"",
- treeData: [],
- defaultCheckedKeys:[],
- checkedKeys:[],
- expandedKeysss:[],
- allTreeKeys:[],
- autoExpandParent: true,
- checkStrictly: true,
- title:"瑙掕壊鏉冮檺閰嶇疆",
- visible: false,
- loading: false,
- selectedKeys:[],
- url: {
- getBaseTree: '/mdc/mdcequipment/loadTree',
- deleteBatch: '/mdc/mdcequipment/deleteBatch'
- },
- }
- },
- created(){
- this.queryTreeData()
- },
- methods: {
- queryTreeData() {
- this.loading = true
- this.cardLoading = true
- getAction(this.url.getBaseTree).then((res) => {
- if (res.success) {
- this.dataList = []
- this.allTreeKeys = []
- this.treeDataSource = res.result
- this.generateList(res.result)
- } else {
- // this.$message.warn(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- this.cardLoading = false
- })
- },
- generateList(data) {
- for (let i = 0; i < data.length; i++) {
- const node = data[i]
- const key = node.key
- const title = node.title
- this.dataList.push({
- key,
- title: title
- })
- this.allTreeKeys.push(key)
- if (node.children) {
- this.generateList(node.children)
- }
- }
- },
- onTreeNodeSelect(id){
- if(id && id.length>0){
- this.selectedKeys = id
- }
- this.$refs.datarule.show(this.selectedKeys[0],this.roleId)
- },
- onCheck (o) {
- if(this.checkStrictly){
- this.checkedKeys = o.checked;
- }else{
- this.checkedKeys = o
- }
- },
- show(roleId){
- this.roleId=roleId
- this.visible = true;
- },
- close () {
- this.reset()
- this.$emit('close');
- this.visible = false;
- },
- onExpand(expandedKeys){
- this.expandedKeysss = expandedKeys;
- this.autoExpandParent = false
- },
- reset () {
- this.expandedKeysss = []
- this.checkedKeys = []
- this.defaultCheckedKeys = []
- this.loading = false
- },
- expandAll () {
- this.expandedKeysss = this.allTreeKeys
- },
- closeAll () {
- this.expandedKeysss = []
- },
- checkALL () {
- this.checkedKeys = this.allTreeKeys
- },
- cancelCheckALL () {
- //this.checkedKeys = this.defaultCheckedKeys
- this.checkedKeys = []
- },
- switchCheckStrictly (v) {
- if(v==1){
- this.checkStrictly = false
- }else if(v==2){
- this.checkStrictly = true
- }
- },
- handleCancel () {
- this.close()
- },
- handleSubmit(exit) {
- let that = this;
- let params = {
- roleId:that.roleId,
- permissionIds:that.checkedKeys.join(","),
- lastpermissionIds:that.defaultCheckedKeys.join(","),
- };
- that.loading = true;
- saveRolePermission(params).then((res)=>{
- if(res.success){
- // that.$message.success(res.message);
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- that.loading = false;
- if (exit) {
- that.close()
- }
- }else {
- // that.$message.error(res.message);
- that.$notification.error({
- message:'娑堟伅',
- description:res.message
- });
- that.loading = false;
- if (exit) {
- that.close()
- }
- }
- this.loadData();
- })
- },
- loadData(){
- queryTreeListForRole().then((res) => {
- this.treeData = res.result.treeList
- this.allTreeKeys = res.result.ids
- queryRolePermission({roleId:this.roleId}).then((res)=>{
- this.checkedKeys = [...res.result];
- this.defaultCheckedKeys = [...res.result];
- this.expandedKeysss = this.allTreeKeys;
- })
- })
- }
- },
- watch: {
- visible () {
- if (this.visible) {
- this.loadData();
- }
- }
- }
- }
-
-</script>
-<style lang="less" scoped>
- .drawer-bootom-button {
- position: absolute;
- bottom: 0;
- width: 100%;
- border-top: 1px solid #e8e8e8;
- padding: 10px 16px;
- text-align: right;
- left: 0;
- background: #fff;
- border-radius: 0 0 2px 2px;
- }
-
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarList.vue b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarList.vue
deleted file mode 100644
index 250d167..0000000
--- a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarList.vue
+++ /dev/null
@@ -1,325 +0,0 @@
-<template>
- <div class="deviceCalendar_list">
- <!-- 鏌ヨ鍖哄煙 -->
- <div>
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24" style="width: 100%">
- <a-col :md="6" :sm="6">
- <a-form-item label="鏃堕棿">
- <a-range-picker @change="dateParamChange" format="YYYYMMDD" v-model="dates"/>
- </a-form-item>
- </a-col>
- <a-col :md="2" :sm="2" :xs="2">
- <a-space>
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button v-has="'user.disposition'" type="primary" @click="handleAdd" icon="plus">閰嶇疆</a-button>
- </a-space>
- </a-col>
- <!--<a-col :md="2" :sm="2" :xs="2">-->
- <!--<a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>-->
- <!--</a-col>-->
- <!--<a-col :md="2" :sm="2">-->
- <!--<!–//娌堥–>-->
- <!--<a-button v-has="'user.disposition'" type="primary" @click="handleAdd" icon="plus">閰嶇疆</a-button>-->
-
- <!--<!–<a-button type="primary" @click="handleAdd" icon="plus">閰嶇疆</a-button>–>-->
- <!--</a-col>-->
-
-
- </a-row>
- </a-form>
- </div>
- </div>
-
- <div style="overflow: hidden;width: 100%;margin-top: 20px;flex: 1" id="DeviceList">
- <a-table ref="table" bordered :scroll="{x:'max-content',y:scrollY}"
- size="middle" rowKey="id" :columns="columns"
- @change="handleTableChange" class="ant-table-striped"
- :dataSource="dataSource" :pagination="ipagination"
- :loading="loading" :row-class-name="(_record, index) => (index % 2 === 1 ? 'table-striped' : null)">
- <span slot="action"
- slot-scope="text, record">
- <a-popconfirm
- title="纭畾鍒犻櫎鍚�?"
- @confirm="() => handleDelete(record.id)"
- >
- <a>鍒犻櫎</a>
- </a-popconfirm>
- </span>
- <span slot="isDaySpan" slot-scope="text, record">
- <span v-if="text == 'true'">鏄�</span>
- <span v-if="text == 'false'">鍚�</span>
- </span>
- </a-table>
- </div>
- <device-calendar-model ref="modalForm" @ok="modalFormOk"></device-calendar-model>
- </div>
-</template>
-
-<script>
- import moment from 'moment'
- import { filterObj } from '@/utils/util'
- import { putAction, getAction } from '@/api/manage'
- import DeviceCalendarModel from './DeviceCalendarModel'
- import DeviceCalendarAdd from './DeviceCalendarAdd'
- import DeviceCalendarListModel from './DeviceCalendarListModel'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
-
- export default {
- name: 'DeviceCalendarList',
- components: { DeviceCalendarModel, DeviceCalendarAdd, DeviceCalendarListModel },
- mixins: [JeecgListMixin],
- data() {
- return {
- dates: [],
- yearAndMonth: {},
- identifying: [],
- queryParam: {},
- disableMixinCreated: true,
- scrollY: 465,
- /* 鍒嗛〉鍙傛暟 */
- ipagination: {
- current: 1,
- pageSize: 10,
- pageSizeOptions: ['10', '20', '30'],
- showTotal: (total, range) => {
- return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�'
- },
- showQuickJumper: true,
- showSizeChanger: true,
- total: 0
- },
- columns: [
- {
- title: '鏃ユ湡',
- align: 'center',
- dataIndex: 'effectiveDate',
- width: 100
- },
- {
- title: '璁惧缂栧彿',
- align: 'center',
- dataIndex: 'equipmentId',
- width: 150
- },
- {
- title: '璁惧鍚嶇О',
- align: 'center',
- dataIndex: 'equipmentName',
- width: 150
- },
- {
- title: '鐝埗',
- align: 'center',
- dataIndex: 'shiftName',
- width: 150
- },
- {
- title: '鐝',
- align: 'center',
- dataIndex: 'shiftSubName',
- width: 150
- },
- {
- title: '寮�濮嬫椂闂�',
- align: 'center',
- dataIndex: 'startDate',
- width: 140
- },
- {
- title: '缁撴潫鏃堕棿',
- align: 'center',
- dataIndex: 'endDate',
- width: 140
- },
- {
- title: '鏄惁璺ㄥぉ',
- align: 'center',
- dataIndex: 'isDaySpan',
- scopedSlots: { customRender: 'isDaySpan' },
- width: 100
- },
- {
- title: '寮�濮嬩紤鎭椂闂�',
- align: 'center',
- dataIndex: 'sleepStartDate',
- width: 140
- },
- {
- title: '缁撴潫浼戞伅鏃堕棿',
- align: 'center',
- dataIndex: 'sleepEndDate',
- width: 140
- },
- {
- title: '鎿嶄綔',
- dataIndex: 'action',
- align: 'center',
- width: 100,
- scopedSlots: { customRender: 'action' },
- fixed: 'right'
- }
- ],
- checkedList: ['lyl'],
- dataList: [],
- url: {
- list: '/mdc/mdcDeviceCalendar/list',
- delete: '/mdc/mdcDeviceCalendar/delete'
- }
- }
- },
- props: { node: {}, Type: '' },
- created() {
- const { equipmentId } = this.$route.params
- if (equipmentId) this.queryParam.equipmentId = equipmentId
-
- this.dates = [moment().subtract('days', 0), moment().subtract('days', 0)]
- this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD')
- this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
- this.queryParam.typeTree = '1'
- this.loadData()
- },
- mounted() {
- window.addEventListener('resize', this.handleWindowResize)
- this.handleWindowResize()
- },
- beforeDestroy() {
- window.removeEventListener('resize', this.handleWindowResize)
- },
- watch: {
- Type(valmath) {
- this.dataList = []
- this.queryParam.typeTree = valmath
- // console.log(this.queryParams.typeTree)
- },
- node(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId != null) {
- this.queryParam.equipmentId = val.equipmentId
- this.queryParam.parentId = ' '
- this.ipagination.current = 1
- this.loadData()
- } else {
- this.queryParam.parentId = val.key
- this.queryParam.equipmentId = null
- this.ipagination.current = 1
- this.loadData()
- }
- }
- }
- },
- methods: {
- dateParamChange(v1, v2) {
- this.queryParam.startTime = v2[0]
- this.queryParam.endTime = v2[1]
- },
- searchQuery() {
- this.loadData()
- },
- searchReset() {
- this.queryParam = {}
- this.loadData()
- },
- loadData(arg) {
- this.dataSource = []
- if (!this.url.list) {
- this.$message.error('璇疯缃畊rl.list灞炴��!')
- return
- }
- //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
- if (arg === 1) {
- this.ipagination.current = 1
- }
-
- var params = this.getQueryParams()//鏌ヨ鏉′欢
-
- if (!params) {
- return false
- }
- params.startTime = this.queryParam.startTime
- params.endTime = this.queryParam.endTime
- params.parentId = this.queryParam.parentId
- params.equipmentId = this.queryParam.equipmentId
- params.orderByName = 'ascend'
- this.loading = true
- getAction(this.url.list, params).then((res) => {
- if (res.success) {
- // console.log(res)
- //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
-
- this.dataSource = res.result.records || res.result
- if (res.result.total) {
- this.ipagination.total = res.result.total
- } else {
- this.ipagination.total = 0
- }
- //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- } else {
- this.$message.warning(res.message)
- }
- }).finally(() => {
- this.loading = false
- })
- },
- handleAdd() {
- let record = {}
- if (JSON.stringify(this.node) != '{}') {
- record = { equipmentId: this.node.equipmentId, equmentName: this.node.equipmentName }
- }
- this.$refs.modalForm.add(record)
- this.$refs.modalForm.title = '璁惧宸ヤ綔鏃ュ巻閰嶇疆'
- this.$refs.modalForm.disableSubmit = false
- },
-
- handleWindowResize() {
- const boxHeight = +window.getComputedStyle(document.getElementById('DeviceList')).height.slice(0, -2)
- const tableHeadHeight = +window.getComputedStyle(document.querySelector('.ant-table-thead th')).height.slice(0, -2)
- this.scrollY = boxHeight - tableHeadHeight - 50
- }
- }
- }
-</script>
-<style scoped>
- .deviceCalendar_list {
- overflow: hidden;
- display: flex;
- flex-direction: column;
- }
-
- @media screen and (min-width: 1920px) {
- .deviceCalendar_list {
- height: 812px !important;
- }
- }
-
- @media screen and (min-width: 1680px) and (max-width: 1920px) {
- .deviceCalendar_list {
- height: 812px !important;
- }
- }
-
- @media screen and (min-width: 1400px) and (max-width: 1680px) {
- .deviceCalendar_list {
- height: 664px !important;
- }
- }
-
- @media screen and (min-width: 1280px) and (max-width: 1400px) {
- .deviceCalendar_list {
- height: 565px !important;
- }
- }
-
- @media screen and (max-width: 1280px) {
- .deviceCalendar_list {
- height: 565px !important;
- }
- }
-
- .ant-table-striped /deep/ .table-striped td {
- background-color: #fafafa;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarListModel.vue b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarListModel.vue
deleted file mode 100644
index d81e62c..0000000
--- a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarListModel.vue
+++ /dev/null
@@ -1,340 +0,0 @@
-
-<template>
- <a-modal :title="title" width="70%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
- cancelText="鍏抽棴">
- <a-card :bordered="false">
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="6" :sm="6" v-if="isDepartType == 0">
- <a-form-item label="閮ㄩ棬" v-if="isDepartType == 0">
- <!--<a-select v-model="queryParam.sectionPid" placeholder="璇烽�夋嫨閮ㄩ棬" :options="sectionPData" @change="initGroupOptions" />-->
- <a-tree-select
- v-model="value"
- style="width: 100%"
- :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
- :tree-data="treeData"
- placeholder="璇烽�夋嫨閮ㄩ棬"
- tree-default-expand-all
- >
- <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">-->
- <!--Child Node1 {{ value }}-->
- <!--</span>-->
- </a-tree-select>
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="6">
- <a-form-item label="杞﹂棿" >
- <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨鍥㈤槦" :options="sectionData"/>-->
- <a-tree-select
- v-model="valueProduct"
- style="width: 100%"
- :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
- :tree-data="sectionData"
- placeholder="璇烽�夋嫨杞﹂棿"
- tree-default-expand-all
- >
- <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">-->
- <!--Child Node1 {{ value }}-->
- <!--</span>-->
- </a-tree-select>
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="6">
- <a-form-item label="缁熶竴缂栫爜">
- <a-input placeholder="璇疯緭鍏ョ粺涓�缂栫爜妫�绱�" v-model="queryParam.equipmentId"></a-input>
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="6">
- <a-form-item label="璁惧鍚嶇О">
- <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉版绱�" v-model="queryParam.equipmentName"></a-input>
- </a-form-item>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
- </div>
- <!-- table鍖哄煙-begin -->
- <div>
- <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 400聽}" :columns="columns"
- :dataSource="dataSource" :pagination="ipagination" :loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
- @change="handleTableChange">
- </a-table>
- </div>
- <!-- table鍖哄煙-end -->
- </a-card>
- </a-modal>
-</template>
-
-<script>
- import {mapActions} from 'vuex'
- import {
- ajaxGetSelectItems
- } from '@/api/api'
- import JDictSelectTag from '@/components/dict/JDictSelectTag'
- import {
- deleteAction,
- requestPut,
- getAction,
- postAction
- } from '@/api/manage'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
- import JInput from '@/components/jeecg/JInput'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import Tooltip from 'ant-design-vue/es/tooltip'
- import JDate from '@/components/jeecg/JDate'
- import moment from 'moment'
-
- export default {
- name: 'DeviceCalendarListModel',
- mixins: [JeecgListMixin],
- components: {
- JDictSelectTag,
- JEllipsis,
- JInput,
- Tooltip,
- JDate
- },
- props: {
- status: {
- type: Number,
- default: 1
- }
- },
- data() {
- return {
- isDepartType:'',
- /*readOnly:true,*/
- title:'',
- visible: false,
- SelectedList:[],
- treeData:[],
- /*disableMixinCreated: true,
- queryParam: {},*/
- columns: [
- {
- title: '#',
- dataIndex: '',
- key: 'rowIndex',
- width: 60,
- align: "center",
- customRender: function (t, r, index) {
- return parseInt(index) + 1;
- }
- },{
-
- title: '缁熶竴缂栫爜',
- align: 'center',
- dataIndex: 'equipmentId',
- },
- {
- title: '璁惧鍚嶇О',
- align: 'center',
- dataIndex: 'equipmentName',
- },
- {
- title: '椹卞姩绫诲瀷',
- align: 'center',
- dataIndex: 'driveType'
- },
- {
- title: '鏁版帶绯荤粺',
- align: 'center',
- dataIndex: 'controlSystem'
- },
- ],
- sectionPData: [],
- sectionData: [],
- url: {
- list: '/mdc/mdcEquipment/findEquipmentList',
- loadOptions: '/sys/sysDepart/loadDepartTreeOptions',
- loadProductionOptions:'/mdc/mdcProduction/loadProductionTreeOptions'
- },
- value:undefined,
- valueProduct:undefined
- }
- },
- created() {
- this.queryTreeData()
- },
- watch: {
- value(value) {
- // console.log(value);
- this.queryParam.departId = value
- },
- valueProduct(value){
- this.queryParam.productionId = value
- }
- },
- methods: {
- ...mapActions(['QueryDepartTree']),
- queryTreeData() {
- this.QueryDepartTree().then(res => {
- if (res.success) {
- this.isDepartType = res.result[0].value
- } else {
- // this.$message.warn(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() =>{
- })
- },
- onSelectChange(selectedRowKeys, selectionRows) {
- // this.SelectedList.push(selectedRowKeys);
- this.selectedRowKeys = selectedRowKeys;
- this.selectionRows = selectionRows
- // this.SelectedList =[...this.SelectedList,...selectionRows];
- // console.log(this.SelectedList);
- },
- handleTableChange(pagination, filters, sorter) {
- // this.onClearSelected()
- //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂
- //TODO 绛涢��
- if (Object.keys(sorter).length > 0) {
- this.isorter.column = sorter.field;
- this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
- }
- this.ipagination = pagination;
- this.loadData();
- },
- openPage() {
- this.onClearSelected()
- this.valueProduct=null
- this.visible = true
- this.dataSource = [];
- this.queryParam = {
- status: this.status
- };
- this.loadData();
- this.initOptions();
- this.initGroupOptions()
- },
- loadData(arg) {
- if(!this.url.list){
- this.$message.error("璇疯缃畊rl.list灞炴��!")
- return
- }
- //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
- if (arg === 1) {
- this.ipagination.current = 1;
- }
- var params = this.getQueryParams();//鏌ヨ鏉′欢
-
- if(!params){
- return false;
- }
-
- this.loading = true;
- getAction(this.url.list, params).then((res) => {
- if (res.success) {
- // console.log(res)
- //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- this.dataSource = res.result.records||res.result;
- if(res.result.total)
- {
- this.ipagination.total = res.result.total;
- }else{
- this.ipagination.total = 0;
- }
- //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- }else{
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- })
- },
- modalFormOk(val) {
- // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- this.loadData();
-
- this.selectedRowKeys = [val.id];
- },
- searchQuery() {
- this.loadData();
- this.onClearSelected()
- },
- searchReset() {
- this.queryParam = {
- status: 1
- };
- this.loadData();
- this.onClearSelected()
- },
- close() {
- this.$emit('close')
- this.visible = false
- },
- handleCancel() {
- this.close()
- },
- handleOk() {
- // this.selectionRows = this.SelectedList;
- // console.log(this.selectionRows);
- this.$emit('sendSelectionRows', this.selectionRows)
- this.close()
- },
- initOptions() {
- getAction(this.url.loadOptions).then(res => {
- if (res.success) {
- this.treeData = res.result
- } else {
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- })
- },
-
-
- initGroupOptions() {
- getAction(this.url.loadProductionOptions).then(res => {
- if (res.success) {
- this.sectionData = res.result
- } else {
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- })
- }
- },
- }
-</script>
-<style>
- @import '~@assets/less/common.less';
-
- .frozenRowClass {
- color: #c9c9c9;
- }
-
- .success {
- color: green;
- }
-
- .error {
- color: red;
- }
-</style>
diff --git a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue
deleted file mode 100644
index 477b7cb..0000000
--- a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue
+++ /dev/null
@@ -1,448 +0,0 @@
-<template>
- <div ref="device">
- <a-modal :title="title" :width="900" :visible="visible" :confirmLoading="confirmLoading"
- :getContainer="() => this.$refs.device"
- :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel"
- cancelText="鍏抽棴">
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
- <a-row :gutter="24">
- <a-col :span="24">
- <a-form-item label="璁惧缁�" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
- <a-input-search :readOnly="true" v-decorator="['equipmentId', validatorRules.equipmentId]"
- @search="deviceSearch" enter-button placeholder="璇烽�夋嫨璁惧"/>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="24">
- <a-form-item label="鐝埗" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
- <a-select v-decorator="['shiftId', validatorRules.shiftId]" placeholder="璇烽�夋嫨鐝埗"
- :allowClear='allowClear' @change="initShiftSubList">
- <a-select-option v-for="(em,index) in shiftList" :key="index" :value="em.value">
- {{ em.label }}
- </a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- </a-row>
-
- <a-row :gutter="24">
- <a-col :span="24">
- <a-form-item label="鐢熸晥鏃堕棿" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
- <div class="mainBox">
- <Calendar
- v-on:choseDay="clickDay"
- v-on:changeMonth="changeDate"
- v-on:isToday="clickToday"
- :markDate='shiData'
- :agoDayHide='value'
- ></Calendar>
- </div>
-
- </a-form-item>
- </a-col>
- </a-row>
- </a-form>
- </a-spin>
- <device-calender-list-model ref="deviceCalenderListModel"
- @sendSelectionRows="getDeviceRows"></device-calender-list-model>
- <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'閫夋嫨璁惧'"/>
- </a-modal>
- </div>
-</template>
-
-<script>
- import DeviceCalendarListModel from './DeviceCalendarListModel'
- import moment from 'moment'
- import pick from 'lodash.pick'
- import {
- getAction,
- postAction,
- requestPut
- } from '@/api/manage'
-
- import Calendar from 'vue-calendar-component'
- import SelectDeviceDrawer from '../../../../system/modules/SelectDeviceDrawer'
-
- export default {
- name: 'ShiftInfoModel',
- components: { SelectDeviceDrawer, DeviceCalendarListModel, Calendar },
- props: {},
- data() {
- return {
- value: '',
- date: '',
- week: '',
- selectDate: [],
- // 褰撳墠鏃ユ湡
- allowClear: true,
- title: '',
- isDaySpan: false,
- visible: false,
- show: false,
- model: {},
- checked: false,
- labelColLong: {
- xs: {
- span: 24
- },
- sm: {
- span: 3
- }
- },
- wrapperColLong: {
- xs: {
- span: 24
- },
- sm: {
- span: 21
- }
- },
- labelCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 6
- }
- },
- wrapperCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 18
- }
- },
- confirmLoading: false,
- form: this.$form.createForm(this),
- validatorRules: {
- equipmentId: {
- rules: [
- {
- required: true, message: '璇烽�夋嫨璁惧缁�!'
- }
- ]
- },
- shiftId: {
- rules: [{
- required: true, message: '璇烽�夋嫨鐝埗!'
- }]
- }
- },
- url: {
- add: '/mdc/mdcDeviceCalendar/add',
- edit: '/mdc/mdcshiftsub/edit',
- initShiftList: '/mdc/mdcMdcShift/initShiftList',
- initShiftSubList: '/mdc/mdcshiftsub/initShiftSubList',
- getShiftSubById: '/mdc/mdcshiftsub/getShiftSubById',
- settingCalendar: '/mdc/mdcDeviceCalendar/add'
- },
- shiftList: [],
- shiftSubList: [],
- disableSubmit: true,
- calData: undefined,
- shiData: [],
- sendDte: []
- }
- },
- created() {
- this.value = Math.round(new Date().getTime() / 1000).toString()
- var now = new Date()
- this.date = now.getDate()//寰楀埌鏃ユ湡
- var day = now.getDay()//寰楀埌鍛ㄥ嚑
- var arr_week = new Array('鏄熸湡鏃�', '鏄熸湡涓�', '鏄熸湡浜�', '鏄熸湡涓�', '鏄熸湡鍥�', '鏄熸湡浜�', '鏄熸湡鍏�')
- this.week = arr_week[day]
- this.getWorking()
- },
-
- methods: {
- getWorking() {//鑾峰彇褰撳墠鏈堝伐浣滄棩
- let myDate = new Date()
- let tY = myDate.getFullYear()//寰楀埌褰撳墠骞�
- let tM = myDate.getMonth()//寰楀埌褰撳墠鏈�+1
- let tD = new Date(tY, tM + 1, 0)
- let tT = tD.getDate()//寰楀埌褰撳墠鏈堢殑澶╂暟
-
- for (var i = 1; i <= tT; i++) {
- let week = new Date(tY, tM, i).getDay()
- if (week >= 1 && week <= 5) {
- let dd = tY + '/' + (tM + 1) + '/' + i
- let temp = { className: 'mark1', date: dd }
- this.selectDate.push(temp)
- }
- }
-//console.log(JSON.stringify(this.selectDate))
- },
- resetSelect() {//閲嶇疆閫変腑鐨勬棩鏈�
- this.selectDate = []
- this.shiData = []
- this.sendDte = []
- },
- fun(obj) {
- console.log(obj)
- if (obj) {
- if (obj = obj.split('/')) {
- var timShi = obj[1]
- var timFen = obj[2]
- if (timShi < 10) {
- timShi = '0' + timShi
- }
- if (timFen < 10) {
- timFen = '0' + timFen
- }
- var dd = (obj[0] + timShi + timFen)
- return dd
- }
- }
- },
- clickDay(today) {//閫変腑鏃ユ湡
- let existDate = this.selectDate
- let isExist = true
- for (var i = 0; i < existDate.length; i++) {
- if (existDate[i].date === today) {
- this.selectDate.splice(i, 1)
- this.shiData.splice(i, 1)
- this.sendDte.splice(i, 1)
- isExist = false
- }
- }
- if (isExist) {//褰撳墠鏃ユ湡瀛樺湪绉婚櫎
- let tempDate = { date: today, className: 'mark1' }
- // let ddd = this.fun(today)
- let ddd = today
- let ccc = this.fun(today)
- this.selectDate.push(tempDate)
- this.shiData.push(ddd)
- this.sendDte.push(ccc)
- }
- },
- onSelect(value) {
- console.log(value)
- let arr = []
- arr.push(value)
- this.value = arr
- // this.value = value;
- // this.selectedValue = value;
- },
- onPanelChange(value) {
- this.value = value
- },
- deviceSearch() {
- this.$refs.selectDeviceDrawer.visible = true
- this.$refs.selectDeviceDrawer.selectedRowKeys = []
- this.$refs.selectDeviceDrawer.selectedRows = []
- this.$refs.selectDeviceDrawer.checkedKeys = this.form.getFieldValue('equipmentId') ? this.form.getFieldValue('equipmentId').split(',') : []
- },
- getDeviceRows(val) {
- console.log('========', val)
- var equipmentIds = ''
- for (var i = 0; i < val.length; i++) {
- //equipmentIds = equipmentIds + "," + val[i].equipmentId;
- if (i == 0) {
- equipmentIds = val[i].equipmentId
- } else {
- equipmentIds = equipmentIds + ',' + val[i].equipmentId
- }
- }
- this.form.setFieldsValue({
- equipmentId: equipmentIds
- })
- },
- disabledDate(current) {
- //Can not slect days before today and today
- return current && current < moment().subtract('days', 1)
- },
- disabledDateEnd(currentend) {
- //Can not slect days before today and today
- return currentend && currentend < moment().subtract('days', 0)
- },
- initShiftList() {
- getAction(this.url.initShiftList).then((res) => {
- if (res.success) {
- this.shiftList = res.result
- }
- })
- },
- add(record) {
- this.resetSelect()
- let _this = this
- this.visible = true
- this.form.resetFields()
- this.model = Object.assign({}, record)
- this.initShiftList()
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model))
- this.form.setFieldsValue({
- // takeEffectDate: moment(),
- // invalidDate: moment().endOf('month')
- })
- })
- },
- close() {
- this.$emit('close')
- this.visible = false
- this.show = false
- },
- handleOk() {
- const that = this
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.form.validateFields((err, values) => {
- if (!err) {
- that.confirmLoading = true
- let formData = Object.assign(this.model, values)
- formData.dateList = this.sendDte
- if (formData.dateList && formData.dateList.length > 0) {
- postAction(this.url.settingCalendar, formData).then((res) => {
- if (res.success) {
- // that.$message.success(res.message)
- that.$notification.success({
- message: '娑堟伅',
- description: res.message
- })
- that.$emit('ok', res.result)
- } else {
- // that.$message.warning(res.message)
- that.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- that.confirmLoading = false
- that.close()
- })
- } else {
- that.confirmLoading = false
- that.$notification.warning({
- message: '娑堟伅',
- description: '璇烽�夋嫨鐢熸晥鏃堕棿!'
- })
- }
- }
- })
- },
- handleCancel() {
- this.close()
- },
-
- /**
- * 閫夋嫨宸叉湁璁惧鍚庣偣鍑荤‘瀹氭椂瑙﹀彂
- * @param data 宸查�夋嫨鐨勮澶�
- */
- selectOK(data) {
- this.form.setFieldsValue({
- equipmentId: data.join(',')
- })
- }
- }
- }
-</script>
-
-<style scoped lang="less">
-
- /deep/ .ant-modal-close {
- color: #1191b0;
- font-size: 24px;
- }
-
- /deep/ .ant-modal-close-x {
- font-size: 24px;
- }
-
- .ant-btn {
- padding: 0 10px;
- margin-left: 3px;
- }
-
- .ant-form-item-control {
- line-height: 0px;
- }
-
- /** 涓昏〃鍗曡闂磋窛 */
- .ant-form .ant-form-item {
- margin-bottom: 10px;
- }
-
- /** Tab椤甸潰琛岄棿璺� */
- .ant-tabs-content .ant-form-item {
- margin-bottom: 0px;
- }
-
- /deep/ .mark1 {
- color: white !important;
- background-color: #1890ff !important;
- border-radius: 50%;
- }
-
- /deep/ .mainBox .wh_content_all {
- background-color: #ffffff;
- border: 1px silver solid;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
- }
-
- /deep/ .mainBox .wh_content_all .wh_jiantou1 {
- border-top: 2px solid #000000;
- border-left: 2px solid #000000;
- }
-
- /deep/ .mainBox .wh_content_all .wh_jiantou2 {
- border-top: 2px solid #000000;
- border-right: 2px solid #000000;
- }
-
- /deep/ .mainBox .wh_content_all .wh_top_changge li {
- color: black;
- }
-
- /deep/ .mainBox .wh_content_all .wh_content_item {
- margin-top: 5px;
- }
-
- /deep/ .mainBox .wh_content_all .wh_content_item .wh_top_tag {
- color: #000000;
- }
-
- /deep/ .mainBox .wh_content_all .wh_content_item .wh_item_date {
- color: #000000;
- }
-
- /deep/ .mainBox .wh_content_all .wh_content_item .wh_item_date:hover {
- color: #1890ff;
- border: 1px solid #1890ff;
- border-radius: 50%;
- }
-
- /deep/ .mainBox .wh_content_all .wh_content_item .wh_other_dayhide {
- color: #bfbfbf !important;
- }
-
- /deep/ .mainBox .wh_content_all .wh_content_item .wh_want_dayhide {
- color: #bfbfbf !important;
- }
-
- /deep/ .mainBox .wh_content_all .wh_content_item .wh_chose_day {
- background: #ffffff;
- color: #000000;
- }
-
- /deep/ .mainBox .wh_content_all .wh_content_item .wh_isMark {
- color: #ffffff;
- background-color: blue;
- }
-
- /deep/ .mainBox .wh_content_all .wh_content_item .wh_isToday {
- background-color: #ffffff;
- color: #000000;
- }
-
-</style>
-
-
-
-
-
-
diff --git a/src/views/mdc/base/modules/deviceRepair/DeviceRepairEditListModel.vue b/src/views/mdc/base/modules/deviceRepair/DeviceRepairEditListModel.vue
deleted file mode 100644
index d765332..0000000
--- a/src/views/mdc/base/modules/deviceRepair/DeviceRepairEditListModel.vue
+++ /dev/null
@@ -1,238 +0,0 @@
-<template>
- <a-modal :title="title" :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
- cancelText="鍏抽棴">
- <a-card :bordered="false">
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="6" :sm="6">
- <a-form-item label="缁熶竴缂栫爜">
- <a-input placeholder="璇疯緭鍏ョ粺涓�缂栫爜妫�绱�" v-model="queryParam.equipmentId"></a-input>
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="6">
- <a-form-item label="璁惧鍚嶇О">
- <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉版绱�" v-model="queryParam.equipmentName"></a-input>
- </a-form-item>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
- </div>
- <!-- table鍖哄煙-begin -->
- <div>
- <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 300聽}" :columns="columns"
- :dataSource="dataSource" :pagination="ipagination" :loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:'radio'}"
- @change="handleTableChange">
- </a-table>
- </div>
- <!-- table鍖哄煙-end -->
- </a-card>
- </a-modal>
-</template>
-
-<script>
- import {
- ajaxGetSelectItems
- } from '@/api/api'
- import JDictSelectTag from '@/components/dict/JDictSelectTag'
- import {
- deleteAction,
- requestPut,
- getAction,
- postAction
- } from '@/api/manage'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
- import JInput from '@/components/jeecg/JInput'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import Tooltip from 'ant-design-vue/es/tooltip'
- import JDate from '@/components/jeecg/JDate'
- import moment from 'moment'
-
- export default {
- name: 'DeviceRepairEditListModel',
- mixins: [JeecgListMixin],
- components: {
- JDictSelectTag,
- JEllipsis,
- JInput,
- Tooltip,
- JDate
- },
- props: {
- status: {
- type: Number,
- default: 1
- }
- },
- data() {
- return {
- readOnly:true,
- title:'',
- visible: false,
- disableMixinCreated: true,
- queryParam: {},
- columns: [{
- title: '缁熶竴缂栫爜',
- align: 'center',
- dataIndex: 'equipmentId',
- },
- {
- title: '璁惧鍚嶇О',
- align: 'center',
- dataIndex: 'equipmentName',
- },
- // {
- // title: '璁惧鍨嬪彿',
- // align: 'center',
- // dataIndex: 'equipmentModel',
- // },
- // // {
- // // title: '璁惧绫诲瀷',
- // // align: 'center',
- // // dataIndex: 'equipmentType',
- // // },
- // {
- // title: '鏈哄簥IP',
- // align: 'center',
- // dataIndex: 'equipmentIp',
- // },
- // {
- // title: '椹卞姩绫诲瀷',
- // align: 'center',
- // dataIndex: 'driveType',
- // },
- // {
- // title: '绔彛',
- // align: 'center',
- // dataIndex: 'dataPort',
- // },
- // {
- // title: '鏁版帶绯荤粺',
- // align: 'center',
- // dataIndex: 'controlSystem',
- // }
- ],
- url: {
- list: '/mdc/mdcequipment/findListEquipment',
- },
-
- }
- },
- created() {
-
- },
- methods: {
- openPage() {
- this.visible = true
- this.onClearSelected()
- this.dataSource = [];
- this.queryParam = {
- status: this.status
- };
- this.loadData();
- },
- onSelectChange(selectedRowKeys, selectionRows) {
- // this.SelectedList.push(selectedRowKeys);
- this.selectedRowKeys = selectedRowKeys;
- this.selectionRows = selectionRows
- // this.SelectedList =[...this.SelectedList,...selectionRows];
- // console.log(this.SelectedList);
- },
- loadData(arg) {
- if(!this.url.list){
- // this.$message.error("璇疯缃畊rl.list灞炴��!")
- this.$notification.error({
- message:'娑堟伅',
- description:"璇疯缃畊rl.list灞炴��!"
- });
- return
- }
- //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
- if (arg === 1) {
- this.ipagination.current = 1;
- }
- var params = this.getQueryParams();//鏌ヨ鏉′欢
-
- if(!params){
- return false;
- }
-
- this.loading = true;
- postAction(this.url.list, params).then((res) => {
- if (res.success) {
- // console.log(res)
- //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- this.dataSource = res.result.records||res.result;
- if(res.result.total)
- {
- this.ipagination.total = res.result.total;
- }else{
- this.ipagination.total = 0;
- }
- //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- }else{
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- })
- },
- modalFormOk(val) {
- // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- this.loadData();
- this.selectedRowKeys = [val.id];
- },
- searchQuery() {
- this.loadData();
- this.onClearSelected()
- },
- searchReset() {
- this.queryParam = {
- status: 1
- };
- this.loadData();
- this.onClearSelected()
- },
- close() {
- this.$emit('close')
- this.visible = false
- },
- handleCancel() {
- this.close()
- },
- handleOk() {
- this.$emit('sendSelectionRows', this.selectionRows[0])
- this.close()
- },
- },
- }
-</script>
-<style>
- @import '~@assets/less/common.less';
-
- .frozenRowClass {
- color: #c9c9c9;
- }
-
- .success {
- color: green;
- }
-
- .error {
- color: red;
- }
-</style>
diff --git a/src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue b/src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue
deleted file mode 100644
index 2a5c4e1..0000000
--- a/src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue
+++ /dev/null
@@ -1,638 +0,0 @@
-<template>
- <div class="device_list">
- <!-- 鏌ヨ鍖哄煙 -->
- <div style="background-color: #fff" class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24" style="width: 100%;">
- <a-col :md="7" :sm="7">
- <a-form-item label="鏃堕棿">
- <a-range-picker @change="dateParamChange" v-model="dates" format="YYYY-MM-DD HH:mm:ss"/>
- </a-form-item>
- </a-col>
- <a-col :md="5" :sm="5">
- <a-form-item label="璁惧缂栧彿">
- <a-input placeholder="杈撳叆璁惧缂栧彿鏌ヨ" v-model="queryParams.equipmentId"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="5" :sm="5" :xs="5">
- <a-form-item label="璁惧鍚嶇О">
- <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" v-model="queryParams.equipmentName"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="2" :sm="2" :xs="2">
- <a-space>
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
- </a-space>
- </a-col>
- <!--<a-col :md="2" :sm="3" :xs="3">-->
- <!--<a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>-->
- <!--</a-col>-->
- <!--<a-col :md="2" :sm="2" :xs="2">-->
- <!--<a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>-->
- <!--</a-col>-->
- <!--<a-col :lg="2" :md="3" :sm="3" :xs="3">-->
- <!--<!–<a-button type="primary" @click="exportExcel" icon="download">瀵煎嚭</a-button>–>-->
- <!--<a-button type="primary" @click="handleExportXls('缁翠慨浼戠彮绠$悊')" icon="download">瀵煎嚭</a-button>-->
- <!--</a-col>-->
- </a-row>
- </a-form>
- </div>
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator" style="display: inline;">
- <a-button @click="handleAdd" type="primary" icon="plus">鏂板
- </a-button>
- <a-button type="primary" @click="handleExportXls('缁翠慨浼戠彮绠$悊')" icon="download">瀵煎嚭</a-button>
- <!--<a-button v-has="'user.add'" @click="handleAddXIU" type="primary" icon="plus">浼戠彮鏂板-->
- <!--</a-button>-->
- </div>
-
- <!-- table鍖哄煙-begin -->
- <div id="DeviceList" style="flex: 1;overflow: hidden">
- <a-table ref="table" bordered size="middle" rowKey="id" :columns="columns"
- :dataSource="dataSource" :pagination="ipagination" :loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
- @change="handleTableChange" :scroll="{x:'max-content',y:scrollY}">
- <span slot="action" slot-scope="text, record">
- <a @click="handleEdit(record)">缂栬緫</a>
- <a-divider type="vertical" />
- <a @click="handleDelete(record.id)">鍒犻櫎</a>
- </span>
- <!--瀛楃涓茶秴闀挎埅鍙栫渷鐣ュ彿鏄剧ず-->
- <span slot="num" slot-scope="text" style="font-weight: bold">
- <j-ellipsis :value="text" :length="8"/>
- </span>
- <span slot="name" slot-scope="text" style="font-weight: bold">
- <j-ellipsis :value="text" :length="8"/>
- </span>
- <span slot="model" slot-scope="text" style="font-weight: bold">
- <j-ellipsis :value="text" :length="8"/>
- </span>
- </a-table>
- </div>
- <!-- table鍖哄煙-end -->
- <device-repair-model ref="modalForm" :equipmentId="queryParams.equipmentId" @ok="modalFormOk"></device-repair-model>
- <!--<device-repair-model-add ref="modalFormadd" @ok="modalFormOk"></device-repair-model-add>-->
- <device-repair-model-edit ref="modalFormedit" @ok="modalFormOk"></device-repair-model-edit>
- <!--<repair-model ref="repairModelFrom" @ok="modalFormOk">0</repair-model>-->
- </div>
-</template>
-
-<script>
- import moment from 'moment'
- import $ from 'jquery'
- import JDictSelectTag from '@/components/dict/JDictSelectTag'
- import JDate from '../../../../../components/jeecg/JDate'
- import {
- requestPut,
- deleteAction,
- getAction
- } from '@/api/manage'
- import DeviceRepairModel from './DeviceRepairModel'
- import DeviceRepairModelAdd from './DeviceRepairModelAdd'
- import DeviceRepairModelEdit from './DeviceRepairModelEdit'
- import '@/components/table2excel/table2excel'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
- import JInput from '@/components/jeecg/JInput'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import Tooltip from 'ant-design-vue/es/tooltip'
- import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
- import ACol from 'ant-design-vue/es/grid/Col'
- export default {
- name: 'DeviceRepairList',
- mixins: [JeecgListMixin],
- components: {
- ACol,
- Tooltip,
- DeviceRepairModel,
- DeviceRepairModelAdd,
- DeviceRepairModelEdit,
- JDictSelectTag,
- JInput,
- JDate,
- JEllipsis
- },
- props: { nodeTree: '', Type:'',nodePeople: '' },
- data() {
- return {
- typeTree:"",
- typeParent:1,
- typeEquipment:1,
- dates: [],
- xianshi:"",
- readOnly:true,
- queryParam: {},
- queryParams:{},
- queryParamEquip:{},
- queryParamPeople:{},
- dataStartsoucre:[],
- scrollY:465,
- /* 鍒嗛〉鍙傛暟 */
- ipagination:{
- current: 1,
- pageSize: 30,
- pageSizeOptions: ['30', '50', '100'],
- showTotal: (total, range) => {
- return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�"
- },
- showQuickJumper: true,
- showSizeChanger: true,
- total: 0
- },
- columns: [
- {
- title: '璁惧缂栧彿',
- align: 'center',
- dataIndex: 'equipmentId',
- width:250
- },
- {
- title: '璁惧鍚嶇О',
- align: 'center',
- dataIndex: 'equipmentName',
- defaultSortOrder:'descend',
- sorter: (a, b) => {return a.equipmentName>b.equipmentName?1:-1},
- width:250
- },
- {
- title: '缁翠慨绫诲瀷',
- align: 'center',
- dataIndex: 'mdcRepairTypeDictText',
- width:250
- },
- {
- title: '寮�濮嬫椂闂�',
- align: 'center',
- dataIndex: 'startTime',
- width:250
- // scopedSlots:{customRender:'startTime'},
- // customRender:(text,row,index) => {
- // return moment(text).format("YYYY-MM-DD HH:mm:ss")
- // }
- },
- {
- title: '缁撴潫鏃堕棿',
- align: 'center',
- dataIndex: 'endTime',
- width:250
- },
- {
- title: '鎿嶄綔',
- dataIndex: 'action',
- scopedSlots: {customRender: 'action'},
- align: "center",
- width: 150,
- fixed:'right'
- }
- ],
- url: {
- list: '/mdc/mdcEquipmentRepair/pageList',
- deleteBatch: '/mdc/mdcEquipmentRepair/delete',
- getEquipmentByPid: '/mdc/mdcequipment/getEquipmentByPid',
- exportXlsUrl:'/mdc/mdcEquipmentRepair/exportXls'
- }
- }
- },
- watch:{
- Type(valmath){
- this.dataList = [];
- this.queryParams.typeTree = valmath
- // console.log(this.queryParams.typeTree)
- },
- nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId) {
- this.queryParamEquip.parentId = ""
- this.queryParams.equipmentId = val.equipmentId
- this.queryParamEquip.equipmentId = val.equipmentId
- } else {
- this.queryParamEquip.parentId = val.key
- this.queryParams.equipmentId =''
- }
- }else{
- this.queryParams.equipmentId=''
- this.queryParamEquip.parentId = ""
- }
- this.searchQuery()
- },
- nodePeople(val){
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId) {
- this.queryParamEquip.parentId = ""
- this.queryParams.equipmentId = val.equipmentId
- this.queryParamEquip.equipmentId = val.equipmentId
- } else {
- this.queryParamPeople.parentId = val.key
- this.queryParams.equipmentId = ''
- }
- this.searchQuery()
- }
- }
- },
- methods: {
- dateParamChange(v1, v2) {
- // console.log(v1,v2)
- this.queryParam.startTime = v2[0]
- this.queryParam.endTime = v2[1]
- // console.log(v2[0],v2[1])
- },
- onChange(value, dateString) {
- // console.log('Selected Time: ', value);
- // console.log('Formatted Selected Time: ', dateString);
- },
- onOk(value) {
- console.log('onOk: ', value);
- },
- searchReset() {
- if(this.queryParams.typeTree == "1"){
- this.typeTree = this.queryParams.typeTree
- this.typeParent = this.queryParams.parentId
- this.typeEquipment = this.queryParams.equipmentId
- this.queryParams = {}
- this.queryParam = {}
- this.dates = []
- this.queryParams.typeTree = this.typeTree
- this.queryParams.parentId = this.typeParent
- if(this.queryParams.parentId != ""){
- this.queryParams.equipmentId = ""
- }else{
- if(this.queryParams.equipmentId == this.queryParamEquip.equipmentId){
- this.queryParams.equipmentId = this.typeEquipment
- }else{
- this.queryParams.equipmentId = this.queryParamEquip.equipmentId
- }
-
- }
-
- this.ipagination.current = 1
- this.ResetloadData();
- }else{
- this.typeTree = this.queryParams.typeTree
- this.typeParent = this.queryParams.parentId
- // this.typeEquipment = this.queryParams.equipmentId
- this.queryParams = {}
- this.queryParam = {}
- this.dates = []
- this.queryParams.typeTree = this.typeTree
- this.queryParams.parentId = this.typeParent
- // this.queryParams.equipmentId = this.typeEquipment
- this.ipagination.current = 1
- this.ResetloadData();
- }
-
- },
- ResetloadData() {
- if(!this.url.list){
- this.$message.error("璇疯缃畊rl.list灞炴��!")
- return
- }
- //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
- var params = this.getQueryParams();//鏌ヨ鏉′欢
- if(!params){
- return false;
- }
- params.typeTree = this.queryParams.typeTree
- params.parentId = this.queryParams.parentId
- params.equipmentId = this.queryParams.equipmentId
- this.loading = true;
- getAction(this.url.list, params).then((res) => {
- if (res.success) {
- this.dataSource = res.result.records||res.result;
- // this.initDeviceType(this.dataSource)
- //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- // this.dataSource = res.result.records||res.result;
- if(res.result.total)
- {
- this.ipagination.total = res.result.total;
- }else{
- this.ipagination.total = 0;
- }
- //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- }else{
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- })
- },
- handleEdit: function (record) {
- this.$refs.modalFormedit.edit(record);
- this.$refs.modalFormedit.title = "缂栬緫";
- this.$refs.modalFormedit.disableSubmit = false;
- },
- handleTableChange(pagination, filters, sorter) {
- this.dataSource = []
- //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂
- //TODO 绛涢��
- // console.log(pagination)
- if (Object.keys(sorter).length > 0) {
- this.isorter.column = sorter.field;
- this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
- }
- this.ipagination = pagination;
- //鑾峰彇鏌ヨ鏉′欢
- let sqp = {}
- if(this.superQueryParams){
- sqp['superQueryParams']=encodeURI(this.superQueryParams)
- sqp['superQueryMatchType'] = this.superQueryMatchType
- }
- var param = Object.assign(sqp, this.queryParams, this.isorter ,this.filters);
- param.pageNo = this.ipagination.current;
- param.pageSize = this.ipagination.pageSize;
- param.field = this.getQueryField();
- param.parentId = this.queryParams.parentId;
- param.equipmentId = this.queryParams.equipmentId;
- param.startTime = this.queryParam.startTime;
- param.endTime = this.queryParam.endTime;
- getAction(this.url.list,param).then((res) => {
- if(res.success){
- this.dataSource = res.result.records||res.result;
- if(res.result.total)
- {
- this.ipagination.total = res.result.total;
- }else{
- this.ipagination.total = 0;
- }
- }else{
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- })
- },
- searchQueryEdit(){
- if(this.queryParams.typeTree == "1"){
- this.queryParams.parentId = this.queryParamEquip.parentId
- }else{
- this.queryParams.parentId = this.queryParamPeople.parentId
- this.queryParams.equipmentIds = ""
- }
- this.dataSource = [];
- //鑾峰彇鏌ヨ鏉′欢
- let sqp = {}
- if(this.superQueryParams){
- sqp['superQueryParams']=encodeURI(this.superQueryParams)
- sqp['superQueryMatchType'] = this.superQueryMatchType
- }
- var param = Object.assign(sqp, this.queryParams, this.isorter ,this.filters);
- param.pageNo = this.ipagination.current;
- param.pageSize = this.ipagination.pageSize;
- param.field = this.getQueryField();
- param.parentId = this.queryParams.parentId;
- param.equipmentId = this.queryParams.equipmentId;
- param.startTime = this.queryParam.startTime;
- param.endTime = this.queryParam.endTime;
- getAction(this.url.list,param).then((res) => {
- if(res.success){
- this.dataSource = res.result.records||res.result;
- if(res.result.total)
- {
- this.ipagination.total = res.result.total;
- }else{
- this.ipagination.total = 0;
- }
- }else{
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- })
- },
- searchQuery(){
- if(this.queryParams.typeTree == "1"){
- this.queryParams.parentId = this.queryParamEquip.parentId
- // this.queryParams.equipmentId = this.queryParamEquip.equipmentId
- }else{
- this.queryParams.parentId = this.queryParamPeople.parentId
- // this.queryParams.equipmentId = ""
- }
- this.dataSource = [];
- //鑾峰彇鏌ヨ鏉′欢
- let sqp = {}
- if(this.superQueryParams){
- sqp['superQueryParams']=encodeURI(this.superQueryParams)
- sqp['superQueryMatchType'] = this.superQueryMatchType
- }
- var param = Object.assign(sqp, this.queryParams, this.isorter ,this.filters);
- param.pageNo = 1;
- param.pageSize = this.ipagination.pageSize;
- param.field = this.getQueryField();
- param.parentId = this.queryParams.parentId;
- param.equipmentId = this.queryParams.equipmentId;
- param.startTime = this.queryParam.startTime;
- param.endTime = this.queryParam.endTime;
- // console.log(param);
- getAction(this.url.list,param).then((res) => {
- if(res.success){
- this.dataSource = res.result.records||res.result;
- if(res.result.total)
- {
- this.ipagination.total = res.result.total;
- }else{
- this.ipagination.total = 0;
- }
- }else{
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- })
- },
- loadData(arg) {
- if(!this.url.list){
- this.$message.error("璇疯缃畊rl.list灞炴��!")
- return
- }
- //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
- if (arg === 1) {
- this.ipagination.current = 1;
- }
- var params = this.getQueryParams();//鏌ヨ鏉′欢
- if(!params){
- return false;
- }
- this.loading = true;
- getAction(this.url.list, params).then((res) => {
- if (res.success) {
- this.dataSource = res.result.records||res.result;
- // this.initDeviceType(this.dataSource)
- //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- // this.dataSource = res.result.records||res.result;
- if(res.result.total)
- {
- this.ipagination.total = res.result.total;
- }else{
- this.ipagination.total = 0;
- }
- //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- }else{
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- })
- },
- modalFormOk(val) {
- // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- this.searchQueryEdit();
- // this.$emit('openBasetree','')
- this.selectedRowKeys = []
- },
- handleDelete: function (id) {
- if(!this.url.deleteBatch){
- this.$message.error("璇疯缃畊rl.delete灞炴��!")
- return
- }
- var that = this;
- deleteAction(that.url.deleteBatch, {id: id}).then((res) => {
- if (res.success) {
- //閲嶆柊璁$畻鍒嗛〉闂
- that.reCalculatePage(1)
- // that.$message.success(res.message);
- that.$notification.success({
- message:'娑堟伅',
- description:res.message
- });
- that.searchQuery();
- } else {
- // that.$message.warning(res.message);
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- });
- },
- /**
- * 鎵撳紑鏂板缁翠慨鎴栦紤鐝脊绐�
- */
- handleAdd() {
- this.$refs.modalForm.add(this.node)
- this.$refs.modalForm.title = '鏂板'
- this.$refs.modalForm.disableSubmit = false
- },
- // handleAddXIU() {
- // this.$refs.modalFormadd.add()
- // this.$refs.modalFormadd.title = '鏂板'
- // this.$refs.modalFormadd.disableSubmit = false
- // },
- pQuery(parentId) {
- this.queryParam.parentId = parentId[0]
- if(this.selectedRowKeys.length >= 1) {
- this.selectedRowKeys.length = 0
- }
- this.loadData()
- },
- onSelectChange(selectedRowKeys) {
- this.selectedRowKeys = selectedRowKeys
- },
- initEquipment(id) {
- let _this = this
- getAction(this.url.getEquipmentByPid, { pid: id }).then((res) => {
- if (res.success) {
- if (res.result) {
- _this.$set(this.queryParams, 'equipmentName', res.result.equipmentName)
- _this.$set(this.queryParams, 'equipmentId', res.result.equipmentId)
- _this.equipment = res.result
- _this.searchQuery()
- } else {
- // _this.$message.warning('璇烽厤缃澶囷紒')
- _this.$notification.warning({
- message:'娑堟伅',
- description:"璇烽厤缃澶�!"
- });
- }
- }
- })
- },
- exportExcel() {
- $("#DeviceList").table2excel({
- exclude: ".noExl",
- name: "Excel Document Name",
- filename: "缁翠慨浼戠彮绠$悊",
- exclude_img: true,
- fileext: ".xls",
- exclude_links: true,
- exclude_inputs: true
- });
- },
-
- /**
- * 褰撴祻瑙堝櫒鍙绐楀彛灏哄鍙戠敓鏀瑰彉鏃惰Е鍙�
- */
- handleWindowResize(){
- const boxHeight = +window.getComputedStyle(document.getElementById('DeviceList')).height.slice(0,-2)
- const tableHeadHeight = +window.getComputedStyle(document.querySelector('.ant-table-thead th')).height.slice(0,-2)
- this.scrollY = boxHeight - tableHeadHeight - 50
- }
- },
- created() {
- this.queryParam.typeTree = "1"
- },
- mounted(){
- window.addEventListener('resize',this.handleWindowResize)
- this.handleWindowResize()
- },
- beforeDestroy(){
- window.removeEventListener('resize',this.handleWindowResize)
- }
- }
-</script>
-
-<style lang="less" scoped>
- @import '~@assets/less/common.less';
-
- .device_list{
- overflow: hidden;
- display: flex;
- flex-direction: column;
- }
-
- @media screen and (min-width: 1920px){
- .device_list{
- height: 811px!important;
- }
- }
- @media screen and (min-width: 1680px) and (max-width: 1920px){
- .device_list{
- height: 811px!important;
- }
- }
- @media screen and (min-width: 1400px) and (max-width: 1680px){
- .device_list{
- height: 663px!important;
- }
- }
- @media screen and (min-width: 1280px) and (max-width: 1400px){
- .device_list{
- height: 564px!important;
- }
- }
- @media screen and (max-width: 1280px){
- .device_list{
- height: 564px!important;
- }
- }
-</style>
diff --git a/src/views/mdc/base/modules/deviceRepair/DeviceRepairListModel.vue b/src/views/mdc/base/modules/deviceRepair/DeviceRepairListModel.vue
deleted file mode 100644
index ae7e3ec..0000000
--- a/src/views/mdc/base/modules/deviceRepair/DeviceRepairListModel.vue
+++ /dev/null
@@ -1,365 +0,0 @@
-
-<template>
- <a-modal :title="title" width="70%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
- cancelText="鍏抽棴">
- <a-card :bordered="false">
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="6" :sm="6" v-if="isDepartType == 0">
- <a-form-item label="閮ㄩ棬" v-if="isDepartType == 0">
- <!--<a-select v-model="queryParam.sectionPid" placeholder="璇烽�夋嫨閮ㄩ棬" :options="sectionPData" @change="initGroupOptions" />-->
- <a-tree-select
- v-model="value"
- style="width: 100%"
- :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
- :tree-data="treeData"
- placeholder="璇烽�夋嫨閮ㄩ棬"
- tree-default-expand-all
- >
- <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">-->
- <!--Child Node1 {{ value }}-->
- <!--</span>-->
- </a-tree-select>
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="6">
- <a-form-item label="杞﹂棿" >
- <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨鍥㈤槦" :options="sectionData"/>-->
- <a-tree-select
- v-model="valueProduct"
- style="width: 100%"
- :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
- :tree-data="sectionData"
- placeholder="璇烽�夋嫨杞﹂棿"
- tree-default-expand-all
- >
- <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">-->
- <!--Child Node1 {{ value }}-->
- <!--</span>-->
- </a-tree-select>
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="6">
- <a-form-item label="缁熶竴缂栫爜">
- <a-input placeholder="璇疯緭鍏ョ粺涓�缂栫爜妫�绱�" v-model="queryParam.equipmentId"></a-input>
- </a-form-item>
- </a-col>
-
- <a-col :md="6" :sm="6">
- <a-form-item label="璁惧鍚嶇О">
- <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉版绱�" v-model="queryParam.equipmentName"></a-input>
- </a-form-item>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
- </div>
- <!-- table鍖哄煙-begin -->
- <div>
- <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 400聽}" :columns="columns"
- :dataSource="dataSource" :pagination="ipagination" :loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,getCheckboxProps:getCheckboxProps,selections: true,}"
- @change="handleTableChange">
- </a-table>
- </div>
- <!-- table鍖哄煙-end -->
- </a-card>
- </a-modal>
-</template>
-
-<script>
- import {mapActions} from 'vuex'
- import {
- ajaxGetSelectItems
- } from '@/api/api'
- import JDictSelectTag from '@/components/dict/JDictSelectTag'
- import {
- deleteAction,
- requestPut,
- getAction,
- postAction
- } from '@/api/manage'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
- import JInput from '@/components/jeecg/JInput'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import Tooltip from 'ant-design-vue/es/tooltip'
- import JDate from '@/components/jeecg/JDate'
- import moment from 'moment'
-
- export default {
- name: 'DeviceCalendarListModel',
- mixins: [JeecgListMixin],
- components: {
- JDictSelectTag,
- JEllipsis,
- JInput,
- Tooltip,
- JDate
- },
- props: {
- status: {
- type: Number,
- default: 1
- },
- selectedEquipmentIds:{
- type:String
- }
- },
- data() {
- return {
- isDepartType:'',
- /*readOnly:true,*/
- title:'',
- visible: false,
- SelectedList:[],
- treeData:[],
- /*disableMixinCreated: true,
- queryParam: {},*/
- columns: [
- {
- title: '#',
- dataIndex: '',
- key: 'rowIndex',
- width: 60,
- align: "center",
- customRender: function (t, r, index) {
- return parseInt(index) + 1;
- }
- },{
-
- title: '缁熶竴缂栫爜',
- align: 'center',
- dataIndex: 'equipmentId',
- },
- {
- title: '璁惧鍚嶇О',
- align: 'center',
- dataIndex: 'equipmentName',
- },
- {
- title: '椹卞姩绫诲瀷',
- align: 'center',
- dataIndex: 'driveType'
- },
- {
- title: '鏁版帶绯荤粺',
- align: 'center',
- dataIndex: 'controlSystem'
- },
- ],
- sectionPData: [],
- sectionData: [],
- url: {
- list: '/mdc/mdcEquipment/findEquipmentList',
- loadOptions: '/sys/sysDepart/loadDepartTreeOptions',
- loadProductionOptions:'/mdc/mdcProduction/loadProductionTreeOptions'
- },
- value:undefined,
- valueProduct:undefined
- }
- },
- created() {
- this.queryTreeData()
- },
- watch: {
- value(value) {
- // console.log(value);
- this.queryParam.departId = value
- },
- valueProduct(value){
- this.queryParam.productionId = value
- }
- },
- methods: {
- ...mapActions(['QueryDepartTree']),
- queryTreeData() {
- this.QueryDepartTree().then(res => {
- if (res.success) {
- this.isDepartType = res.result[0].value
- } else {
- // this.$message.warn(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() =>{
- })
- },
- onSelectChange(selectedRowKeys, selectionRows) {
- // this.SelectedList.push(selectedRowKeys);
- this.selectedRowKeys = selectedRowKeys;
- this.selectionRows = selectionRows
- // this.SelectedList =[...this.SelectedList,...selectionRows];
- // console.log(this.SelectedList);
- console.log('selectedRowKeys',selectedRowKeys)
- console.log('selectionRows',selectionRows)
-
- },
- handleTableChange(pagination, filters, sorter) {
- // this.onClearSelected()
- //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂
- //TODO 绛涢��
- if (Object.keys(sorter).length > 0) {
- this.isorter.column = sorter.field;
- this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
- }
- this.ipagination = pagination;
- this.loadData();
- },
- openPage() {
- this.visible = true
- this.onClearSelected()
- this.dataSource = [];
- this.queryParam = {
- status: this.status
- };
-
- this.loadData();
- this.initOptions();
- this.initGroupOptions()
- },
- loadData(arg) {
- if(!this.url.list){
- this.$message.error("璇疯缃畊rl.list灞炴��!")
- return
- }
- //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
- if (arg === 1) {
- this.ipagination.current = 1;
- }
- var params = this.getQueryParams();//鏌ヨ鏉′欢
-
- if(!params){
- return false;
- }
-
- this.loading = true;
- getAction(this.url.list, params).then((res) => {
- if (res.success) {
- // console.log(res)
- //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- this.dataSource = res.result.records||res.result;
- if(res.result.total)
- {
- this.ipagination.total = res.result.total;
- }else{
- this.ipagination.total = 0;
- }
- //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- }else{
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- this.loading = false
- })
- },
- modalFormOk(val) {
- // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- this.loadData();
-
- this.selectedRowKeys = [val.id];
- },
- searchQuery() {
- this.loadData();
- this.onClearSelected()
- },
- searchReset() {
- this.queryParam = {
- status: 1
- };
- this.loadData();
- this.onClearSelected()
- },
- close() {
- this.$emit('close')
- this.visible = false
- },
- handleCancel() {
- this.close()
- },
- handleOk() {
- // this.selectionRows = this.SelectedList;
- // console.log(this.selectionRows);
- this.$emit('sendSelectionRows', this.selectionRows)
- this.close()
- },
- initOptions() {
- getAction(this.url.loadOptions).then(res => {
- if (res.success) {
- this.treeData = res.result
- } else {
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- })
- },
- initGroupOptions() {
- getAction(this.url.loadProductionOptions).then(res => {
- if (res.success) {
- this.sectionData = res.result
- } else {
- // this.$message.warning(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- })
- },
- /**
- * 姣忔鍔犺浇鍒楄〃鏃跺垽鏂凡閫変腑璁惧缂栧彿鏁扮粍鏄惁鍖呭惈琛ㄦ牸鏁版嵁涓殑璁惧缂栧彿锛屽鏋滃寘鍚垯閫変腑
- * @param record
- * @returns {{props: {defaultChecked: boolean}}}
- */
- getCheckboxProps(record){
- if(this.selectedEquipmentIds){
- let selectedEquipmentIdsArr=this.selectedEquipmentIds.split(',')
- return {
- props:{
- defaultChecked: selectedEquipmentIdsArr.includes(record.equipmentId)
- }
- }
- }else{
- return {
- props:{
- defaultChecked:false
- }
- }
- }
- }
- },
- }
-</script>
-<style>
- @import '~@assets/less/common.less';
-
- .frozenRowClass {
- color: #c9c9c9;
- }
-
- .success {
- color: green;
- }
-
- .error {
- color: red;
- }
-</style>
diff --git a/src/views/mdc/base/modules/deviceRepair/DeviceRepairModel.vue b/src/views/mdc/base/modules/deviceRepair/DeviceRepairModel.vue
deleted file mode 100644
index 64f0cbd..0000000
--- a/src/views/mdc/base/modules/deviceRepair/DeviceRepairModel.vue
+++ /dev/null
@@ -1,519 +0,0 @@
-<template>
- <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading"
- :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴">
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
- <a-row :gutter="24">
- <a-col :span="24">
- <!--<a-form-item label="璁惧缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<a-input-search :readOnly="true" v-decorator="['equipmentId', validatorRules.equipmentId]"-->
- <!--@search="deviceSearch" enter-button/>-->
- <!--<!–<a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="璇疯緭鍏ヨ澶囩紪鍙�"–>-->
- <!--<!–v-decorator="['equipmentId',validatorRules.equipmentId]"/>–>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <!--<a-col :span="12">-->
- <!--<a-form-item label="璁惧鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<a-input :disabled="disableSubmit" :readOnly="readOnly" allow-clear placeholder="璇疯緭鍏ヨ澶囧悕绉�"-->
- <!--v-decorator="['equipmentName',validatorRules.equipmentName]"/>-->
- <!--</a-form-item>-->
- <a-form-item label="璁惧缁�" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
- <a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]"
- @search="deviceSearch" enter-button placeholder="璇烽�夋嫨璁惧"/>
- <!--<a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="璇疯緭鍏ヨ澶囩紪鍙�"-->
- <!--v-decorator="['equipmentId',validatorRules.equipmentId]"/>-->
- </a-form-item>
- </a-col>
- </a-row>
-
- <a-row :gutter="24">
- <a-col :span="24">
- <a-form-item label="缁翠慨绫诲瀷" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
- <a-radio-group v-decorator="['mdcRepairType', validatorRules.mdcRepairType]">
- <a-radio :value="1">
- 缁翠慨
- </a-radio>
- <a-radio :value="2">
- 浼戠彮
- </a-radio>
- </a-radio-group>
- </a-form-item>
- </a-col>
- </a-row>
-
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="寮�濮嬫椂闂�" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <j-date :show-time="{defaultValue:moment('08:00:00','HH:mm:ss'),hideDisabledOptions:true}"
- date-format="YYYY-MM-DD HH:mm:ss"
- placeholder="璇烽�夋嫨寮�濮嬫椂闂�"
- :disabledDate="disabledDate" class="query-group-cust"
- v-decorator="['startTime', validatorRules.startTime]" :disabledTime="disabledDateTime"
- :showToday="false"></j-date>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="缁撴潫鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <j-date :show-time="{defaultValue:moment('08:00:00','HH:mm:ss'),hideDisabledOptions:true}"
- date-format="YYYY-MM-DD HH:mm:ss"
- placeholder="璇烽�夋嫨缁撴潫鏃堕棿"
- :disabledDate="disabledDate" class="query-group-cust"
- v-decorator="['endTime', validatorRules.endTime]" :disabledTime="disabledDateTime"
- :showToday="false"></j-date>
- </a-form-item>
- </a-col>
- </a-row>
- <!--<a-row :gutter="24">-->
- <!--<a-col :span="12">-->
- <!--<a-form-item v-show="this.mesag == 1" label="缁翠慨绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<a-input :disabled="disableSubmit" :readOnly="readOnly" placeholder="璇烽�夋嫨璁惧绫诲瀷"-->
- <!--:triggerChange="true"-->
- <!--v-decorator="['mdcRepairType', validatorRules.mdcRepairType]"/>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <!--</a-row>-->
- </a-form>
- </a-spin>
- <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'閫夋嫨璁惧'"/>
- </a-modal>
-</template>
-
-<script>
- import moment from 'moment'
- import pick from 'lodash.pick'
- import JDate from './JDate'
- import {
- getAction,
- postAction,
- requestPut
- } from '@/api/manage'
- import {
- duplicateCheck
- } from '@/api/api'
- import Vue from 'vue'
- import SelectDeviceDrawer from '../../../../system/modules/SelectDeviceDrawer'
-
- export default {
- name: 'DeviceRepairModel',
- components: { SelectDeviceDrawer, JDate },
- props: {
- equipmentId: {
- type: String
- }
- },
-
- data() {
- return {
- mesag: 21,
- readOnly: true,
- title: '',
- visible: false,
- show: false,
- model: {},
- checked: false,
- startData: '',
- endData: '',
- labelCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 6
- }
- },
- wrapperCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 18
- }
- },
- labelColLong: {
- xs: {
- span: 24
- },
- sm: {
- span: 3
- }
- },
- wrapperColLong: {
- xs: {
- span: 24
- },
- sm: {
- span: 21
- }
- },
- confirmLoading: false,
- form: this.$form.createForm(this),
- validatorRules: {
- equipmentIds: {
- rules: [
- {
- required: true,
- message: '璇烽�夋嫨璁惧'
- }
- ],
- initialValue: ''
- },
- equipmentName: {
- rules: [
- {
- required: true,
- message: ''
- }
- ]
- },
- mdcRepairType: {
- rules: [
- {
- required: true,
- message: ''
- }
- ],
- initialValue: 1
- },
- startTime: {
- rules: [
- {
- required: true,
- message: '璇烽�夋嫨寮�濮嬫椂闂�'
- }
- ]
- },
- endTime: {
- rules: [
- {
- required: true,
- message: '璇烽�夋嫨缁撴潫鏃堕棿'
- }
- ]
- }
- },
-
- url: {
- add: '/mdc/mdcEquipmentRepair/add',
- edit: '/mdc/mdcEquipmentRepair/edit'
- },
-
- disableSubmit: true,
- partCategoryCascade: [],
- cascadeDefaultValue: [],
- selectedEquipmentIds: ''
- }
-
- },
- created() {
- },
- watch: {
- // 鐩戞帶璁惧缂栧彿锛屽綋鏀瑰彉鏍戜腑閫夐」鏃跺皢鍊艰祴鍊肩粰鏂板寮圭獥鐨勮澶囩粍閫夐」
- equipmentId: function(val) {
- this.validatorRules.equipmentIds.initialValue = val
- },
- // 鐩戞帶寮圭獥鏄剧ず锛屽鏋滃叧闂垯娓呯┖宸查�夋嫨鐨勫閫夛紝濡傛灉寮�鍚垯灏嗘爲涓凡閫夋嫨椤硅祴鍊肩粰宸查�夋嫨澶氶��
- visible: function(val) {
- if (!val) {
- this.selectedEquipmentIds = ''
- } else {
- this.selectedEquipmentIds = this.validatorRules.equipmentIds.initialValue
- }
- }
- },
- methods: {
- disabledDate(current) {
- //Can not slect days before today and today
- // return current && current < moment().endOf("day");
- return current < moment().subtract(+2, 'day').endOf('day')//鍓嶄竴澶╀箣鍓嶇殑骞存湀鏃ヤ笉鍙�夛紝涓嶅寘鎷墠涓�澶�
- },
- moment,
- // onChange(dates) {
- // // console.log(111)
- // // console.log(dates,dateStrings)
- // // console.log('From: ', dates[0], ', to: ', dates[1]);
- // // console.log('From: ', dateStrings[0], ', to: ', dateStrings[1]);
- // // this.startTime = dateStrings[0];
- // // this.endData = dateStrings[1];
- // // console.log(this.startData,this.endData);
- // },
- onChangeEnd(dates, dateStrings) {
- this.endTime = dateStrings[0]
- },
- getDeviceRows(val) {
- // var equipmentIds
- // for (var i = 0; i < val.length; i++) {
- // if (i == 0) {
- // equipmentIds = val[i].equipmentId
- // } else {
- // equipmentIds = equipmentIds + ',' + val[i].equipmentId
- // }
- // }
- // // console.log("========",equipmentIds);
- // this.form.setFieldsValue({
- // equipmentIds: equipmentIds
- // })
- for (var i = 0; i < val.length; i++) {
- if (i == 0) {
- this.selectedEquipmentIds = val[i].equipmentId
- } else {
- this.selectedEquipmentIds = this.selectedEquipmentIds + ',' + val[i].equipmentId
- }
- }
- // console.log("========",equipmentIds);
- this.form.setFieldsValue({
- equipmentIds: this.selectedEquipmentIds
- })
- // this.form.setFieldsValue({
- // equipmentId: val.equipmentId,
- // equipmentName: val.equipmentName,
- // equipmentModel: val.equipmentModel,
- // equipmentIp: val.equipmentIp,
- // dataPort: val.dataPort,
- // driveType: val.driveType
- // })
- },
- deviceSearch() {
- this.$refs.selectDeviceDrawer.visible = true
- this.$refs.selectDeviceDrawer.selectedRowKeys = []
- this.$refs.selectDeviceDrawer.selectedRows = []
- this.$refs.selectDeviceDrawer.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : []
- },
- //绾ц仈妗唎nChange浜嬩欢
- // onChange(value) {
- //
- // },
- getParentIdsById(id) {
- let that = this
- getAction(this.url.getParentIdsById, {
- id: id
- }).then((res) => {
- if (res.success) {
- that.form.setFieldsValue({
- partCategoryId: res.result
- })
- }
- })
- },
- add(node) {
- let _this = this
- this.visible = true
- this.form.resetFields()
- this.model = {}
- this.$nextTick(() => {
- // _this.form.setFieldsValue({ 'tierType': node.entity.tierType + 1, 'parentName': node.title })
- // _this.model.parentId = node.key
- })
- },
- edit(record) {
- this.form.resetFields()
- this.model = Object.assign({}, record)
- this.visible = true
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'equipmentIds', 'equipmentName', 'mdcRepairType', 'startTime', 'endTime'
- ))
- })
- },
- close() {
- this.$emit('close')
- this.visible = false
- this.show = false
- },
- handleOk() {
- const that = this
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.form.validateFields((err, values) => {
- if (!err) {
- that.confirmLoading = true
- let formData = Object.assign(this.model, values)
- let start = moment(formData.startTime).format('YYYY-MM-DD HH:mm:ss')
- let end = moment(formData.endTime).format('YYYY-MM-DD HH:mm:ss')
- let startOne = start.replace(/:/g, '')
- let endOne = end.replace(/:/g, '')
- var data = new Date()
- let stertDate = moment(data).format('YYYY-MM-DD HH:mm:ss')
- let dataStart = stertDate.replace(/:/g, '')
- // if (startOne < dataStart) {
- // // that.$message.warning("寮�濮嬫椂闂翠笉鑳藉皬浜庡綋鍓嶆椂闂�")
- // that.$notification.warning({
- // message: '娑堟伅',
- // description: '寮�濮嬫椂闂翠笉鑳藉皬浜庡綋鍓嶆椂闂�'
- // })
- // that.confirmLoading = false
- // } else {
- // if (startOne >= endOne) {
- // // that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�");
- // that.$notification.warning({
- // message: '娑堟伅',
- // description: '缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�'
- // })
- // // console.log(this.model)
- // // this.endTime = ''
- // that.confirmLoading = false
- // } else {
- // let obj
- // if (!this.model.id) {
- // obj = postAction(this.url.add, formData)
- // } else {
- // obj = requestPut(this.url.edit, formData, {
- // id: this.model.id
- // })
- // }
- // obj.then((res) => {
- // if (res.success) {
- // // that.$message.success("娣诲姞鎴愬姛")
- // that.$notification.success({
- // message: '娑堟伅',
- // description: '娣诲姞鎴愬姛'
- // })
- // // that.$message.success(res.message)
- // that.$emit('ok', res.result)
- // } else {
- // // that.$message.warning(res.message)
- // that.$notification.warning({
- // message: '娑堟伅',
- // description: res.message
- // })
- // }
- // }).finally(() => {
- // that.confirmLoading = false
- // that.close()
- // })
- // }
- // }
- if (startOne >= endOne) {
- // that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�");
- that.$notification.warning({
- message: '娑堟伅',
- description: '缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�'
- })
- // console.log(this.model)
- // this.endTime = ''
- that.confirmLoading = false
- } else {
- let obj
- if (!this.model.id) {
- obj = postAction(this.url.add, formData)
- } else {
- obj = requestPut(this.url.edit, formData, {
- id: this.model.id
- })
- }
- obj.then((res) => {
- if (res.success) {
- // that.$message.success("娣诲姞鎴愬姛")
- that.$notification.success({
- message: '娑堟伅',
- description: '娣诲姞鎴愬姛'
- })
- // that.$message.success(res.message)
- that.$emit('ok', res.result)
- } else {
- // that.$message.warning(res.message)
- that.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- that.confirmLoading = false
- that.close()
- })
- }
- }
- })
- },
- handleCancel() {
- this.close()
- },
- loadCascade() {
- getAction(this.url.loadCascadeData).then((res) => {
- if (res.success) {
- this.partCategoryCascade = res.result
- }
- })
- },
- onCascadeChange(value, selectedOptions) {
- this.cascadeDefaultValue = [...value]
- },
- filter(inputValue, path) {
- return path.some(option => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1)
- },
- //楠岃瘉 缂栫爜
- validateNum(rule, value, callback) {
- var params = {
- tableName: 'lxmes_base_part',
- fieldName: 'num',
- fieldVal: value,
- dataId: this.model.id,
- //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
- delFlag: 'true'
- }
- duplicateCheck(params).then((res) => {
- if (res.success) {
- callback()
- } else {
- callback('瀛樿揣缂栫爜宸插瓨鍦�!')
- }
- })
- },
- checkboxChange(e) {
- this.checked = e.target.checked
- },
- range(start, end) {
- const result = []
- for (let i = start; i < end; i++) {
- result.push(i)
- }
- return result
- },
- /**
- * 绂佺敤鏃ユ湡閫夋嫨鍣ㄤ腑鐨勬椂闂撮�夋嫨
- * @returns {{disabledSeconds: (function(): number[])}} 杩斿洖鍊间负涓�涓璞★紝鍙互绂佹灏忔椂銆佸垎閽熴�佺锛岀洰鍓嶄粎绂佹鎵�鏈夌鏁�,鏈�浣庝粠1寮�濮嬶紝浠�0寮�濮嬬‘瀹氭寜閽皢琚鐢�
- */
- disabledDateTime() {
- return {
- disabledSeconds: () => this.range(1, 60)
- }
- },
-
- /**
- * 閫夋嫨宸叉湁璁惧鍚庣偣鍑荤‘瀹氭椂瑙﹀彂
- * @param data 宸查�夋嫨鐨勮澶�
- */
- selectOK(data) {
- // let params = {}
- // params.equipmentIdList = []
- // for (var a = 0; a < data.length; a++) {
- // params.equipmentIdList.push(data[a])
- // }
- console.log('data=', data)
- this.form.setFieldsValue({
- equipmentIds: data.join(',')
- })
- }
- }
- }
-</script>
-
-<style scoped>
- .ant-btn {
- padding: 0 10px;
- margin-left: 3px;
- }
-
- .ant-form-item-control {
- line-height: 0px;
- }
-
- /** 涓昏〃鍗曡闂磋窛 */
- .ant-form .ant-form-item {
- margin-bottom: 10px;
- }
-
- /** Tab椤甸潰琛岄棿璺� */
- .ant-tabs-content .ant-form-item {
- margin-bottom: 0px;
- }
-
-
-</style>
diff --git a/src/views/mdc/base/modules/deviceRepair/DeviceRepairModelAdd.vue b/src/views/mdc/base/modules/deviceRepair/DeviceRepairModelAdd.vue
deleted file mode 100644
index e1ac1e5..0000000
--- a/src/views/mdc/base/modules/deviceRepair/DeviceRepairModelAdd.vue
+++ /dev/null
@@ -1,390 +0,0 @@
-<template>
- <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading"
- :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴">
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
- <a-row :gutter="24">
- <a-col :span="24">
- <!--<a-form-item label="璁惧缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<a-input-search :readOnly="true" v-decorator="['equipmentId', validatorRules.equipmentId]"-->
- <!--@search="deviceSearch" enter-button/>-->
- <!--<!–<a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="璇疯緭鍏ヨ澶囩紪鍙�"–>-->
- <!--<!–v-decorator="['equipmentId',validatorRules.equipmentId]"/>–>-->
- <!--</a-form-item>-->
- <a-form-item label="璁惧缁�" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
- <a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]"
- @search="deviceSearch" enter-button/>
- <!--<a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="璇疯緭鍏ヨ澶囩紪鍙�"-->
- <!--v-decorator="['equipmentId',validatorRules.equipmentId]"/>-->
- </a-form-item>
- </a-col>
- <!--<a-col :span="12">-->
- <!--<a-form-item label="璁惧鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<a-input :disabled="disableSubmit" :readOnly="readOnly" allow-clear placeholder="璇疯緭鍏ヨ澶囧悕绉�"-->
- <!--v-decorator="['equipmentName',validatorRules.equipmentName]"/>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- </a-row>
- <!--<a-row :gutter="24">-->
- <!--<a-col :span="24">-->
- <!--<a-form-item label="璁惧鍚嶇О" :labelCol="labelColLong" :wrapperCol="wrapperColLong">-->
- <!--<a-input :readOnly="true" v-decorator="['equipmentName', validatorRules.equipmentName]"-->
- <!--enter-button/>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <!--</a-row>-->
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="寮�濮嬫椂闂�" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <j-date :show-time="{defaultValue:moment('08:00:00','HH:mm:ss')}" date-format="YYYY-MM-DD HH:mm:ss" placeholder="璇烽�夋嫨寮�濮嬫椂闂�" :disabledDate="disabledDate"
- class="query-group-cust" v-decorator="['startTime', validatorRules.startTime]"></j-date>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="缁撴潫鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <j-date :show-time="{defaultValue:moment('08:00:00','HH:mm:ss')}" date-format="YYYY-MM-DD HH:mm:ss" placeholder="璇烽�夋嫨缁撴潫鏃堕棿" :disabledDate="disabledDate"
- class="query-group-cust" v-decorator="['endTime', validatorRules.endTime]"></j-date>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item v-show="this.mesag == 1" label="缁翠慨绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="disableSubmit" :readOnly="readOnly" placeholder="璇烽�夋嫨璁惧绫诲瀷"
- :triggerChange="true"
- v-decorator="['mdcRepairType', validatorRules.mdcRepairType]"/>
-
- </a-form-item>
- </a-col>
- </a-row>
- </a-form>
- </a-spin>
- <device-repair-list-model ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></device-repair-list-model>
-
- </a-modal>
-</template>
-
-<script>
- import moment from 'moment'
- import pick from 'lodash.pick'
- import DeviceRepairListModel from './DeviceRepairListModel'
- import JDate from './JDate'
- import {
- getAction,
- postAction,
- requestPut
- } from '@/api/manage'
- import {
- duplicateCheck
- } from '@/api/api'
-
- export default {
- name: 'DeviceRepairModel',
- components: {DeviceRepairListModel,JDate},
- props: {},
- data() {
- return {
- mesag:21,
- readOnly:true,
- title: '',
- visible: false,
- show: false,
- model: {},
- checked: false,
- startData:"",
- endData:"",
- labelCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 6
- }
- },
- wrapperCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 18
- }
- },
- labelColLong: {
- xs: {
- span: 24
- },
- sm: {
- span: 3
- }
- },
- wrapperColLong: {
- xs: {
- span: 24
- },
- sm: {
- span: 21
- }
- },
- confirmLoading: false,
- form: this.$form.createForm(this),
- validatorRules: {
- equipmentId:{
- rules:[
- {
- required:true,
- message: ""
- },
- ],
- },
- equipmentName:{
- rules:[
- {
- required:true,
- message: ""
- },
- ],
- },
- mdcRepairType:{
- rules:[
- {
- required:true,
- message: ""
- },
- ],
- initialValue: 2
- }
- },
-
- url: {
- add: '/mdc/mdcEquipmentRepair/add',
- edit: '/mdc/mdcEquipmentRepair/edit'
- },
-
- disableSubmit: true,
- partCategoryCascade: [],
- cascadeDefaultValue: []
- }
- },
- created() {
- },
-
- methods: {
- disabledDate(current){
- //Can not slect days before today and today
- // return current && current < moment().endOf("day");
- return current < moment().subtract(+1, 'day')//浠婂ぉ涔嬪墠鐨勫勾鏈堟棩涓嶅彲閫夛紝涓嶅寘鎷粖澶�
- },
- moment,
- onChange(dates) {
- // console.log(111)
- // console.log(dates,dateStrings)
- // console.log('From: ', dates[0], ', to: ', dates[1]);
- // console.log('From: ', dateStrings[0], ', to: ', dateStrings[1]);
- // this.startTime = dateStrings[0];
- // this.endData = dateStrings[1];
- // console.log(this.startData,this.endData);
- },
- onChangeEnd(dates, dateStrings){
- this.endTime = dateStrings[0];
- },
- // getDeviceRows(val) {
- // this.form.setFieldsValue({
- // equipmentId: val.equipmentId,
- // equipmentName: val.equipmentName,
- // // equipmentModel: val.equipmentModel,
- // // equipmentIp: val.equipmentIp,
- // // dataPort: val.dataPort,
- // // driveType: val.driveType
- // })
- // },
- getDeviceRows(val) {
- var equipmentIds;
- // var equipmentNames;
- for(var i = 0;i<val.length;i++){
- if (i == 0) {
- equipmentIds = val[i].equipmentId;
- // equipmentNames = val[i].equipmentName;
- } else {
- equipmentIds = equipmentIds + "," + val[i].equipmentId;
- // equipmentNames = equipmentNames + ',' + val[i].equipmentName
- }
- }
- // console.log("========",equipmentIds);
- this.form.setFieldsValue({
- equipmentIds: equipmentIds,
- // equipmentName:equipmentNames
- })
- },
- deviceSearch() {
- this.$refs.deviceRepairListModel.openPage()
- this.$refs.deviceRepairListModel.title = '閫夋嫨璁惧'
- this.$refs.deviceRepairListModel.disableSubmit = false
- },
- //绾ц仈妗唎nChange浜嬩欢
- onChange(value) {
-
- },
- getParentIdsById(id) {
- let that = this
- getAction(this.url.getParentIdsById, {
- id: id
- }).then((res) => {
- if (res.success) {
- that.form.setFieldsValue({
- partCategoryId: res.result
- })
- }
- })
- },
- add(node) {
- let _this = this
- this.visible = true
- this.form.resetFields()
- this.model = {}
- this.$nextTick(() => {
- // _this.form.setFieldsValue({ 'tierType': node.entity.tierType + 1, 'parentName': node.title })
- // _this.model.parentId = node.key
- })
- },
- edit(record) {
- this.form.resetFields()
- this.model = Object.assign({}, record)
- this.visible = true
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'tierType', 'parentName', 'equipmentId', 'equipmentName', 'mdcRepairType', 'startTime', 'endTime',
- ))
- })
- },
- close() {
- this.$emit('close')
- this.visible = false
- this.show = false
- },
- handleOk() {
- const that = this
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.form.validateFields((err, values) => {
- if (!err) {
- that.confirmLoading = true
- let formData = Object.assign(this.model, values)
- let start = moment(formData.startTime).format('YYYY-MM-DD HH:mm:ss');
- let end = moment(formData.endTime).format('YYYY-MM-DD HH:mm:ss');
- let startOne = start.replace(/:/g,'');
- let endOne = end.replace(/:/g,'');
- var data = new Date();
- let stertDate = moment(data).format("YYYY-MM-DD HH:mm:ss");
- let dataStart = stertDate.replace(/:/g,'');
- if(startOne < dataStart) {
- // that.$message.warning("寮�濮嬫椂闂翠笉鑳藉皬浜庡綋鍓嶆椂闂�")
- that.$notification.warning({
- message:'娑堟伅',
- description:"寮�濮嬫椂闂翠笉鑳藉皬浜庡綋鍓嶆椂闂�"
- });
- that.confirmLoading = false
- }else{
- if(startOne>=endOne){
- // that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�");
- that.$notification.warning({
- message:'娑堟伅',
- description:"缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�"
- });
- // console.log(this.model)
- // this.endTime = ''
- that.confirmLoading = false
- }else{
- let obj
- if (!this.model.id) {
- obj = postAction(this.url.add, formData)
- } else {
- obj = requestPut(this.url.edit, formData, {
- id: this.model.id
- })
- }
- obj.then((res) => {
- if (res.success) {
- // that.$message.success("娣诲姞鎴愬姛")
- that.$notification.success({
- message:'娑堟伅',
- description:"娣诲姞鎴愬姛"
- });
- // that.$message.success(res.message)
- that.$emit('ok', res.result)
- } else {
- // that.$message.warning(res.message)
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- that.confirmLoading = false
- that.close()
- })
- }
- }
-
-
- }
- })
- },
- handleCancel() {
- this.close()
- },
- loadCascade() {
- getAction(this.url.loadCascadeData).then((res) => {
- if (res.success) {
- this.partCategoryCascade = res.result
- }
- })
- },
- onCascadeChange(value, selectedOptions) {
- this.cascadeDefaultValue = [...value]
- },
- filter(inputValue, path) {
- return path.some(option => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1)
- },
- //楠岃瘉 缂栫爜
- validateNum(rule, value, callback) {
- var params = {
- tableName: 'lxmes_base_part',
- fieldName: 'num',
- fieldVal: value,
- dataId: this.model.id,
- //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
- delFlag: 'true'
- }
- duplicateCheck(params).then((res) => {
- if (res.success) {
- callback()
- } else {
- callback('瀛樿揣缂栫爜宸插瓨鍦�!')
- }
- })
- },
- checkboxChange(e) {
- this.checked = e.target.checked
- }
- }
- }
-</script>
-
-<style scoped>
- .ant-btn {
- padding: 0 10px;
- margin-left: 3px;
- }
-
- .ant-form-item-control {
- line-height: 0px;
- }
-
- /** 涓昏〃鍗曡闂磋窛 */
- .ant-form .ant-form-item {
- margin-bottom: 10px;
- }
-
- /** Tab椤甸潰琛岄棿璺� */
- .ant-tabs-content .ant-form-item {
- margin-bottom: 0px;
- }
-</style>
diff --git a/src/views/mdc/base/modules/deviceRepair/DeviceRepairModelEdit.vue b/src/views/mdc/base/modules/deviceRepair/DeviceRepairModelEdit.vue
deleted file mode 100644
index adac88d..0000000
--- a/src/views/mdc/base/modules/deviceRepair/DeviceRepairModelEdit.vue
+++ /dev/null
@@ -1,485 +0,0 @@
-<template>
- <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading"
- :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴">
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="寮�濮嬫椂闂�" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <j-date :show-time="{hideDisabledOptions:true}" date-format="YYYY-MM-DD HH:mm:ss"
- placeholder="璇烽�夋嫨寮�濮嬫椂闂�" :disabledDate="disabledDate"
- class="query-group-cust" v-decorator="['startTime', validatorRules.startTime]"
- :disabledTime="disabledDateTime" :showToday="false"></j-date>
- </a-form-item>
-
- </a-col>
- <a-col :span="12">
- <a-form-item label="璁惧鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="disableSubmit" :readOnly="readOnly" allow-clear placeholder="璇疯緭鍏ヨ澶囧悕绉�"
- v-decorator="['equipmentName',validatorRules.equipmentName]"/>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="缁撴潫鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <j-date :show-time="{hideDisabledOptions:true}" date-format="YYYY-MM-DD HH:mm:ss"
- placeholder="璇烽�夋嫨缁撴潫鏃堕棿"
- :disabledDate="disabledDate"
- class="query-group-cust" v-decorator="['endTime', validatorRules.endTime]"
- :disabledTime="disabledDateTime" :showToday="false"></j-date>
- </a-form-item>
- </a-col>
- <a-col :span="12">
-
- <a-form-item label="璁惧缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="disableSubmit" :readOnly="readOnly" allow-clear placeholder="璇疯緭鍏ヨ澶囩紪鍙�"
- v-decorator="['equipmentId',validatorRules.equipmentId]"/>
- </a-form-item>
- </a-col>
- </a-row>
- </a-form>
- </a-spin>
- <!--<device-repair-list-model ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></device-repair-list-model>-->
- <device-repair-edit-list-model ref="deviceRepairListModel"
- @sendSelectionRows="getDeviceRows"></device-repair-edit-list-model>
- </a-modal>
-</template>
-
-<script>
- import moment from 'moment'
- import pick from 'lodash.pick'
- import DeviceRepairListModel from './DeviceRepairListModel'
- import DeviceRepairEditListModel from './DeviceRepairEditListModel'
- import JDate from './JDate'
- import {
- getAction,
- postAction,
- requestPut
- } from '@/api/manage'
- import {
- duplicateCheck
- } from '@/api/api'
-
- export default {
- name: 'DeviceRepairModelEdit',
- components: { DeviceRepairListModel, JDate, DeviceRepairEditListModel },
- props: {},
- data() {
- return {
- readOnly: true,
- title: '',
- visible: false,
- show: false,
- model: {},
- checked: false,
- startData: '',
- endData: '',
- labelCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 6
- }
- },
- wrapperCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 18
- }
- },
- labelColLong: {
- xs: {
- span: 24
- },
- sm: {
- span: 3
- }
- },
- wrapperColLong: {
- xs: {
- span: 24
- },
- sm: {
- span: 21
- }
- },
- confirmLoading: false,
- form: this.$form.createForm(this),
- validatorRules: {
- equipmentId: {
- rules: [
- {
- required: true,
- message: ''
- }
- ]
- },
- equipmentName: {
- rules: [
- {
- required: true,
- message: ''
- }
- ]
- },
- startTime: {
- rules: [
- {
- required: true,
- message: '璇烽�夋嫨寮�濮嬫椂闂�'
- }
- ]
- },
- endTime: {
- rules: [
- {
- required: true,
- message: '璇烽�夋嫨缁撴潫鏃堕棿'
- }
- ]
- }
- // mdcRepairType:{
- // rules:[
- // {
- // required:true,
- // message: ""
- // },
- // ],
- // initialValue: '浼戠彮'
- // }
- },
-
- url: {
- add: '/mdc/mdcEquipmentRepair/add',
- edit: '/mdc/mdcEquipmentRepair/edit'
- },
-
- disableSubmit: true,
- partCategoryCascade: [],
- cascadeDefaultValue: [],
- editStart: ''
- }
- },
- created() {
- },
-
- methods: {
- disabledDate(current) {
- //Can not slect days before today and today
- // return current && current < moment().endOf("day");
- return current < moment().subtract(+2, 'day').endOf('day')//鍓嶄竴澶╀箣鍓嶇殑骞存湀鏃ヤ笉鍙�夛紝涓嶅寘鎷墠涓�澶�
- },
- moment,
- // onChange(dates) {
- // console.log(111)
- // console.log(dates,dateStrings)
- // // console.log('From: ', dates[0], ', to: ', dates[1]);
- // // console.log('From: ', dateStrings[0], ', to: ', dateStrings[1]);
- // // this.startTime = dateStrings[0];
- // // this.endData = dateStrings[1];
- // // console.log(this.startData,this.endData);
- // },
- onChangeEnd(dates, dateStrings) {
- this.endTime = dateStrings[0]
- },
- getDeviceRows(val) {
- this.form.setFieldsValue({
- equipmentId: val.equipmentId,
- equipmentName: val.equipmentName
- // // equipmentModel: val.equipmentModel,
- // // equipmentIp: val.equipmentIp,
- // // dataPort: val.dataPort,
- // // driveType: val.driveType
- })
- // var equipmentIds;
- // for(var i = 0;i<val.length;i++){
- // if (i == 0) {
- // equipmentIds = val[i].equipmentId;
- // } else {
- // equipmentIds = equipmentIds + "," + val[i].equipmentId;
- // }
- // }
- // console.log("========",equipmentIds);
- // this.form.setFieldsValue({
- // equipmentId: equipmentIds,
- // })
- },
- deviceSearch() {
- this.$refs.deviceRepairListModel.openPage()
- this.$refs.deviceRepairListModel.title = '閫夋嫨璁惧'
- this.$refs.deviceRepairListModel.disableSubmit = false
- },
- //绾ц仈妗唎nChange浜嬩欢
- // onChange(value) {
- //
- // },
- getParentIdsById(id) {
- let that = this
- getAction(this.url.getParentIdsById, {
- id: id
- }).then((res) => {
- if (res.success) {
- that.form.setFieldsValue({
- partCategoryId: res.result
- })
- }
- })
- },
- add(node) {
- let _this = this
- this.visible = true
- this.form.resetFields()
- this.model = {}
- this.$nextTick(() => {
- // _this.form.setFieldsValue({ 'tierType': node.entity.tierType + 1, 'parentName': node.title })
- // _this.model.parentId = node.key
- })
- },
- edit(record) {
- this.form.resetFields()
- this.model = Object.assign({}, record)
- this.editStart = (this.model.startTime).replace(/:/g, '')
- this.visible = true
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'tierType', 'parentName', 'equipmentId', 'equipmentName', 'startTime', 'endTime'
- ))
- })
- },
- close() {
- this.$emit('close')
- this.visible = false
- this.show = false
- },
- handleOk() {
- const that = this
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.form.validateFields((err, values) => {
- if (!err) {
- that.confirmLoading = true
- let formData = Object.assign(this.model, values)
- let start = moment(formData.startTime).format('YYYY-MM-DD HH:mm:ss')
- let end = moment(formData.endTime).format('YYYY-MM-DD HH:mm:ss')
- let startOne = start.replace(/:/g, '')
- let endOne = end.replace(/:/g, '')
- var data = new Date()
- let stertDate = moment(data).format('YYYY-MM-DD HH:mm:ss')
- let dataStart = stertDate.replace(/:/g, '')
- // if (this.editStart != startOne) {
- // if (startOne < dataStart) {
- // // that.$message.warning("寮�濮嬫椂闂翠笉鑳藉皬浜庡綋鍓嶆椂闂�")
- // that.$notification.warning({
- // message: '娑堟伅',
- // description: '寮�濮嬫椂闂翠笉鑳藉皬浜庡綋鍓嶆椂闂�'
- // })
- // that.confirmLoading = false
- // } else {
- // if (startOne >= endOne) {
- // // that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�");
- // that.$notification.warning({
- // message: '娑堟伅',
- // description: '缁撴潫鏃堕棿涓嶈兘灏忎簬褰撳墠鏃堕棿'
- // })
- // // console.log(this.model)
- // // this.endTime = ''
- // that.confirmLoading = false
- //
- // } else {
- // let obj
- // if (!this.model.id) {
- // obj = postAction(this.url.add, formData)
- // } else {
- //
- // obj = requestPut(this.url.edit, formData, {
- // id: this.model.id
- // })
- // let shijian = startOne
- // }
- // obj.then((res) => {
- // if (res.success) {
- // // that.$message.success("淇敼鎴愬姛")
- // // that.$message.success(res.message)
- // that.$notification.success({
- // message: '娑堟伅',
- // description: res.message
- // })
- // that.$emit('ok', res.result)
- // } else {
- // // that.$message.warning(res.message)
- // that.$notification.warning({
- // message: '娑堟伅',
- // description: res.message
- // })
- // }
- // }).finally(() => {
- // that.confirmLoading = false
- // that.close()
- // })
- // }
- // }
- // } else {
- // if (startOne >= endOne) {
- // // that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�");
- // that.$notification.warning({
- // message: '娑堟伅',
- // description: '缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�'
- // })
- // // console.log(this.model)
- // // this.endTime = ''
- // that.confirmLoading = false
- //
- // } else {
- // let obj
- // if (!this.model.id) {
- // obj = postAction(this.url.add, formData)
- // } else {
- //
- // obj = requestPut(this.url.edit, formData, {
- // id: this.model.id
- // })
- // let shijian = startOne
- // }
- // obj.then((res) => {
- // if (res.success) {
- // // that.$message.success("淇敼鎴愬姛")
- // // that.$message.success(res.message)
- // that.$notification.success({
- // message: '娑堟伅',
- // description: res.message
- // })
- // that.$emit('ok', res.result)
- // } else {
- // // that.$message.warning(res.message)
- // that.$notification.warning({
- // message: '娑堟伅',
- // description: res.message
- // })
- // }
- // }).finally(() => {
- // that.confirmLoading = false
- // that.close()
- // })
- // }
- // }
- if (startOne >= endOne) {
- // that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�");
- that.$notification.warning({
- message: '娑堟伅',
- description: '缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�'
- })
- // console.log(this.model)
- // this.endTime = ''
- that.confirmLoading = false
- } else {
- let obj
- if (!this.model.id) {
- obj = postAction(this.url.add, formData)
- } else {
- obj = requestPut(this.url.edit, formData, {
- id: this.model.id
- })
- }
- obj.then((res) => {
- if (res.success) {
- // that.$message.success("娣诲姞鎴愬姛")
- that.$notification.success({
- message: '娑堟伅',
- description: '淇敼鎴愬姛'
- })
- // that.$message.success(res.message)
- that.$emit('ok', res.result)
- } else {
- // that.$message.warning(res.message)
- that.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- that.confirmLoading = false
- that.close()
- })
- }
- }
- })
- },
- handleCancel() {
- this.close()
- },
- loadCascade() {
- getAction(this.url.loadCascadeData).then((res) => {
- if (res.success) {
- this.partCategoryCascade = res.result
- }
- })
- },
- onCascadeChange(value, selectedOptions) {
- this.cascadeDefaultValue = [...value]
- },
- filter(inputValue, path) {
- return path.some(option => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1)
- },
- //楠岃瘉 缂栫爜
- validateNum(rule, value, callback) {
- var params = {
- tableName: 'lxmes_base_part',
- fieldName: 'num',
- fieldVal: value,
- dataId: this.model.id,
- //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
- delFlag: 'true'
- }
- duplicateCheck(params).then((res) => {
- if (res.success) {
- callback()
- } else {
- callback('瀛樿揣缂栫爜宸插瓨鍦�!')
- }
- })
- },
- checkboxChange(e) {
- this.checked = e.target.checked
- },
- range(start, end) {
- const result = []
- for (let i = start; i < end; i++) {
- result.push(i)
- }
- return result
- },
- /**
- * 绂佺敤鏃ユ湡閫夋嫨鍣ㄤ腑鐨勬椂闂撮�夋嫨
- * @returns {{disabledSeconds: (function(): number[])}} 杩斿洖鍊间负涓�涓璞★紝鍙互绂佹灏忔椂銆佸垎閽熴�佺锛岀洰鍓嶄粎绂佹鎵�鏈夌鏁�,鏈�浣庝粠1寮�濮嬶紝浠�0寮�濮嬬‘瀹氭寜閽皢琚鐢�
- */
- disabledDateTime() {
- return {
- disabledSeconds: () => this.range(1, 60)
- }
- }
- }
- }
-</script>
-
-<style scoped>
- .ant-btn {
- padding: 0 10px;
- margin-left: 3px;
- }
-
- .ant-form-item-control {
- line-height: 0px;
- }
-
- /** 涓昏〃鍗曡闂磋窛 */
- .ant-form .ant-form-item {
- margin-bottom: 10px;
- }
-
- /** Tab椤甸潰琛岄棿璺� */
- .ant-tabs-content .ant-form-item {
- margin-bottom: 0px;
- }
-</style>
diff --git a/src/views/mdc/base/modules/deviceRepair/JDate.vue b/src/views/mdc/base/modules/deviceRepair/JDate.vue
deleted file mode 100644
index 803ea19..0000000
--- a/src/views/mdc/base/modules/deviceRepair/JDate.vue
+++ /dev/null
@@ -1,86 +0,0 @@
-<template>
- <a-date-picker
- dropdownClassName="j-date-picker"
- :disabled="disabled || readOnly"
- :placeholder="placeholder"
- @change="handleDateChange"
- :value="momVal"
- :showTime="showTime"
- :format="dateFormat"
- :getCalendarContainer="getCalendarContainer"
- v-bind="$attrs"/>
-</template>
-<script>
-import moment from 'moment'
-export default {
- name: 'JDate',
- props: {
- placeholder:{
- type: String,
- default: '',
- required: false
- },
- value:{
- type: String,
- required: false
- },
- dateFormat:{
- type: String,
- default: 'YYYY-MM-DD',
- required: false
- },
- //姝ゅ睘鎬у彲浠ヨ搴熷純浜�
- triggerChange:{
- type: Boolean,
- required: false,
- default: false
- },
- readOnly:{
- type: Boolean,
- required: false,
- default: false
- },
- disabled:{
- type: Boolean,
- required: false,
- default: false
- },
- showTime:{
- type: Object,
- required: {},
- default: {}
- },
- getCalendarContainer: {
- type: Function,
- default: (node) => node.parentNode
- }
- },
- data () {
- let dateStr = this.value;
- return {
- decorator:"",
- momVal:!dateStr?null:moment(dateStr,this.dateFormat)
- }
- },
- watch: {
- value (val) {
- if(!val){
- this.momVal = null
- }else{
- this.momVal = moment(val,this.dateFormat)
- }
- }
- },
- methods: {
- moment,
- handleDateChange(mom,dateStr){
- this.$emit('change', dateStr);
- }
- },
- //2.2鏂板 鍦ㄧ粍浠跺唴瀹氫箟 鎸囧畾鐖剁粍浠惰皟鐢ㄦ椂鍊欑殑浼犲�煎睘鎬у拰浜嬩欢绫诲瀷 杩欎釜鐗涢��
- model: {
- prop: 'value',
- event: 'change'
- }
-}
-</script>
diff --git a/src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue b/src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue
deleted file mode 100644
index 8253a9b..0000000
--- a/src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue
+++ /dev/null
@@ -1,727 +0,0 @@
-<template>
- <div style="width: 100%;">
- <div :bordered="false">
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="5" :sm="5">
- <a-form-item label="璁惧绫诲瀷">
- <a-select
- :value="queryParams.equipmentType"
- mode="multiple"
- placeholder="璇烽�夋嫨璁惧绫诲瀷"
- allow-clear
- :maxTagCount="1"
- @change="selectChange($event,'equipmentType')"
- >
- <a-select-option v-for="(item,index) in equipmentTypeList" :value="item.value" :key="index">
- {{item.label}}
- </a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <a-col :md="5" :sm="5">
- <a-form-item label="椹卞姩绫诲瀷">
- <a-select
- :value="queryParams.driveType"
- mode="multiple"
- placeholder="璇烽�夋嫨椹卞姩绫诲瀷"
- allow-clear
- :maxTagCount="1"
- @change="selectChange($event,'driveType')"
- >
- <a-select-option v-for="(item,index) in driveTypeList" :value="item.value" :key="index">
- {{item.label}}
- </a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <a-col :md="4" :sm="4">
- <a-form-item label="鏃堕棿">
- <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" v-model="dates" :allowClear="false"/>
- </a-form-item>
- </a-col>
- <a-col :md="5" :sm="5" :xs="5">
- <a-form-item label="璁惧绾у埆">
- <a-select
- :value="queryParams.deviceLevel"
- mode="multiple"
- placeholder="璇烽�夋嫨璁惧绾у埆"
- allow-clear
- :maxTagCount="1"
- @change="selectChange($event,'deviceLevel')"
- >
- <a-select-option v-for="(item,index) in device_level_list" :value="item.value" :key="index">
- {{item.label}}
- </a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <a-col :md="4" :sm="4" :xs="4">
- <a-form-item label="璁惧绉嶇被">
- <a-select
- :value="queryParams.deviceCategory"
- mode="multiple"
- placeholder="璇烽�夋嫨璁惧绉嶇被"
- allow-clear
- :maxTagCount="1"
- @change="selectChange($event,'deviceCategory')"
- >
- <a-select-option v-for="(item,index) in device_category_list" :value="item.value" :key="index">
- {{item.label}}
- </a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24" type="flex" align="middle">
- <a-col :md="24" :sm="24" :xs="24"
- style="display: flex;justify-content: space-between;align-items: flex-start">
- <div>
- <a-space style="margin-right: 20px">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
- <a-button type="primary" @click="exportExcel" icon="download">瀵煎嚭</a-button>
- <a-button type="primary" icon="printer" v-print="'#EfficiencyPO'"
- v-has="'EfficiencyPO:print'">鎵撳嵃
- </a-button>
- </a-space>
- <a-checkbox-group :value="checkedList" :default-value="['lyl']" :options="efficiencyOptions"
- @change="efficiencyOptionsOnChange"/>
- </div>
- <table cellpadding="5" cellspacing="1" style="border: 1px solid darkgray;">
- <tr>
- <td v-for="(item, index) in identifying">{{item.title}}</td>
- </tr>
- <tr>
- <td style="text-align:center;" v-for="(item, index) in identifying">
- <div class="identifyingclass" :style="{background: item.color}"></div>
- </td>
- </tr>
- </table>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <a-spin :spinning="spinning">
- <div class="container" id="EfficiencyPO" style="margin-top: 20px;" >
- <div class="table2">
- <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap" v-if="dataList.length>0">
- <thead>
- <tr class="thead fixed equipname">
- <th class="thgu dong1 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;height: 66px">鍏徃</th>
- <th class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">杞﹂棿</th>
- <th class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">宸ユ</th>
- <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">璁惧缂栧彿</th>
- <th class="thgu dong5 name" rowspan="2" style="min-width: 162px; max-width: 162px;width: 162px;">璁惧鍚嶇О</th>
- <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">璁惧绫诲瀷</th>
- <!--<th rowspan="2">缁勫埆</th>-->
- <template v-for="(tableHead, index) in tableHeads">
- <th class="timeth" :colspan="checkedList.length">{{tableHead}}</th>
- </template>
- </tr>
- <tr class="thead notfixed gudingth">
- <template v-for="(tableHead, index) in tableHeads">
- <th v-if="checkedList.indexOf('lyl') > -1">寮�鍔ㄧ巼(%)</th>
- <th v-if="checkedList.indexOf('kjl') > -1">寮�鏈虹巼(%)</th>
- <th v-if="checkedList.indexOf('kjsj') > -1">寮�鏈烘椂闂�(灏忔椂)</th>
- <th v-if="checkedList.indexOf('jgsj') > -1">鍔犲伐鏃堕棿(灏忔椂)</th>
- <th v-if="checkedList.indexOf('djsj') > -1">寰呮満鏃堕棿(灏忔椂)</th>
- <th v-if="checkedList.indexOf('gjsj') > -1">鍏虫満鏃堕棿(灏忔椂)</th>
- </template>
- </tr>
- </thead>
- <tbody>
- <tr class="mathData" v-for="(item, index) in dataList">
- <template v-if="item.level1!=='鍚堣'&&item.level1!=='骞冲潎鍊�'">
- <td class="tdgu kaitou" :rowspan="item.level1span" :class="{hidden: item.level1dis,noExl:item.level1dis}" v-show="!item.level1dis">
- <div class="wenzi">
- {{item.level1}}
- </div>
- </td>
- <td class="tdgu1 kaitou" :rowspan="item.level2span" :class="{hidden: item.level2dis,noExl:item.level2dis}" v-show="!item.level2dis">
- <div class="wenzi">
- {{item.level2}}
- </div>
- </td>
- <td class="tdgu2 kaitou" :rowspan="item.level3span" :class="{hidden: item.level3dis,noExl:item.level3dis}" v-show="!item.level3dis">
- <div class="wenzi">
- {{item.level3}}
- </div>
- </td>
- <td class="tdgu3 kaitou">{{item.equipmentId}}</td>
- <td style="min-width: 162px; max-width: 162px;width: 162px;" class="tdgu4 kaitou">{{item.equipmentName}}</td>
- <td class="tdgu5 kaitou">{{item.equipmentType}}</td>
- </template>
-
- <template v-else>
- <td colspan="6" class="tdgu kaitou">{{item.level1}}</td>
- </template>
- <template v-for="(tableHead, index) in item.dataList">
- <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('lyl') > -1">{{tableHead.startRate | numFilter}}</td>
- <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjl') > -1">
- {{tableHead.openRate | numFilter}}
- </td>
- <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1">
- {{tableHead.openLong | getFormattedTime}}
- </td>
- <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('jgsj') > -1">
- {{tableHead.processLong | getFormattedTime}}
- </td>
- <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('djsj') > -1">
- {{tableHead.waitLong | getFormattedTime}}
- </td>
- <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gjsj') > -1">
- {{tableHead.closeLong | getFormattedTime}}
- </td>
- </template>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </a-spin>
- </div>
- </div>
-</template>
-
-<script>
-import moment from 'moment'
-import { putAction, getAction } from '@/api/manage'
-import $ from 'jquery'
-import '@/components/table2excel/table2excel'
-import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
-import api from '@/api/mdc'
-
-export default {
- name: 'EfficiencyPOList',
- components: {},
- data() {
- return {
- typeTree:"",
- typeParent:1,
- typeEquipment:1,
- dates: [],
- equipmentTypeList:[],
- driveTypeList:[],
- device_level_list: [],
- device_category_list: [],
- queryParam: {},
- queryParams: {
- equipmentType: [],
- driveType: [],
- deviceLevel: [],
- deviceCategory: []
- },
- queryParamEquip:{},
- queryParamPeople:{},
- identifying: [],
- efficiencyOptions: [
- { label: '寮�鍔ㄧ巼', value: 'lyl' },
- { label: '寮�鏈虹巼', value: 'kjl' },
- { label: '寮�鏈烘椂闂�', value: 'kjsj' },
- { label: '鍔犲伐鏃堕棿', value: 'jgsj' },
- { label: '寰呮満鏃堕棿', value: 'djsj' },
- { label: '鍏虫満鏃堕棿', value: 'gjsj' }
- ],
- checkedList: ['lyl'],
- dataList: [],
- url: {
- list: '/mdc/efficiencyReport/efficiencyPOList',
- listByType: '/mdc/MdcUtilizationRate/getByType',
- queryEquipmentType: '/mdc/mdcEquipmentType/queryEquipmentType'
- },
- tableHeads: [],
- spinning:false
- }
- },
- props: { nodeTree: '', Type:'',nodePeople: ''},
- created() {
- this.showIdentifying()
- this.dates = [moment().subtract('days', 8), moment().subtract('days', 1)]
- this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD')
- this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
- this.queryParam.typeTree = "1"
- this.loadData()
- this.queryGroup()
- this.getDriveTypeByApi()
- this.initDictData('device_level')
- this.initDictData('device_category')
- },
- mounted() {
- window.addEventListener('resize', this.handleWindowResize)
- this.handleWindowResize()
- },
- watch: {
- Type(valmath){
- this.dataList = [];
- this.queryParam.typeTree = valmath
- },
- nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId != null) {
- this.queryParamEquip.parentId = ''
- this.queryParamEquip.equipmentId = val.equipmentId
- } else {
- this.queryParamEquip.parentId = val.key
- this.queryParamEquip.equipmentId = ''
- }
- this.searchQuery()
- }
- },
- nodePeople(val){
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId != null) {
- this.queryParamPeople.parentId = val.equipmentId
- this.queryParamPeople.equipmentId = ''
- } else {
- this.queryParamPeople.parentId = val.key
- this.queryParamPeople.equipmentId = ''
- }
- this.searchQuery()
- }
- }
- },
- filters: {
- numFilter(value) {
- if (value) {
- return parseFloat((value * 100).toFixed(2))
- } else {
- return '0'
- }
- },
-
- /**
- * 鏍煎紡鍖栨椂闂�
- * @param seconds 绉掓暟
- * @returns '' 鏍煎紡鍖栧悗鏃堕棿瀛楃涓�
- */
- getFormattedTime(seconds) {
- if (seconds) {
- return parseFloat((seconds / 3600).toFixed(2))
- } else {
- return '0'
- }
- },
- },
- methods: {
- initDictData(dictCode) {
- // //浼樺厛浠庣紦瀛樹腑璇诲彇瀛楀吀閰嶇疆
- if (getDictItemsFromCache(dictCode)) {
- this[dictCode + '_list'] = getDictItemsFromCache(dictCode)
- return
- }
- //鏍规嵁瀛楀吀Code, 鍒濆鍖栧瓧鍏告暟缁�
- ajaxGetDictItems(dictCode, null).then((res) => {
- if (res.success) {
- this[dictCode + '_list'] = res.result
- return
- }
- })
- },
- selectChange(value, key) {
- this.queryParams[key] = value
- },
- checkSameData(dataList){
- let cache = {}; //瀛樺偍鐨勬槸閿槸kclx 鐨勫�硷紝鍊兼槸kclx 鍦╥ndeces涓暟缁勭殑涓嬫爣
- let indices = []; //鏁扮粍涓瘡涓�涓�兼槸涓�涓暟缁勶紝鏁扮粍涓殑姣忎竴涓厓绱犳槸鍘熸暟缁勪腑鐩稿悓kclx鐨勪笅鏍�
- dataList.map((item,index)=>{
- let level1 = item.level1;
- let _index = cache[level1];
- if(_index!==undefined){
- indices[_index].push(index)
- }else{
- cache[level1] = indices.length
- indices.push([index])
- }
- })
- let result = [];
- indices.map((item)=>{
- item.map((index)=>{
- result.push(dataList[index])
- })
- })
- this.dataList = result
- },
- checkSameData1(dataList){
- let cache = {}; //瀛樺偍鐨勬槸閿槸kclx 鐨勫�硷紝鍊兼槸kclx 鍦╥ndeces涓暟缁勭殑涓嬫爣
- let indices = []; //鏁扮粍涓瘡涓�涓�兼槸涓�涓暟缁勶紝鏁扮粍涓殑姣忎竴涓厓绱犳槸鍘熸暟缁勪腑鐩稿悓kclx鐨勪笅鏍�
- dataList.map((item,index)=>{
- let level2 = item.level2;
- let _index = cache[level2];
- if(_index!==undefined){
- indices[_index].push(index)
- }else{
- cache[level2] = indices.length
- indices.push([index])
- }
- })
- let result = [];
- indices.map((item)=>{
- item.map((index)=>{
- result.push(dataList[index])
- })
- })
- this.dataList = result
- },
- checkSameData2(dataList){
- let cache = {}; //瀛樺偍鐨勬槸閿槸kclx 鐨勫�硷紝鍊兼槸kclx 鍦╥ndeces涓暟缁勭殑涓嬫爣
- let indices = []; //鏁扮粍涓瘡涓�涓�兼槸涓�涓暟缁勶紝鏁扮粍涓殑姣忎竴涓厓绱犳槸鍘熸暟缁勪腑鐩稿悓kclx鐨勪笅鏍�
- dataList.map((item,index)=>{
- let level3 = item.level3;
- let _index = cache[level3];
- if(_index!==undefined){
- indices[_index].push(index)
- }else{
- cache[level3] = indices.length
- indices.push([index])
- }
- })
- let result = [];
- indices.map((item)=>{
- item.map((index)=>{
- result.push(dataList[index])
- })
- })
- this.dataList = result
- },
- // 鍚堝苟
- combineCell() {
- console.log(this.dataList)
- let list =this.dataList;
- for (let field in list[0]) {
- var k = 0;
- while (k < list.length) {
- list[k][field + 'span'] = 1;
- list[k][field + 'dis'] = false;
- for (var i = k + 1; i <= list.length - 1; i++) {
- if (list[k][field] == list[i][field] && list[k][field] != '') {
- list[k][field + 'span']++;
- list[k][field + 'dis'] = false;
- list[i][field + 'span'] = 1;
- list[i][field + 'dis'] = true;
- } else {
- break;
- }
- }
- k = i;
- }
- }
- return list;
- },
- disabledDate(current){
- //Can not slect days before today and today
- return current && current > moment().subtract('days', 1);
- },
- initDeviceType(deviceList) {
- let dictCode = 'mdc_equipmentType'
- let items = []
- items = getDictItemsFromCache(dictCode)
- if (deviceList && items.length > 0) {
- for (let a = 0; a < deviceList.length; a++) {
- if (items && items.length > 0) {
- for (let i = 0; i < items.length; i++) {
- if (deviceList[a].equipmentType == items[i].value) {
- deviceList[a].equipmentType = items[i].title
- }
- }
- } else {
- ajaxGetDictItems(dictCode, null).then((res) => {
- if (res.success) {
- let items = res.result
- for (let i = 0; i < items.length; i++) {
- if (deviceList[a].equipmentType == items[i].value) {
- deviceList[a].equipmentType = items[i].title
- }
- }
- }
- })
- }
- }
- }
- },
- exportExcel() {
- $("#EfficiencyPO").table2excel({
- exclude: ".noExl",
- name: "Excel Document Name",
- filename: "璁惧寮�鍔ㄧ巼",
- exclude_img: true,
- fileext: ".xls",
- exclude_links: true,
- exclude_inputs: true
- });
- },
- showIdentifying() {
- getAction(this.url.listByType, { type: 'kdl' }).then(res => {
- if (res.success) {
- this.identifying = res.result
- }
- })
- },
- dateParamChange(v1, v2) {
- this.queryParam.startTime = v2[0]
- this.queryParam.endTime = v2[1]
- // 鐐瑰嚮鏃堕棿閫夋嫨鍣ㄧ殑娓呯┖鎸夐挳鏃朵細瑙﹀彂姝ゅ垽鏂�(鐐瑰嚮閲嶇疆鎸夐挳涓嶄細瑙﹀彂)锛屽疄鐜伴噸缃垪琛ㄥ姛鑳斤紝鍒囧疄鏀瑰彉鍒楄〃鏄剧ず鏁堟灉
- if(!this.queryParam.startTime&&!this.queryParam.endTime)this.searchReset()
- },
- efficiencyOptionsOnChange(checkedList) {
- // let index = checkedList.indexOf('lyl')
- // if (index < 0) {
- // // this.$message.warn('涓嶈兘鍙栨秷鏌ヨ鍒╃敤鐜�')
- // this.$notification.warning({
- // message:'娑堟伅',
- // description:"涓嶈兘鍙栨秷鏌ヨ鍒╃敤鐜�"
- // })
- // return false
- // }
- this.checkedList = checkedList
- },
- searchQuery() {
- if(this.queryParam.typeTree == "1"){
- this.queryParam.parentId = this.queryParamEquip.parentId
- this.queryParam.equipmentId = this.queryParamEquip.equipmentId
- }else{
- this.queryParam.parentId = this.queryParamPeople.parentId
- this.queryParam.equipmentId = ""
- }
- Object.keys(this.queryParams).forEach(item => {
- this.queryParam[item] = this.queryParams[item].join()
- // 姝ゅ涓轰繚璇佹帴鍙e弬鏁颁笉澶氫綑锛屽彲鐪佺暐
- if (this.queryParams[item].length === 0) delete this.queryParam[item]
- })
- this.loadData()
- },
- searchReset() {
- this.typeTree = this.queryParam.typeTree
- this.typeParent = this.queryParam.parentId
- this.typeEquipment = this.queryParam.equipmentId
- this.queryParam = {}
- this.queryParam.typeTree = this.typeTree
- this.queryParam.parentId = this.typeParent
- this.queryParam.equipmentId = this.typeEquipment
- this.dates = [moment().subtract('days', 8), moment().subtract('days', 1)]
- this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD')
- this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
- // this.ipagination.current = 1
- this.queryParams = {
- equipmentType: [],
- driveType: [],
- deviceLevel: [],
- deviceCategory: []
- }
- this.loadData();
- },
- loadData() {
- this.spinning=true
- this.tableHeads = []
- this.dataList = []
- getAction(this.url.list, this.queryParam).then(res => {
- if (res.success) {
- // console.log(res.result)
- this.tableHeads = res.result.dates
- this.dataList = res.result.mdcEfficiencyList
- if (res.result.mdcEfficiencyList && !res.result.mdcEfficiencyList.length) {
- this.$notification.info({
- message: '娑堟伅',
- description: '鏆傛棤璇ヨ澶囩被鍨嬫暟鎹�'
- })
- }
- this.checkSameData(this.dataList)
- this.checkSameData1(this.dataList)
- this.checkSameData2(this.dataList)
- this.combineCell();
- // this.initDeviceType(this.dataList)
- }
- }).finally(()=>{
- this.spinning=false
- })
- },
- queryGroup() {
- getAction(this.url.queryEquipmentType).then(res => {
- if (res.success) {
- this.equipmentTypeList = res.result.map(item => {
- return {
- label: item.equipmentTypeName,
- value: item.equipmentTypeName
- }
- })
- } else {
- // this.$message.warning(res.message)
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- this.loading = false
- })
- },
-
- /**
- * 璋冪敤鎺ュ彛鑾峰彇鎺у埗绯荤粺绫诲瀷
- */
- getDriveTypeByApi(){
- api.getDriveTypeApi().then((res)=>{
- if (res.success) this.driveTypeList = res.result
- })
- },
-
- /**
- * 鍒嗚鲸鐜囨敼鍙樻椂鍚屾椂鏀瑰彉琛ㄦ牸楂樺害宸蹭繚璇侀椤典竴杩涘叆涓嶆嫋鍔ㄥ瀭鐩存粴鍔ㄦ潯鏃跺嵆鍙嫋鍔ㄨ〃鏍兼按骞虫粴鍔ㄦ潯
- */
- handleWindowResize() {
- const tableContainer = document.getElementById('EfficiencyPO') // 琛ㄦ牸瀹瑰櫒
- const clientHeight = document.documentElement.clientHeight || document.body.clientHeight // 娴忚鍣ㄥ彲瑙嗗尯鍩熼珮搴�
- const containerTopToClientTopHeight = tableContainer.getBoundingClientRect().top // 琛ㄦ牸瀹瑰櫒椤堕儴鍒版祻瑙堝櫒鍙鍖哄煙椤堕儴鐨勯棿璺�
- tableContainer.style.height = (clientHeight - containerTopToClientTopHeight - 32) + 'px'
- }
- }
-}
-</script>
-<style scoped>
-/*table鏍峰紡*/
-.table2{
- width: 100%;
- height: 100%;
- overflow: auto;
-}
-
-.table2 thead tr th:first-child,
-.table tbody tr .tdgu{
- position: sticky;
- left: 0;
- z-index: 1;
-}
-
-.table tbody tr .wenzi{
- /*writing-mode: vertical-lr;*/
- /*text-orientation: upright;*/
- transform: rotate(360deg);
- writing-mode: vertical-lr;
- letter-spacing: 2px;
-}
-
-.table tbody tr .kaitou{
- z-index: 1;
- background-color: white;
-}
-
-.table tbody tr .tdgu1{
- position: sticky;
- left: 50px;
- z-index: 2;
-}
-
-.table tbody tr .tdgu2{
- position: sticky;
- left: 100px;
- z-index: 2;
-}
-
-.table tbody tr .tdgu3{
- position: sticky;
- left: 150px;
- z-index: 2;
-}
-
-.table tbody tr .tdgu4{
- position: sticky;
- left: 250px;
- z-index: 2;
-}
-
-.table tbody tr .tdgu5{
- position: sticky;
- left: 412px;
- z-index: 2;
-}
-
-.table2 thead tr .timeth,
-.table2 thead tr .thgu {
- position: sticky;
- top:0;
- z-index: 3;
-}
-
-.table2 thead .gudingth th{
- position: sticky;
- top: 32px;
- z-index: 2;
-}
-
-.table2 thead .equipname .name{
- z-index: 3;
-}
-
-.table2 thead .equipname .dong1{
- z-index: 4;
- left: 0;
-}
-
-.table2 thead .equipname .dong2{
- z-index: 5;
- left: 50px;
-}
-
-
-.table2 thead .equipname .dong3{
- z-index: 5;
- left: 100px;
-}
-
-.table2 thead .equipname .dong4{
- z-index: 5;
- left: 150px;
-}
-
-.table2 thead .equipname .dong5{
- z-index: 5;
- left: 250px;
-}
-
-.table2 thead .equipname .dong6{
- z-index: 5;
- left: 412px;
-}
-
-#EfficiencyPO{
- overflow: hidden;
-}
-
-.identifyingclass {
- width: 55px;
- height: 15px;
- display: inline-block
-}
-
-.dataContent {
- white-space: nowrap;
- /*margin: 0;*/
- border-collapse: separate;
- border-spacing: 0;
- /*table-layout: fixed;*/
- border: 1px solid #ccc;
- /*border: 1px solid #ccc;*/
- width: 100%;
- /*height: 100%;*/
- /*overflow: hidden;*/
- /*overflow-y: auto;*/
- text-align: center;
-}
-
-.dataContent .thead th {
- background-color: #fafafa;
- text-align: center;
- height: 30px;
- padding: 5px;
-}
-
-.dataContent .notfixed th {
- width: auto;
-}
-
-.dataContent .mathData td {
- padding: 10px;
-}
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue b/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue
deleted file mode 100644
index a5ab8df..0000000
--- a/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue
+++ /dev/null
@@ -1,759 +0,0 @@
-<template>
- <div class="efficiency_list" style="width: 100%">
- <div :bordered="false">
- <!-- 鏌ヨ鍖哄煙 -->
- <div>
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="5" :sm="5">
- <a-form-item label="璁惧绫诲瀷">
- <a-select
- :value="queryParams.equipmentType"
- mode="multiple"
- placeholder="璇烽�夋嫨璁惧绫诲瀷"
- allow-clear
- :maxTagCount="1"
- @change="selectChange($event,'equipmentType')"
- >
- <a-select-option v-for="(item,index) in equipmentTypeList" :value="item.value" :key="index">
- {{item.label}}
- </a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <a-col :md="5" :sm="5">
- <a-form-item label="椹卞姩绫诲瀷">
- <a-select
- :value="queryParams.driveType"
- mode="multiple"
- placeholder="璇烽�夋嫨椹卞姩绫诲瀷"
- allow-clear
- :maxTagCount="1"
- @change="selectChange($event,'driveType')"
- >
- <a-select-option v-for="(item,index) in driveTypeList" :value="item.value" :key="index">
- {{item.label}}
- </a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <a-col :md="4" :sm="4">
- <a-form-item label="鏃堕棿">
- <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD"
- v-model="dates" :allowClear="false"/>
- </a-form-item>
- </a-col>
- <a-col :md="5" :sm="5" :xs="5">
- <a-form-item label="璁惧绾у埆">
- <a-select
- :value="queryParams.deviceLevel"
- mode="multiple"
- placeholder="璇烽�夋嫨璁惧绾у埆"
- allow-clear
- :maxTagCount="1"
- @change="selectChange($event,'deviceLevel')"
- >
- <a-select-option v-for="(item,index) in device_level_list" :value="item.value" :key="index">
- {{item.label}}
- </a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <a-col :md="5" :sm="5" :xs="5">
- <a-form-item label="璁惧绉嶇被">
- <a-select
- :value="queryParams.deviceCategory"
- mode="multiple"
- placeholder="璇烽�夋嫨璁惧绉嶇被"
- allow-clear
- :maxTagCount="1"
- @change="selectChange($event,'deviceCategory')"
- >
- <a-select-option v-for="(item,index) in device_category_list" :value="item.value" :key="index">
- {{item.label}}
- </a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- </a-row>
-
- <a-row :gutter="24" type="flex" align="middle">
- <a-col :md="24" :sm="24" :xs="24"
- style="display: flex;justify-content: space-between;align-items: flex-start">
- <div>
- <a-space style="margin-right: 20px">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
- <a-button type="primary" @click="exportExcel" icon="download">瀵煎嚭</a-button>
- <a-button type="primary" icon="printer" v-print="'#Efficiency'"
- v-has="'efficiency:print'">鎵撳嵃
- </a-button>
- </a-space>
- <a-checkbox-group :value="checkedList" :default-value="['lyl']" :options="efficiencyOptions"
- @change="efficiencyOptionsOnChange"/>
- </div>
- <table cellpadding="5" cellspacing="1" style="border: 1px solid darkgray;">
- <tr>
- <td v-for="(item, index) in identifying"
- style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap">{{item.title}}
- </td>
- </tr>
- <tr>
- <td style="text-align:center;" v-for="(item, index) in identifying">
- <div class="identifyingclass" :style="{background: item.color}"></div>
- </td>
- </tr>
- </table>
- </a-col>
- </a-row>
- </a-form>
- </div>
- </div>
-
- <a-spin :spinning="spinning">
- <div id="Efficiency" class="container" style="margin-top: 20px;">
- <div class="table2">
- <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap"
- v-if="dataList.length>0">
- <thead>
- <tr class="thead fixed equipname">
- <th class="thgu dong1 name" rowspan="2"
- style="min-width: 50px; max-width: 50px;width: 50px;height: 66px">鍏徃
- </th>
- <th class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">杞﹂棿</th>
- <th class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">宸ユ</th>
- <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">璁惧缂栧彿
- </th>
- <th class="thgu dong5 name" rowspan="2" style="min-width: 162px; max-width: 162px;width: 162px;">璁惧鍚嶇О
- </th>
- <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">璁惧绫诲瀷
- </th>
- <template v-for="(tableHead, index) in tableHeads">
- <th class="timeth" :colspan="checkedList.length">{{tableHead}}</th>
- </template>
- </tr>
- <tr class="thead notfixed gudingth">
- <template v-for="(tableHead, index) in tableHeads">
- <th v-if="checkedList.indexOf('lyl') > -1">鍒╃敤鐜�(%)</th>
- <th v-if="checkedList.indexOf('kjl') > -1">寮�鏈虹巼(%)</th>
- <th v-if="checkedList.indexOf('kjsj') > -1">寮�鏈烘椂闂�(灏忔椂)</th>
- <th v-if="checkedList.indexOf('jgsj') > -1">鍔犲伐鏃堕棿(灏忔椂)</th>
- <th v-if="checkedList.indexOf('djsj') > -1">寰呮満鏃堕棿(灏忔椂)</th>
- <th v-if="checkedList.indexOf('gjsj') > -1">鍏虫満鏃堕棿(灏忔椂)</th>
- </template>
-
- </tr>
- </thead>
- <tbody>
-
- <tr class="mathData" v-for="(item, index) in dataList">
- <template v-if="item.level1!=='鍚堣'&&item.level1!=='骞冲潎鍊�'">
- <td class="tdgu kaitou" :rowspan="item.level1span"
- :class="{hidden: item.level1dis,noExl:item.level1dis}" v-show="!item.level1dis">
- <div class="wenzi">
- {{item.level1}}
- </div>
- </td>
- <td class="tdgu1 kaitou" :rowspan="item.level2span"
- :class="{hidden: item.level2dis,noExl:item.level2dis}" v-show="!item.level2dis">
- <div class="wenzi">
- {{item.level2}}
- </div>
- </td>
- <td class="tdgu2 kaitou wenzi" :rowspan="item.level3span"
- :class="{hidden: item.level3dis,noExl:item.level3dis}" v-show="!item.level3dis">
- <div class="wenzi">
- {{item.level3}}
- </div>
- </td>
- <td class="tdgu3 kaitou">{{item.equipmentId}}</td>
- <td class="tdgu4 kaitou" style="min-width: 162px; max-width: 162px;width: 162px;">
- {{item.equipmentName}}
- </td>
- <td class="tdgu5 kaitou">{{item.equipmentType}}</td>
- </template>
-
- <!--鍚堣涓庡钩鍧囧�煎尯鍩�-->
- <template v-else>
- <td colspan="6" class="tdgu kaitou">{{item.level1}}</td>
- </template>
-
- <template v-for="(tableHead, index) in item.dataList">
- <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('lyl') > -1">
- {{tableHead.utilizationRate | numFilter}}
- </td>
- <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjl') > -1">
- {{tableHead.openRate | numFilter}}
- </td>
- <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1">
- {{tableHead.openLong | getFormattedTime}}
- </td>
- <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('jgsj') > -1">
- {{tableHead.processLong | getFormattedTime}}
- </td>
- <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('djsj') > -1">
- {{tableHead.waitLong | getFormattedTime}}
- </td>
- <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gjsj') > -1">
- {{tableHead.closeLong | getFormattedTime}}
- </td>
- </template>
-
- </tr>
-
- </tbody>
- </table>
-
- </div>
- </div>
- </a-spin>
- </div>
- </div>
-</template>
-
-<script>
- import moment from 'moment'
- import { putAction, getAction } from '@/api/manage'
- import $ from 'jquery'
- import '@/components/table2excel/table2excel'
- import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
- import api from '@/api/mdc'
-
- export default {
- name: 'EfficiencyList',
- components: {},
- data() {
- return {
- typeTree: '',
- typeParent: 1,
- typeEquipment: 1,
- TreeIDOne: 1,
- TreeIDTwo: 2,
- deviceTypeDict: '',
- dates: [],
- equipmentTypeList: [],
- driveTypeList: [],
- device_level_list: [],
- device_category_list: [],
- identifying: [],
- queryParam: {},
- queryParams: {
- equipmentType: [],
- driveType: [],
- deviceLevel: [],
- deviceCategory: []
- },
- queryParamEquip: {},
- queryParamPeople: {},
- efficiencyOptions: [
- { label: '鍒╃敤鐜�', value: 'lyl' },
- { label: '寮�鏈虹巼', value: 'kjl' },
- { label: '寮�鏈烘椂闂�', value: 'kjsj' },
- { label: '鍔犲伐鏃堕棿', value: 'jgsj' },
- { label: '寰呮満鏃堕棿', value: 'djsj' },
- { label: '鍏虫満鏃堕棿', value: 'gjsj' }
- ],
- checkedList: ['lyl'],
- dataList: [],
- url: {
- list: '/mdc/efficiencyReport/efficiencyList',
- listByType: '/mdc/MdcUtilizationRate/getByType',
- queryEquipmentType: '/mdc/mdcEquipmentType/queryEquipmentType'
- },
- tableHeads: [],
- distinguishColorList: [],
- utilizationRateRowAverage: '',
- openRateRowAverage: '',
- openLongRowAverage: '',
- processLongRowAverage: '',
- waitLongRowAverage: '',
- closeLongRowAverage: '',
- spinning: false
- }
- },
- props: { nodeTree: '', Type: '', nodePeople: '' },
- created() {
- this.showIdentifying()
- this.dates = [moment().subtract('days', 8), moment().subtract('days', 1)]
- this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD')
- this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
- this.queryParam.typeTree = '1'
- this.loadData()
- this.queryGroup()
- this.getDriveTypeByApi()
- this.initDictData('device_level')
- this.initDictData('device_category')
- },
- mounted() {
- window.addEventListener('resize', this.handleWindowResize)
- this.handleWindowResize()
- },
- watch: {
- Type(valmath) {
- this.dataList = []
- this.queryParam.typeTree = valmath
- },
- nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId != null) {
- this.queryParamEquip.parentId = ''
- this.queryParamEquip.equipmentId = val.equipmentId
- } else {
- this.queryParamEquip.parentId = val.key
- this.queryParamEquip.equipmentId = ''
- }
- this.searchQuery()
- }
- },
- nodePeople(val) {
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId != null) {
- this.queryParamPeople.parentId = val.equipmentId
- this.queryParamPeople.equipmentId = ''
- } else {
- this.queryParamPeople.parentId = val.key
- this.queryParamPeople.equipmentId = ''
- }
- this.searchQuery()
- }
- }
- },
- filters: {
- numFilter(value) {
- if (value) {
- return parseFloat((value * 100).toFixed(2))
- } else {
- return '0'
- }
- },
-
- /**
- * 鏍煎紡鍖栨椂闂�
- * @param seconds 绉掓暟
- * @returns '' 鏍煎紡鍖栧悗鏃堕棿瀛楃涓�
- */
- getFormattedTime(seconds) {
- if (seconds) {
- return parseFloat((seconds / 3600).toFixed(2))
- } else {
- return '0'
- }
- }
- },
- computed: {},
- methods: {
- initDictData(dictCode) {
- // //浼樺厛浠庣紦瀛樹腑璇诲彇瀛楀吀閰嶇疆
- if (getDictItemsFromCache(dictCode)) {
- this[dictCode + '_list'] = getDictItemsFromCache(dictCode)
- return
- }
- //鏍规嵁瀛楀吀Code, 鍒濆鍖栧瓧鍏告暟缁�
- ajaxGetDictItems(dictCode, null).then((res) => {
- if (res.success) {
- this[dictCode + '_list'] = res.result
- return
- }
- })
- },
- selectChange(value, key) {
- this.queryParams[key] = value
- },
- checkSameData(dataList) {
- let cache = {} //瀛樺偍鐨勬槸閿槸kclx 鐨勫�硷紝鍊兼槸kclx 鍦╥ndeces涓暟缁勭殑涓嬫爣
- let indices = [] //鏁扮粍涓瘡涓�涓�兼槸涓�涓暟缁勶紝鏁扮粍涓殑姣忎竴涓厓绱犳槸鍘熸暟缁勪腑鐩稿悓kclx鐨勪笅鏍�
- dataList.map((item, index) => {
- let level1 = item.level1
- let _index = cache[level1]
- if (_index !== undefined) {
- indices[_index].push(index)
- } else {
- cache[level1] = indices.length
- indices.push([index])
- }
- })
- let result = []
- indices.map((item) => {
- item.map((index) => {
- result.push(dataList[index])
- })
- })
- this.dataList = result
- },
- checkSameData1(dataList) {
- let cache = {} //瀛樺偍鐨勬槸閿槸kclx 鐨勫�硷紝鍊兼槸kclx 鍦╥ndeces涓暟缁勭殑涓嬫爣
- let indices = [] //鏁扮粍涓瘡涓�涓�兼槸涓�涓暟缁勶紝鏁扮粍涓殑姣忎竴涓厓绱犳槸鍘熸暟缁勪腑鐩稿悓kclx鐨勪笅鏍�
- dataList.map((item, index) => {
- let level2 = item.level2
- let _index = cache[level2]
- if (_index !== undefined) {
- indices[_index].push(index)
- } else {
- cache[level2] = indices.length
- indices.push([index])
- }
- })
- let result = []
- indices.map((item) => {
- item.map((index) => {
- result.push(dataList[index])
- })
- })
- this.dataList = result
- },
- checkSameData2(dataList) {
- let cache = {} //瀛樺偍鐨勬槸閿槸kclx 鐨勫�硷紝鍊兼槸kclx 鍦╥ndeces涓暟缁勭殑涓嬫爣
- let indices = [] //鏁扮粍涓瘡涓�涓�兼槸涓�涓暟缁勶紝鏁扮粍涓殑姣忎竴涓厓绱犳槸鍘熸暟缁勪腑鐩稿悓kclx鐨勪笅鏍�
- dataList.map((item, index) => {
- let level3 = item.level3
- let _index = cache[level3]
- if (_index !== undefined) {
- indices[_index].push(index)
- } else {
- cache[level3] = indices.length
- indices.push([index])
- }
- })
- let result = []
- indices.map((item) => {
- item.map((index) => {
- result.push(dataList[index])
- })
- })
- this.dataList = result
- },
- // 鍚堝苟
- combineCell() {
- console.log(this.dataList)
- let list = this.dataList
- for (let field in list[0]) {
- var k = 0
- while (k < list.length) {
- list[k][field + 'span'] = 1
- list[k][field + 'dis'] = false
- for (var i = k + 1; i <= list.length - 1; i++) {
- if (list[k][field] == list[i][field] && list[k][field] != '') {
- list[k][field + 'span']++
- list[k][field + 'dis'] = false
- list[i][field + 'span'] = 1
- list[i][field + 'dis'] = true
- } else {
- break
- }
- }
- k = i
- }
- }
- return list
- },
- disabledDate(current) {
- //Can not slect days before today and today
- return current && current > moment().subtract('days', 1)
- },
- initDeviceType(deviceList) {
- let dictCode = 'mdc_equipmentType'
- let items = []
- items = getDictItemsFromCache(dictCode)
- if (deviceList && items.length > 0) {
- for (let a = 0; a < deviceList.length; a++) {
- if (items && items.length > 0) {
- for (let i = 0; i < items.length; i++) {
- if (deviceList[a].equipmentType == items[i].value) {
- deviceList[a].equipmentType = items[i].title
- }
- }
- } else {
- ajaxGetDictItems(dictCode, null).then((res) => {
- if (res.success) {
- let items = res.result
- for (let i = 0; i < items.length; i++) {
- if (deviceList[a].equipmentType == items[i].value) {
- deviceList[a].equipmentType = items[i].title
- }
- }
- }
- })
- }
- }
- }
- },
- exportExcel() {
- $('#Efficiency').table2excel({
- exclude: '.noExl',
- name: 'Excel Document Name',
- filename: '璁惧鍒╃敤鐜�',
- exclude_img: true,
- fileext: '.xls',
- exclude_links: true,
- exclude_inputs: false
- })
- },
- showIdentifying() {
- getAction(this.url.listByType, { type: 'lyl' }).then(res => {
- if (res.success) {
- this.identifying = res.result
- }
- })
- },
- dateParamChange(v1, v2) {
- this.queryParam.startTime = v2[0]
- this.queryParam.endTime = v2[1]
- // 鐐瑰嚮鏃堕棿閫夋嫨鍣ㄧ殑娓呯┖鎸夐挳鏃朵細瑙﹀彂姝ゅ垽鏂�(鐐瑰嚮閲嶇疆鎸夐挳涓嶄細瑙﹀彂)锛屽疄鐜伴噸缃垪琛ㄥ姛鑳斤紝鍒囧疄鏀瑰彉鍒楄〃鏄剧ず鏁堟灉
- if (!this.queryParam.startTime && !this.queryParam.endTime) this.searchReset()
- },
- efficiencyOptionsOnChange(checkedList) {
- // let index = checkedList.indexOf('lyl')
- // if (index < 0) {
- // // this.$message.warn('涓嶈兘鍙栨秷鏌ヨ寮�鍔ㄧ巼')
- // this.$notification.warning({
- // message: '娑堟伅',
- // description: '涓嶈兘鍙栨秷鏌ヨ寮�鍔ㄧ巼'
- // })
- //
- // return false
- // }
- this.checkedList = checkedList
- },
- searchQuery() {
- if (this.queryParam.typeTree == '1') {
- this.queryParam.parentId = this.queryParamEquip.parentId
- this.queryParam.equipmentId = this.queryParamEquip.equipmentId
- } else {
- this.queryParam.parentId = this.queryParamPeople.parentId
- this.queryParam.equipmentId = ''
- }
- Object.keys(this.queryParams).forEach(item => {
- this.queryParam[item] = this.queryParams[item].join()
- // 姝ゅ涓轰繚璇佹帴鍙e弬鏁颁笉澶氫綑锛屽彲鐪佺暐
- if (this.queryParams[item].length === 0) delete this.queryParam[item]
- })
- this.loadData()
- },
- searchReset() {
- this.typeTree = this.queryParam.typeTree
- this.typeParent = this.queryParam.parentId
- this.typeEquipment = this.queryParam.equipmentId
- this.queryParam = {}
- this.queryParam.typeTree = this.typeTree
- this.queryParam.parentId = this.typeParent
- this.queryParam.equipmentId = this.typeEquipment
- this.dates = [moment().subtract('days', 8), moment().subtract('days', 1)]
- this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD')
- this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
- this.queryParams = {
- equipmentType: [],
- driveType: [],
- deviceLevel: [],
- deviceCategory: []
- }
- this.loadData()
- },
- loadData() {
- this.tableHeads = []
- this.dataList = []
- this.spinning = true
- getAction(this.url.list, this.queryParam).then(res => {
- if (res.success) {
- this.tableHeads = res.result.dates
- this.dataList = res.result.mdcEfficiencyList
- if (res.result.mdcEfficiencyList && !res.result.mdcEfficiencyList.length) {
- this.$notification.info({
- message: '娑堟伅',
- description: '鏆傛棤璇ョ被鍨嬫暟鎹�'
- })
- }
- this.distinguishColorList = res.result.utilizationRateList
- this.checkSameData(this.dataList)
- this.checkSameData1(this.dataList)
- this.checkSameData2(this.dataList)
- this.combineCell()
- }
- }).finally(() => {
- this.spinning = false
- })
- },
- queryGroup() {
- getAction(this.url.queryEquipmentType).then(res => {
- if (res.success) {
- this.equipmentTypeList = res.result.map(item => {
- return {
- label: item.equipmentTypeName,
- value: item.equipmentTypeName
- }
- })
- } else {
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- })
- },
-
- /**
- * 璋冪敤鎺ュ彛鑾峰彇鎺у埗绯荤粺绫诲瀷
- */
- getDriveTypeByApi() {
- api.getDriveTypeApi().then((res) => {
- if (res.success) this.driveTypeList = res.result
- })
- },
-
- /**
- * 鍒嗚鲸鐜囨敼鍙樻椂鍚屾椂鏀瑰彉琛ㄦ牸楂樺害宸蹭繚璇侀椤典竴杩涘叆涓嶆嫋鍔ㄥ瀭鐩存粴鍔ㄦ潯鏃跺嵆鍙嫋鍔ㄨ〃鏍兼按骞虫粴鍔ㄦ潯
- */
- handleWindowResize() {
- const tableContainer = document.getElementById('Efficiency') // 琛ㄦ牸瀹瑰櫒
- const clientHeight = document.documentElement.clientHeight || document.body.clientHeight // 娴忚鍣ㄥ彲瑙嗗尯鍩熼珮搴�
- const containerTopToClientTopHeight = tableContainer.getBoundingClientRect().top // 琛ㄦ牸瀹瑰櫒椤堕儴鍒版祻瑙堝櫒鍙鍖哄煙椤堕儴鐨勯棿璺�
- tableContainer.style.height = (clientHeight - containerTopToClientTopHeight - 32) + 'px'
- }
- }
- }
-</script>
-<style scoped>
- .table2 {
- width: 100%;
- height: 100%;
- overflow: auto;
- }
-
- .table2 thead tr th:first-child,
- .table tbody tr .tdgu {
- position: sticky;
- left: 0;
- z-index: 1;
- }
-
- .table tbody tr .wenzi {
- /*writing-mode: vertical-lr;*/
- /*text-orientation: upright;*/
- transform: rotate(360deg);
- writing-mode: vertical-lr;
- letter-spacing: 2px;
- }
-
- .table tbody tr .kaitou {
- z-index: 1;
- background-color: white;
- }
-
- .table tbody tr .tdgu1 {
- position: sticky;
- left: 50px;
- z-index: 2;
- }
-
- .table tbody tr .tdgu2 {
- position: sticky;
- left: 100px;
- z-index: 2;
- }
-
- .table tbody tr .tdgu3 {
- position: sticky;
- left: 150px;
- z-index: 2;
- }
-
- .table tbody tr .tdgu4 {
- position: sticky;
- left: 250px;
- z-index: 2;
- }
-
- .table tbody tr .tdgu5 {
- position: sticky;
- left: 412px;
- z-index: 2;
- }
-
- .table2 thead tr .timeth,
- .table2 thead tr .thgu {
- position: sticky;
- top: 0;
- z-index: 3;
- }
-
- .table2 thead .gudingth th {
- position: sticky;
- top: 32px;
- z-index: 2;
- }
-
- .table2 thead .equipname .name {
- z-index: 3;
- }
-
- .table2 thead .equipname .dong1 {
- z-index: 4;
- left: 0;
- }
-
- .table2 thead .equipname .dong2 {
- z-index: 5;
- left: 50px;
- }
-
- .table2 thead .equipname .dong3 {
- z-index: 5;
- left: 100px;
- }
-
- .table2 thead .equipname .dong4 {
- z-index: 5;
- left: 150px;
- }
-
- .table2 thead .equipname .dong5 {
- z-index: 5;
- left: 250px;
- }
-
- .table2 thead .equipname .dong6 {
- z-index: 5;
- left: 412px;
- }
-
- #Efficiency {
- overflow: hidden;
- }
-
- .identifyingclass {
- width: 55px;
- height: 15px;
- display: inline-block
- }
-
- .dataContent {
- white-space: nowrap;
- /*margin: 0;*/
- /*border: none;*/
- border-collapse: separate;
- border-spacing: 0;
- /*table-layout: fixed;*/
- border: 1px solid #ccc;
- /*border: 1px solid #ccc;*/
- width: 100%;
- /*height: 100%;*/
- /*overflow: hidden;*/
- /*overflow-y: auto;*/
- text-align: center;
- }
-
- .dataContent .thead th {
- background-color: #fafafa;
- text-align: center;
- height: 30px;
- padding: 5px;
- }
-
- .dataContent .mathData td {
- padding: 10px;
- }
-
- td {
- vertical-align: middle;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue b/src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue
deleted file mode 100644
index 8d1302f..0000000
--- a/src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue
+++ /dev/null
@@ -1,807 +0,0 @@
-<template>
- <div style="width: 100%;">
- <div :bordered="false">
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="seach-content">
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="5" :sm="5">
- <a-form-item label="璁惧绫诲瀷">
- <a-select
- :value="queryParams.equipmentType"
- mode="multiple"
- placeholder="璇烽�夋嫨璁惧绫诲瀷"
- allow-clear
- :maxTagCount="1"
- @change="selectChange($event,'equipmentType')"
- >
- <a-select-option v-for="(item,index) in equipmentTypeList" :value="item.value" :key="index">
- {{item.label}}
- </a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <a-col :md="5" :sm="5">
- <a-form-item label="椹卞姩绫诲瀷">
- <a-select
- :value="queryParams.driveType"
- mode="multiple"
- placeholder="璇烽�夋嫨椹卞姩绫诲瀷"
- allow-clear
- :maxTagCount="1"
- @change="selectChange($event,'driveType')"
- >
- <a-select-option v-for="(item,index) in driveTypeList" :value="item.value" :key="index">
- {{item.label}}
- </a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <a-col :md="4" :sm="4" :xs="4">
- <a-form-item label="鏃堕棿">
- <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD"
- v-model="dates" :allowClear="false"/>
- </a-form-item>
- </a-col>
- <a-col :md="4" :sm="4" :xs="4">
- <a-form-item label="鐝埗">
- <a-select v-model="queryParam.shiftId" placeholder="璇烽�夋嫨鐝埗"
- @change="initShiftSubList" :allowClear="allowClear">
- <a-select-option v-for="(em,index) in shiftList" :key="index" :value="em.value">
- {{ em.label }}
- </a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <a-col :md="4" :sm="4" :xs="4">
- <a-form-item label="鐝">
- <a-select v-model="queryParam.shiftSubId" placeholder="璇烽�夋嫨鐝" @change="initShiftSubListChange"
- :allowClear="allowClearSu">
- <a-select-option v-for="(em,index) in shiftSubList" :key="index" :value="em.value">
- {{ em.label }}
- </a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <a-col :md="2" :sm="2">
- <a
- @click="toggleSearchStatus=!toggleSearchStatus"
- @selectstart="$event.preventDefault()"
- style="display: inline-block;height: 32px;line-height: 32px"
- >
- {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }}
- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
- </a>
- </a-col>
- </a-row>
-
- <a-row :gutter="24" v-if="toggleSearchStatus">
- <a-col :md="5" :sm="5" :xs="5">
- <a-form-item label="璁惧绾у埆">
- <a-select
- :value="queryParams.deviceLevel"
- mode="multiple"
- placeholder="璇烽�夋嫨璁惧绾у埆"
- allow-clear
- :maxTagCount="1"
- @change="selectChange($event,'deviceLevel')"
- >
- <a-select-option v-for="(item,index) in device_level_list" :value="item.value" :key="index">
- {{item.label}}
- </a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <a-col :md="5" :sm="5" :xs="5">
- <a-form-item label="璁惧绉嶇被">
- <a-select
- :value="queryParams.deviceCategory"
- mode="multiple"
- placeholder="璇烽�夋嫨璁惧绉嶇被"
- allow-clear
- :maxTagCount="1"
- @change="selectChange($event,'deviceCategory')"
- >
- <a-select-option v-for="(item,index) in device_category_list" :value="item.value" :key="index">
- {{item.label}}
- </a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- </a-row>
-
- <a-row :gutter="24" type="flex" align="middle">
- <a-col :md="24" :sm="24" :xs="24"
- style="display: flex;justify-content: space-between;align-items: flex-start">
- <div>
- <a-space style="margin-right: 20px">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
- <a-button type="primary" @click="exportExcel" icon="download">瀵煎嚭</a-button>
- <a-button type="primary" icon="printer" v-print="'#EfficiencyShift'"
- v-has="'efficiencyShiftReport:print'">鎵撳嵃
- </a-button>
- </a-space>
- <a-checkbox-group :value="checkedList" :default-value="['lyl']" :options="efficiencyOptions"
- @change="efficiencyOptionsOnChange"/>
- </div>
- <table cellpadding="5" cellspacing="1" style="border: 1px solid darkgray;">
- <tr>
- <td v-for="(item, index) in identifying">{{item.title}}</td>
- </tr>
- <tr>
- <td style="text-align:center;" v-for="(item, index) in identifying">
- <div class="identifyingclass" :style="{background: item.color}"></div>
- </td>
- </tr>
- </table>
- </a-col>
- </a-row>
- </a-form>
- </div>
- </div>
- <a-spin :spinning="spinning">
- <div class="container" id="EfficiencyShift" style="margin-top: 20px;">
- <div class="table2">
- <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap"
- v-if="dataList.length>0">
- <thead>
- <tr class="thead fixed equipname">
- <th class="thgu dong1 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;height: 66px">鍏徃</th>
- <th class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">杞﹂棿</th>
- <th class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">宸ユ</th>
- <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">璁惧缂栧彿
- </th>
- <th class="thgu dong5 name" rowspan="2" style="min-width: 162px; max-width: 162px;width: 162px;">璁惧鍚嶇О
- </th>
- <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">璁惧绫诲瀷
- </th>
- <th class="thgu dong7 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">鐝</th>
- <template v-for="(tableHead, index) in tableHeads">
- <th class="timeth" :colspan="checkedList.length">{{tableHead}}</th>
- </template>
-
- </tr>
- <tr class="thead notfixed gudingth">
- <template v-for="(tableHead, index) in tableHeads">
- <th v-if="checkedList.indexOf('lyl') > -1">鐝鍒╃敤鐜�(%)</th>
- <th v-if="checkedList.indexOf('kjsj') > -1">寮�鏈烘椂闂�(灏忔椂)</th>
- <th v-if="checkedList.indexOf('jgsj') > -1">鍔犲伐鏃堕棿(灏忔椂)</th>
- <th v-if="checkedList.indexOf('djsj') > -1">寰呮満鏃堕棿(灏忔椂)</th>
- <th v-if="checkedList.indexOf('gjsj') > -1">鍏虫満鏃堕棿(灏忔椂)</th>
- </template>
- </tr>
- </thead>
- <tbody>
- <tr class="mathData" v-for="(item, index) in dataList">
- <template v-if="item.level1!=='鍚堣'&&item.level1!=='骞冲潎鍊�'">
- <td class="tdgu kaitou" :rowspan="item.level1span"
- :class="{hidden: item.level1dis,noExl:item.level1dis}" v-show="!item.level1dis">
- <div class="wenzi">
- {{item.level1}}
- </div>
- </td>
- <td class="tdgu1 kaitou" :rowspan="item.level2span"
- :class="{hidden: item.level2dis,noExl:item.level2dis}" v-show="!item.level2dis">
- <div class="wenzi">
- {{item.level2}}
- </div>
- </td>
- <td class="tdgu2 kaitou" :rowspan="item.level3span"
- :class="{hidden: item.level3dis,noExl:item.level3dis}" v-show="!item.level3dis">
- <div class="wenzi">
- {{item.level3}}
- </div>
- </td>
- <td class="tdgu3 kaitou">{{item.equipmentId}}</td>
- <td class="tdgu4 kaitou" style="min-width: 162px; max-width: 162px;width: 162px;">
- {{item.equipmentName}}
- </td>
- <td class="tdgu5 kaitou">{{item.equipmentType}}</td>
- <td class="tdgu6 kaitou">{{item.shiftSubName}}</td>
- </template>
-
- <template v-else>
- <td colspan="7" class="tdgu kaitou">{{item.level1}}</td>
- </template>
- <!--<td>{{item.tierType}}</td>-->
- <template v-for="(tableHead, index) in item.dataList">
- <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('lyl') > -1">{{tableHead.utilizationRate | numFilter}}</td>
- <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1">
- {{tableHead.openLong | getFormattedTime}}
- </td>
- <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('jgsj') > -1">
- {{tableHead.processLong | getFormattedTime}}
- </td>
- <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('djsj') > -1">
- {{tableHead.waitLong | getFormattedTime}}
- </td>
- <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gjsj') > -1">
- {{tableHead.closeLong | getFormattedTime}}
- </td>
- </template>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </a-spin>
- </div>
- </div>
-</template>
-
-<script>
- import moment from 'moment'
- import { putAction, getAction } from '@/api/manage'
- import $ from 'jquery'
- import '@/components/table2excel/table2excel'
- import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
- import api from '@/api/mdc'
-
- export default {
- name: 'EfficiencyShiftList',
- components: {},
- data() {
- return {
- typeTree: '',
- typeParent: 1,
- typeEquipment: 1,
- allowClear: true,
- allowClearSu: true,
- dates: [],
- equipmentTypeList: [],
- driveTypeList: [],
- device_level_list: [],
- device_category_list: [],
- identifying: [],
- queryParam: {},
- queryParams: {
- equipmentType: [],
- driveType: [],
- deviceLevel: [],
- deviceCategory: []
- },
- queryParamEquip: {},
- queryParamPeople: {},
- efficiencyOptions: [
- { label: '鐝鍒╃敤鐜�', value: 'lyl' },
- { label: '寮�鏈烘椂闂�', value: 'kjsj' },
- { label: '鍔犲伐鏃堕棿', value: 'jgsj' },
- { label: '寰呮満鏃堕棿', value: 'djsj' },
- { label: '鍏虫満鏃堕棿', value: 'gjsj' }
- ],
- checkedList: ['lyl'],
- dataList: [],
- url: {
- list: '/mdc/efficiencyReport/efficiencyShiftList',
- listByType: '/mdc/MdcUtilizationRate/getByType',
- initShiftList: '/mdc/mdcMdcShift/initShiftList',
- initShiftSubList: '/mdc/mdcShiftSub/initShiftSubList',
- queryEquipmentType: '/mdc/mdcEquipmentType/queryEquipmentType'
- },
- tableHeads: [],
- shiftList: [],
- shiftSubList: [],
- spinning: false,
- toggleSearchStatus: false
- }
- },
- props: { nodeTree: '', Type: '', nodePeople: '' },
- created() {
- this.initShiftList()
- this.showIdentifying()
- this.dates = [moment().subtract('days', 7), moment().subtract('days', 1)]
- this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD')
- this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
- this.queryParam.typeTree = '1'
- this.loadData()
- this.queryGroup()
- this.getDriveTypeByApi()
- this.initDictData('device_level')
- this.initDictData('device_category')
- },
- mounted() {
- window.addEventListener('resize', this.handleWindowResize)
- this.handleWindowResize()
- },
- watch: {
- Type(valmath) {
- this.dataList = []
- this.queryParam.typeTree = valmath
- },
- nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
- console.log(val)
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId != null) {
- this.queryParamEquip.parentId = ''
- this.queryParamEquip.equipmentId = val.equipmentId
- } else {
- this.queryParamEquip.parentId = val.key
- this.queryParamEquip.equipmentId = ''
- }
- this.searchQuery()
- }
- },
- nodePeople(val) {
- if (JSON.stringify(val) != '{}') {
- if (val.equipmentId != null) {
- this.queryParamPeople.parentId = val.equipmentId
- this.queryParamPeople.equipmentId = ''
- } else {
- this.queryParamPeople.parentId = val.key
- this.queryParamPeople.equipmentId = ''
- }
- this.searchQuery()
- }
- }
- },
- filters: {
- numFilter(value) {
- if (value) {
- return parseFloat((value * 100).toFixed(2))
- } else {
- return '0'
- }
- },
-
- /**
- * 鏍煎紡鍖栨椂闂�
- * @param seconds 绉掓暟
- * @returns '' 鏍煎紡鍖栧悗鏃堕棿瀛楃涓�
- */
- getFormattedTime(seconds) {
- if (seconds) {
- return parseFloat((seconds / 3600).toFixed(2))
- } else {
- return '0'
- }
- }
- },
- methods: {
- initDictData(dictCode) {
- // //浼樺厛浠庣紦瀛樹腑璇诲彇瀛楀吀閰嶇疆
- if (getDictItemsFromCache(dictCode)) {
- this[dictCode + '_list'] = getDictItemsFromCache(dictCode)
- return
- }
- //鏍规嵁瀛楀吀Code, 鍒濆鍖栧瓧鍏告暟缁�
- ajaxGetDictItems(dictCode, null).then((res) => {
- if (res.success) {
- this[dictCode + '_list'] = res.result
- return
- }
- })
- },
- selectChange(value, key) {
- this.queryParams[key] = value
- },
- checkSameData(dataList) {
- let cache = {} //瀛樺偍鐨勬槸閿槸kclx 鐨勫�硷紝鍊兼槸kclx 鍦╥ndeces涓暟缁勭殑涓嬫爣
- let indices = [] //鏁扮粍涓瘡涓�涓�兼槸涓�涓暟缁勶紝鏁扮粍涓殑姣忎竴涓厓绱犳槸鍘熸暟缁勪腑鐩稿悓kclx鐨勪笅鏍�
- dataList.map((item, index) => {
- let level1 = item.level1
- let _index = cache[level1]
- if (_index !== undefined) {
- indices[_index].push(index)
- } else {
- cache[level1] = indices.length
- indices.push([index])
- }
- })
- let result = []
- indices.map((item) => {
- item.map((index) => {
- result.push(dataList[index])
- })
- })
- this.dataList = result
- },
- checkSameData1(dataList) {
- let cache = {} //瀛樺偍鐨勬槸閿槸kclx 鐨勫�硷紝鍊兼槸kclx 鍦╥ndeces涓暟缁勭殑涓嬫爣
- let indices = [] //鏁扮粍涓瘡涓�涓�兼槸涓�涓暟缁勶紝鏁扮粍涓殑姣忎竴涓厓绱犳槸鍘熸暟缁勪腑鐩稿悓kclx鐨勪笅鏍�
- dataList.map((item, index) => {
- let level2 = item.level2
- let _index = cache[level2]
- if (_index !== undefined) {
- indices[_index].push(index)
- } else {
- cache[level2] = indices.length
- indices.push([index])
- }
- })
- let result = []
- indices.map((item) => {
- item.map((index) => {
- result.push(dataList[index])
- })
- })
- this.dataList = result
- },
- checkSameData2(dataList) {
- let cache = {} //瀛樺偍鐨勬槸閿槸kclx 鐨勫�硷紝鍊兼槸kclx 鍦╥ndeces涓暟缁勭殑涓嬫爣
- let indices = [] //鏁扮粍涓瘡涓�涓�兼槸涓�涓暟缁勶紝鏁扮粍涓殑姣忎竴涓厓绱犳槸鍘熸暟缁勪腑鐩稿悓kclx鐨勪笅鏍�
- dataList.map((item, index) => {
- let level3 = item.level3
- let _index = cache[level3]
- if (_index !== undefined) {
- indices[_index].push(index)
- } else {
- cache[level3] = indices.length
- indices.push([index])
- }
- })
- let result = []
- indices.map((item) => {
- item.map((index) => {
- result.push(dataList[index])
- })
- })
- this.dataList = result
- },
- // 鍚堝苟
- combineCell() {
- console.log(this.dataList)
- let list = this.dataList
- for (let field in list[0]) {
- var k = 0
- while (k < list.length) {
- list[k][field + 'span'] = 1
- list[k][field + 'dis'] = false
- for (var i = k + 1; i <= list.length - 1; i++) {
- if (list[k][field] == list[i][field] && list[k][field] != '') {
- list[k][field + 'span']++
- list[k][field + 'dis'] = false
- list[i][field + 'span'] = 1
- list[i][field + 'dis'] = true
- } else {
- break
- }
- }
- k = i
- }
- }
- return list
- },
- disabledDate(current) {
- //Can not slect days before today and today
- return current && current > moment().subtract('days', 1)
- },
- initDeviceType(deviceList) {
- let dictCode = 'mdc_equipmentType'
- let items = []
- items = getDictItemsFromCache(dictCode)
- if (deviceList && items.length > 0) {
- for (let a = 0; a < deviceList.length; a++) {
- if (items && items.length > 0) {
- for (let i = 0; i < items.length; i++) {
- if (deviceList[a].equipmentType == items[i].value) {
- deviceList[a].equipmentType = items[i].title
- }
- }
- } else {
- ajaxGetDictItems(dictCode, null).then((res) => {
- if (res.success) {
- let items = res.result
- for (let i = 0; i < items.length; i++) {
- if (deviceList[a].equipmentType == items[i].value) {
- deviceList[a].equipmentType = items[i].title
- }
- }
- }
- })
- }
- }
- }
- },
- initShiftList() {
- getAction(this.url.initShiftList).then((res) => {
- if (res.success) {
- this.shiftList = res.result
- }
- })
- },
- initShiftSubList(val) {
- //姣忔閲嶆柊閫夋嫨鐝埗鏃剁彮娆℃竻绌轰笖鏄剧ずplaceholder鍐呭
- this.queryParam.shiftSubId = undefined
- getAction(this.url.initShiftSubList, { shiftId: val }).then((res) => {
- if (res.success) {
- this.shiftSubList = res.result
- }
- })
- },
- initShiftSubListChange() {
- getAction(this.url.initShiftSubList, { shiftId: this.queryParam.shiftId }).then((res) => {
- if (res.success) {
- this.shiftSubList = res.result
- }
- })
- },
- exportExcel() {
- $('#EfficiencyShift').table2excel({
- exclude: '.noExl',
- name: 'Excel Document Name',
- filename: '鐝鍒╃敤鐜�',
- exclude_img: true,
- fileext: '.xls',
- exclude_links: true,
- exclude_inputs: true
- })
- },
- showIdentifying() {
- getAction(this.url.listByType, { type: 'bclyl' }).then(res => {
- if (res.success) {
- this.identifying = res.result
- }
- })
- },
- dateParamChange(v1, v2) {
- this.queryParam.startTime = v2[0]
- this.queryParam.endTime = v2[1]
- // 鐐瑰嚮鏃堕棿閫夋嫨鍣ㄧ殑娓呯┖鎸夐挳鏃朵細瑙﹀彂姝ゅ垽鏂�(鐐瑰嚮閲嶇疆鎸夐挳涓嶄細瑙﹀彂)锛屽疄鐜伴噸缃垪琛ㄥ姛鑳斤紝鍒囧疄鏀瑰彉鍒楄〃鏄剧ず鏁堟灉
- // if(!this.queryParam.startTime&&!this.queryParam.endTime)this.searchReset()
- },
- efficiencyOptionsOnChange(checkedList) {
- // let index = checkedList.indexOf('lyl')
- // if (index < 0) {
- // // this.$message.warn('涓嶈兘鍙栨秷鏌ヨ鍒╃敤鐜�')
- // this.$notification.warning({
- // message: '娑堟伅',
- // description: '涓嶈兘鍙栨秷鏌ヨ鐝鍒╃敤鐜�'
- // })
- // return false
- // }
- this.checkedList = checkedList
- },
- searchQuery() {
- if (this.queryParam.typeTree == '1') {
- this.queryParam.parentId = this.queryParamEquip.parentId
- this.queryParam.equipmentId = this.queryParamEquip.equipmentId
- } else {
- this.queryParam.parentId = this.queryParamPeople.parentId
- this.queryParam.equipmentId = ''
- }
- Object.keys(this.queryParams).forEach(item => {
- this.queryParam[item] = this.queryParams[item].join()
- // 姝ゅ涓轰繚璇佹帴鍙e弬鏁颁笉澶氫綑锛屽彲鐪佺暐
- if (this.queryParams[item].length === 0) delete this.queryParam[item]
- })
- this.loadData()
- // this.onClearSelected()
- },
- searchReset() {
- this.typeTree = this.queryParam.typeTree
- this.typeParent = this.queryParam.parentId
- this.typeEquipment = this.queryParam.equipmentId
- this.queryParam = {}
- this.dates = [moment().subtract('days', 7), moment().subtract('days', 1)]
- this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD')
- this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
- this.queryParam.typeTree = this.typeTree
- this.queryParam.parentId = this.typeParent
- this.queryParam.equipmentId = this.typeEquipment
- this.queryParams = {
- equipmentType: [],
- driveType: [],
- deviceLevel: [],
- deviceCategory: []
- }
- this.loadData()
- // this.onClearSelected()
- },
- loadData() {
- this.spinning = true
- this.tableHeads = []
- this.dataList = []
- getAction(this.url.list, this.queryParam).then(res => {
- if (res.success) {
- this.tableHeads = res.result.dates
- this.dataList = res.result.mdcEfficiencyList
- if (res.result.mdcEfficiencyList && !res.result.mdcEfficiencyList.length) {
- this.$notification.info({
- message: '娑堟伅',
- description: '鏆傛棤璇ョ被鍨嬫暟鎹�'
- })
- }
- this.checkSameData(this.dataList)
- this.checkSameData1(this.dataList)
- this.checkSameData2(this.dataList)
- this.combineCell()
- // this.initDeviceType(this.dataList)
- }
- }).finally(() => {
- this.spinning = false
- })
- },
- queryGroup() {
- getAction(this.url.queryEquipmentType).then(res => {
- if (res.success) {
- this.equipmentTypeList = res.result.map(item => {
- return {
- label: item.equipmentTypeName,
- value: item.equipmentTypeName
- }
- })
- } else {
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- })
- },
-
- /**
- * 璋冪敤鎺ュ彛鑾峰彇鎺у埗绯荤粺绫诲瀷
- */
- getDriveTypeByApi() {
- api.getDriveTypeApi().then((res) => {
- if (res.success) this.driveTypeList = res.result
- })
- },
-
- /**
- * 鍒嗚鲸鐜囨敼鍙樻椂鍚屾椂鏀瑰彉琛ㄦ牸楂樺害宸蹭繚璇侀椤典竴杩涘叆涓嶆嫋鍔ㄥ瀭鐩存粴鍔ㄦ潯鏃跺嵆鍙嫋鍔ㄨ〃鏍兼按骞虫粴鍔ㄦ潯
- */
- handleWindowResize() {
- const tableContainer = document.getElementById('EfficiencyShift') // 琛ㄦ牸瀹瑰櫒
- const clientHeight = document.documentElement.clientHeight || document.body.clientHeight // 娴忚鍣ㄥ彲瑙嗗尯鍩熼珮搴�
- const containerTopToClientTopHeight = tableContainer.getBoundingClientRect().top // 琛ㄦ牸瀹瑰櫒椤堕儴鍒版祻瑙堝櫒鍙鍖哄煙椤堕儴鐨勯棿璺�
- tableContainer.style.height = (clientHeight - containerTopToClientTopHeight - 32) + 'px'
- }
- }
- }
-</script>
-<style scoped>
- .table2 {
- width: 100%;
- height: 100%;
- overflow: auto;
- }
-
- .table2 thead tr th:first-child,
- .table tbody tr .tdgu {
- position: sticky;
- left: 0;
- z-index: 1;
- }
-
- .table tbody tr .wenzi {
- /*writing-mode: vertical-lr;*/
- /*text-orientation: upright;*/
- transform: rotate(360deg);
- writing-mode: vertical-lr;
- letter-spacing: 2px;
- }
-
- .table tbody tr .kaitou {
- z-index: 1;
- background-color: white;
- }
-
- .table tbody tr .tdgu1 {
- position: sticky;
- left: 50px;
- z-index: 2;
- }
-
- .table tbody tr .tdgu2 {
- position: sticky;
- left: 100px;
- z-index: 2;
- }
-
- .table tbody tr .tdgu3 {
- position: sticky;
- left: 150px;
- z-index: 2;
- }
-
- .table tbody tr .tdgu4 {
- position: sticky;
- left: 250px;
- z-index: 2;
- }
-
- .table tbody tr .tdgu5 {
- position: sticky;
- left: 412px;
- z-index: 2;
- }
-
- .table tbody tr .tdgu6 {
- position: sticky;
- left: 512px;
- z-index: 2;
- }
-
- .table2 thead tr .timeth,
- .table2 thead tr .thgu {
- position: sticky;
- top: 0;
- z-index: 3;
- }
-
- .table2 thead .gudingth th {
- position: sticky;
- top: 32px;
- z-index: 2;
- }
-
- .table2 thead .equipname .name {
- z-index: 3;
- }
-
- .table2 thead .equipname .dong1 {
- z-index: 4;
- left: 0;
- }
-
- .table2 thead .equipname .dong2 {
- z-index: 5;
- left: 50px;
- }
-
- .table2 thead .equipname .dong3 {
- z-index: 5;
- left: 100px;
- }
-
- .table2 thead .equipname .dong4 {
- z-index: 5;
- left: 150px;
- }
-
- .table2 thead .equipname .dong5 {
- z-index: 5;
- left: 250px;
- }
-
- .table2 thead .equipname .dong6 {
- z-index: 5;
- left: 412px;
- }
-
- .table2 thead .equipname .dong7 {
- z-index: 6;
- left: 512px;
- }
-
- #EfficiencyShift {
- overflow: hidden;
- }
-
- .identifyingclass {
- width: 55px;
- height: 15px;
- display: inline-block
- }
-
- .dataContent {
- white-space: nowrap;
- /*margin: 0;*/
- /*border: none;*/
- border-collapse: separate;
- border-spacing: 0;
- /*table-layout: fixed;*/
- border: 1px solid #ccc;
- /*border: 1px solid #ccc;*/
- width: 100%;
- /*height: 100%;*/
- /*overflow: hidden;*/
- /*overflow-y: auto;*/
- text-align: center;
- }
-
- .dataContent .thead th {
- background-color: #fafafa;
- text-align: center;
- height: 30px;
- padding: 5px;
- }
-
- .dataContent .mathData td {
- padding: 10px;
- }
-
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigForm.vue b/src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigForm.vue
deleted file mode 100644
index 36da157..0000000
--- a/src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigForm.vue
+++ /dev/null
@@ -1,208 +0,0 @@
-<template>
- <a-spin :spinning="confirmLoading">
- <j-form-container :disabled="formDisabled">
- <a-form-model
- ref="form"
- :model="model"
- :rules="validatorRules"
- slot="detail"
- >
- <a-row>
- <a-col :span="24">
- <a-form-model-item
- label="鎺у埗绯荤粺绫诲瀷"
- :labelCol="labelCol"
- :wrapperCol="wrapperCol"
- prop="controlSystemType"
- >
- <a-auto-complete
- v-model="model.controlSystemType"
- :data-source="driveTypeList"
- placeholder="璇烽�夋嫨鎺у埗绯荤粺绫诲瀷"
- :filter-option="filterOption"
- :allowClear="true"
- />
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item
- label="涓枃鍚嶇О"
- :labelCol="labelCol"
- :wrapperCol="wrapperCol"
- prop="chineseName"
- >
- <a-input
- v-model="model.chineseName"
- placeholder="璇疯緭鍏ヤ腑鏂囧悕绉�"
- ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item
- label="鑻辨枃鍚嶇О"
- :labelCol="labelCol"
- :wrapperCol="wrapperCol"
- prop="englishName"
- >
- <a-input
- v-model="model.englishName"
- placeholder="璇疯緭鍏ヨ嫳鏂囧悕绉�"
- ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item
- label="搴忓彿"
- :labelCol="labelCol"
- :wrapperCol="wrapperCol"
- prop="sortNo"
- >
- <a-input-number
- v-model="model.sortNo"
- placeholder="璇疯緭鍏ュ簭鍙�"
- style="width: 100%"
- />
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item
- label="鏄剧ず鏍囧織"
- :labelCol="labelCol"
- :wrapperCol="wrapperCol"
- prop="showFlag"
- >
- <j-switch v-model="model.showFlag"></j-switch>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item
- label="宸ヤ綔鏇茬嚎鏍囧織"
- :labelCol="labelCol"
- :wrapperCol="wrapperCol"
- prop="curveGenerationFlags"
- >
- <j-switch v-model="model.curveGenerationFlags"></j-switch>
- </a-form-model-item>
- </a-col>
- </a-row>
- </a-form-model>
- </j-form-container>
- </a-spin>
-</template>
-
-<script>
-
-import { httpAction, getAction } from '@/api/manage'
-
-export default {
- name: 'MdcDriveTypeParamConfigForm',
- components: {
- },
- props: {
- //琛ㄥ崟绂佺敤
- disabled: {
- type: Boolean,
- default: false,
- required: false
- },
- driveTypeList:{
- type:Object
- }
- },
- data() {
- return {
- model: {
- showFlag: "Y",
- curveGenerationFlags:'N'
- },
- labelCol: {
- xs: { span: 24 },
- sm: { span: 5 },
- },
- wrapperCol: {
- xs: { span: 24 },
- sm: { span: 16 },
- },
- confirmLoading: false,
- validatorRules: {
- controlSystemType: [
- { required: true, message: '璇疯緭鍏ユ帶鍒剁郴缁熺被鍨�!' },
- ],
- chineseName: [
- { required: true, message: '璇疯緭鍏ヤ腑鏂囧悕绉�!' },
- ],
- englishName: [
- { required: true, message: '璇疯緭鍏ヨ嫳鏂囧悕绉�!' },
- // { pattern: /^.{2,24}$/, message: '璇疯緭鍏�2鍒�24浣嶄换鎰忓瓧绗�!' ,trigger:'blur'},
- ],
- showFlag: [
- { required: true, message: '璇疯緭鍏ユ樉绀烘爣蹇�!' },
- ],
- curveGenerationFlags: [
- { required: true, message: '璇烽�夋嫨宸ヤ綔鏇茬嚎鏍囧織!' },
- ],
- },
- url: {
- add: "/mdc/mdcDriveTypeParamConfig/add",
- edit: "/mdc/mdcDriveTypeParamConfig/edit",
- queryById: "/mdc/mdcDriveTypeParamConfig/queryById"
- }
- }
- },
- computed: {
- formDisabled() {
- return this.disabled
- },
- },
- created() {
- //澶囦唤model鍘熷鍊�
- this.modelDefault = JSON.parse(JSON.stringify(this.model));
- },
- methods: {
- add() {
- this.edit(this.modelDefault);
- },
- edit(record) {
- this.model = Object.assign({}, record);
- this.visible = true;
- },
- submitForm() {
- const that = this;
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.$refs.form.validate(valid => {
- if (valid) {
- that.confirmLoading = true;
- let httpurl = '';
- let method = '';
- if (!this.model.id) {
- httpurl += this.url.add;
- method = 'post';
- } else {
- httpurl += this.url.edit;
- method = 'put';
- }
- httpAction(httpurl, this.model, method).then((res) => {
- if (res.success) {
- // that.$message.success(res.message);
- that.$notification.success({
- message:'娑堟伅',
- description:res.message
- });
- that.$emit('ok');
- } else {
- // that.$message.warning(res.message);
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- that.confirmLoading = false;
- })
- }
-
- })
- },
- }
-}
-</script>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigModal.vue b/src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigModal.vue
deleted file mode 100644
index 8a27522..0000000
--- a/src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigModal.vue
+++ /dev/null
@@ -1,61 +0,0 @@
-<template>
- <j-modal
- :title="title"
- :width="width"
- :visible="visible"
- switchFullscreen
- @ok="handleOk"
- :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
- @cancel="handleCancel"
- cancelText="鍏抽棴">
- <mdc-drive-type-param-config-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" :driveTypeList="driveTypeList"></mdc-drive-type-param-config-form>
- </j-modal>
-</template>
-
-<script>
-
- import MdcDriveTypeParamConfigForm from './MdcDriveTypeParamConfigForm'
- export default {
- name: 'MdcDriveTypeParamConfigModal',
- components: {
- MdcDriveTypeParamConfigForm
- },
- props:['driveTypeList'],
- data () {
- return {
- title:'',
- width:800,
- visible: false,
- disableSubmit: false
- }
- },
- methods: {
- add () {
- this.visible=true
- this.$nextTick(()=>{
- this.$refs.realForm.add();
- })
- },
- edit (record) {
- this.visible=true
- this.$nextTick(()=>{
- this.$refs.realForm.edit(record);
- })
- },
- close () {
- this.$emit('close');
- this.visible = false;
- },
- handleOk () {
- this.$refs.realForm.submitForm();
- },
- submitCallback(){
- this.$emit('ok');
- this.visible = false;
- },
- handleCancel () {
- this.close()
- }
- }
- }
-</script>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/mdcUtilizationRate/MdcUtilizationRateModel.vue b/src/views/mdc/base/modules/mdcUtilizationRate/MdcUtilizationRateModel.vue
deleted file mode 100644
index a9059be..0000000
--- a/src/views/mdc/base/modules/mdcUtilizationRate/MdcUtilizationRateModel.vue
+++ /dev/null
@@ -1,204 +0,0 @@
-<template>
- <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading"
- :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴">
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="绫诲埆">
- <a-input :disabled="true" v-decorator="['rateParameterCategory', validatorRules.rateParameterCategory]"/>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="绛夌骇" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="true" v-decorator="['rateParameterLevel', validatorRules.rateParameterLevel]"/>
- </a-form-item>
- </a-col>
- </a-row>
-
- <a-row :gutter="24">
- <a-col :span="24">
- <a-form-item label="鏈�灏忚寖鍥达紙鍗曚綅锛�%锛�" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="璇疯緭鍏ユ渶灏忚寖鍥�"
- v-decorator="['minimumRange',validatorRules.minimumRange]"/>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="24">
- <a-form-item label="鏈�澶ц寖鍥达紙鍗曚綅锛�%锛�" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="璇疯緭鍏ユ渶澶ц寖鍥�"
- v-decorator="['maximumRange',validatorRules.maximumRange]"/>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="24">
- <a-form-item label="棰滆壊" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input type="color" v-decorator="['rateParameterColor',validatorRules.rateParameterColor]"></a-input>
- </a-form-item>
- </a-col>
- </a-row>
- </a-form>
- </a-spin>
- </a-modal>
-</template>
-
-<script>
- import pick from 'lodash.pick'
- import {
- getAction,
- postAction,
- requestPut
- } from '@/api/manage'
- import {
- duplicateCheck
- } from '@/api/api'
-
- export default {
- name: 'MdcUtilizationRateModel',
- props: {},
- data() {
- return {
- title: '',
- visible: false,
- show: false,
- model: {},
- checked: false,
- labelCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 6
- }
- },
- wrapperCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 18
- }
- },
- confirmLoading: false,
- form: this.$form.createForm(this),
- validatorRules: {},
- url: {
- edit: '/mdc/MdcUtilizationRate/editUtilization'
- },
- disableSubmit: true
- }
- },
- created() {
- },
- methods: {
- //绾ц仈妗唎nChange浜嬩欢
- onChange(value) {
-
- },
- edit(record) {
- this.form.resetFields()
- this.model = Object.assign({}, record)
- this.visible = true
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'rateParameterCategory', 'rateParameterLevel', 'minimumRange', 'maximumRange', 'rateParameterColor'))
- })
- },
- close() {
- this.$emit('close')
- this.visible = false
- this.show = false
- },
- handleOk() {
- const that = this
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.form.validateFields((err, values) => {
- if (!err) {
- that.confirmLoading = true
- let formData = Object.assign(this.model, values)
- requestPut(this.url.edit, formData, {
- id: this.model.id
- }).then((res) => {
- if (res.success) {
- // that.$message.success("淇濆瓨鎴愬姛")
- that.$notification.success({
- message: '娑堟伅',
- description: '淇濆瓨鎴愬姛'
- })
- that.$emit('ok', res.result)
- } else {
- // that.$message.warning(res.message)
- that.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- that.confirmLoading = false
- that.close()
- })
- }
- })
- },
- handleCancel() {
- this.close()
- },
- loadCascade() {
- getAction(this.url.loadCascadeData).then((res) => {
- if (res.success) {
- this.partCategoryCascade = res.result
- }
- })
- },
- onCascadeChange(value, selectedOptions) {
- this.cascadeDefaultValue = [...value]
- },
- filter(inputValue, path) {
- return path.some(option => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1)
- },
- //楠岃瘉 缂栫爜
- validateNum(rule, value, callback) {
- var params = {
- tableName: 'lxmes_base_part',
- fieldName: 'num',
- fieldVal: value,
- dataId: this.model.id,
- //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
- delFlag: 'true'
- }
- duplicateCheck(params).then((res) => {
- if (res.success) {
- callback()
- } else {
- callback('瀛樿揣缂栫爜宸插瓨鍦�!')
- }
- })
- },
- checkboxChange(e) {
- this.checked = e.target.checked
- }
- }
- }
-</script>
-
-<style scoped>
- .ant-btn {
- padding: 0 10px;
- margin-left: 3px;
- }
-
- .ant-form-item-control {
- line-height: 0px;
- }
-
- /** 涓昏〃鍗曡闂磋窛 */
- .ant-form .ant-form-item {
- margin-bottom: 10px;
- }
-
- /** Tab椤甸潰琛岄棿璺� */
- .ant-tabs-content .ant-form-item {
- margin-bottom: 0px;
- }
-</style>
diff --git a/src/views/mdc/base/modules/shift/ShiftInfo.vue b/src/views/mdc/base/modules/shift/ShiftInfo.vue
deleted file mode 100644
index e6d104e..0000000
--- a/src/views/mdc/base/modules/shift/ShiftInfo.vue
+++ /dev/null
@@ -1,235 +0,0 @@
-<template>
- <div class="shift_info">
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator">
- <a-button type="primary" v-if="Object.keys(shiftSystemRow).length>0" @click="handleAdd" icon="plus">閰嶇疆</a-button>
- </div>
- <!-- table鍖哄煙-begin -->
- <div style="width: 100%;flex: 1;overflow: auto">
- <a-table ref="table" bordered size="middle" rowKey="id" :columns="columns"
- :dataSource="dataSource" :pagination="false" :loading="loading">
- <span
- slot="shiftSubStatus"
- slot-scope="text, record"
- >
- <span v-if="text == 0" style="color:red;">鍋滅敤</span>
- <span v-if="text == 1" style="color:green;">鍚敤</span>
- </span>
- <span
- slot="isDaySpan"
- slot-scope="text, record"
- >
- <span v-if="text == 'true'">鏄�</span>
- <span v-if="text == 'false'">鍚�</span>
- </span>
- <span
- slot="action"
- slot-scope="text, record"
- >
- <a-dropdown>
- <a class="ant-dropdown-link">
- <a-icon type="down"/>
- </a>
- <a-menu slot="overlay">
- <a-menu-item v-if="record.shiftSubStatus == 1">
- <a key="1" @click="handleEdit(record)">缂栬緫</a>
- </a-menu-item>
- <a-menu-item v-if="record.shiftSubStatus == 0">
- <a key="2" @click="handleStatus(record.id,1)">鍚敤</a>
- </a-menu-item>
- <a-menu-item v-if="record.shiftSubStatus == 1">
- <a key="3" @click="handleStatus(record.id,0)">鍋滅敤</a>
- </a-menu-item>
- <a-menu-item >
- <a key="4" @click="handleDelete(record.id)">鍒犻櫎</a>
- </a-menu-item>
- </a-menu>
- </a-dropdown>
- </span>
- </a-table>
- </div>
-
- <shift-info-model ref="modalForm" @ok="modalFormOk"></shift-info-model>
- </div>
-</template>
-
-<script>
- import {
- requestPut, putAction, deleteAction
- } from '@/api/manage'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
- import ShiftInfoModel from './ShiftInfoModel'
-
- export default {
- name: 'ShiftInfo',
- mixins: [JeecgListMixin],
- components: {
- ShiftInfoModel
- },
- props: {
- shiftSystemRow: {
- type: Object,
- required: true,
- default: {}
- }
- },
- data() {
- return {
- statusName: '',
- disabled: true,
- disableMixinCreated: true,
- url: {
- list: '/mdc/mdcShiftSub/queryPageList',
- changeStatus: '/mdc/mdcShiftSub/updateSubStatusById',
- deleteBatch: '/mdc/mdcShiftSub/deleteMdcShiftSub'
- },
- columns: [
- {
- title: '鐝',
- align: 'center',
- dataIndex: 'shiftSubName'
- },
- {
- title: '寮�濮嬫椂闂�',
- align: 'center',
- dataIndex: 'startDate'
- },
- {
- title: '缁撴潫鏃堕棿',
- align: 'center',
- dataIndex: 'endDate'
- },
- {
- title: '鏄惁璺ㄥぉ',
- align: 'center',
- dataIndex: 'isDaySpan',
- scopedSlots: { customRender: 'isDaySpan' }
- },
- {
- title: '寮�濮嬩紤鎭椂闂�',
- align: 'center',
- dataIndex: 'sleepStartDate'
- },
- {
- title: '缁撴潫浼戞伅鏃堕棿',
- align: 'center',
- dataIndex: 'sleepEndDate'
- },
- {
- title: '鐘舵��',
- align: 'center',
- dataIndex: 'shiftSubStatus',
- scopedSlots: { customRender: 'shiftSubStatus' }
- },
- {
- title: '鎿嶄綔',
- align: 'center',
- dataIndex: 'action',
- scopedSlots: { customRender: 'action' }
- }
- ]
- }
- },
- methods: {
- handleAdd() {
- this.$refs.modalForm.add(this.shiftSystemRow)
- this.$refs.modalForm.title = '鐝閰嶇疆'
- this.$refs.modalForm.disableSubmit = false
- },
- handleEdit(record) {
- record.shiftId = this.shiftSystemRow.id
- record.shiftName = this.shiftSystemRow.shiftName
- this.$refs.modalForm.edit(record)
- this.$refs.modalForm.title = '鐝閰嶇疆'
- this.$refs.modalForm.disableSubmit = true
- },
- handleDelete: function(record){
- if(!this.url.deleteBatch){
- this.$message.error("璇疯缃畊rl.delete灞炴��!")
- return
- }
- var that = this;
- deleteAction(that.url.deleteBatch, {id: record}).then((res) => {
- if (res.success) {
- // that.$message.success(res.message);
- that.$notification.success({
- message:'娑堟伅',
- description:res.message
- });
- that.loadData();
- } else {
- // that.$message.warning(res.message);
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- });
- },
- handleStatus(id, status) {
- let _this = this
- putAction(this.url.changeStatus, { id: id, status: status }).then((res) => {
- if (res.success) {
- // _this.$message.success('鎿嶄綔鎴愬姛锛�')
- _this.$notification.success({
- message:'娑堟伅',
- description:"鎿嶄綔鎴愬姛"
- });
- _this.loadData()
- } else {
- // _this.$message.warning('鎿嶄綔澶辫触锛�')
- _this.$notification.warning({
- message:'娑堟伅',
- description:"鎿嶄綔澶辫触"
- });
- }
- })
- },
- },
- created() {
- },
- watch: {
- shiftSystemRow(val) { // 鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
- this.queryParam.shiftId = val.id
- this.loadData()
- }
- }
-
- }
-</script>
-
-<style lang="less" scoped>
- .shift_info{
- overflow: hidden;
- display: flex;
- flex-direction: column;
- }
-
- @media screen and (min-width: 1920px){
- .shift_info{
- height: 748px!important;
- }
- }
- @media screen and (min-width: 1680px) and (max-width: 1920px){
- .shift_info{
- height: 748px!important;
- }
- }
- @media screen and (min-width: 1400px) and (max-width: 1680px){
- .shift_info{
- height: 600px!important;
- }
- }
- @media screen and (min-width: 1280px) and (max-width: 1400px){
- .shift_info{
- height: 501px!important;
- }
- }
- @media screen and (max-width: 1280px){
- .shift_info{
- height: 501px!important;
- }
- }
-</style>
diff --git a/src/views/mdc/base/modules/shift/ShiftInfoModel.vue b/src/views/mdc/base/modules/shift/ShiftInfoModel.vue
deleted file mode 100644
index f91c642..0000000
--- a/src/views/mdc/base/modules/shift/ShiftInfoModel.vue
+++ /dev/null
@@ -1,400 +0,0 @@
-<template>
- <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading"
- @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴">
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="鐝埗鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="true" :readOnly="true" allow-clear placeholder="璇疯緭鍏ョ彮鍒跺悕绉�"
- v-decorator="['shiftName',validatorRules.shiftName]"/>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="鐝鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input allow-clear placeholder="璇疯緭鍏ョ彮娆″悕绉�" v-decorator="['shiftSubName',validatorRules.shiftSubName]"/>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="寮�濮嬫椂闂�" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-time-picker :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear
- v-decorator="['startDate',validatorRules.startDate]"/>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="缁撴潫鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-time-picker :disabled="disableSubmit" :readOnly="disableSubmit"
- v-decorator="['endDate',validatorRules.endDate]"/>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="寮�濮嬩紤鎭椂闂�" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-time-picker :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear
- v-decorator="['sleepStartDate',validatorRules.sleepStartDate]"/>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="缁撴潫浼戞伅鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-time-picker :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear
- v-decorator="['sleepEndDate',validatorRules.sleepEndDate]"/>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="鏄惁璺ㄥぉ" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-switch v-model="isDaySpan" checked-children="鏄�" un-checked-children="鍚�"/>
- </a-form-item>
- </a-col>
- </a-row>
-
- </a-form>
- </a-spin>
- </a-modal>
-</template>
-
-<script>
- import moment from 'moment'
- import pick from 'lodash.pick'
- import {
- getAction,
- postAction,
- requestPut
- } from '@/api/manage'
- import {
- duplicateCheck
- } from '@/api/api'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
-
- export default {
- name: 'ShiftInfoModel',
- mixins: [JeecgListMixin],
- components: {},
- props: {},
- data() {
- return {
- title: '',
- isDaySpan: false,
- visible: false,
- show: false,
- model: {},
- checked: false,
- labelCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 6
- }
- },
- wrapperCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 18
- }
- },
- confirmLoading: false,
- form: this.$form.createForm(this),
- validatorRules: {
- shiftSubName: {
- rules: [
- {
- required: true,
- message: '璇疯緭鍏ョ彮娆″悕绉�'
- }
- ]
- },
- startDate: {
- rules: [
- {
- required: true,
- message: '璇烽�夋嫨寮�濮嬫椂闂�'
- }
- ]
- },
- endDate: {
- rules: [
- {
- required: true,
- message: '璇烽�夋嫨缁撴潫鏃堕棿'
- }
- ]
- }
- },
- url: {
- add: '/mdc/mdcShiftSub/addShiftSub',
- edit: '/mdc/mdcShiftSub/editMdcShiftSub',
- list: '/mdc/mdcMdcShift/queryPageList'
- },
- disableSubmit: true
- }
- },
- created() {
- // this.checkshiftSuName();
- },
-
- methods: {
- //鑷畾涔夋牎楠屽嚱鏁帮紝瑕佹眰鍚嶅瓧涓嶈兘閲嶅 value鏄〃鍗曠殑鍊硷紝callback鏄洖璋冨嚱鏁� 蹇呴』璋冪敤鎵嶅彲楠岃瘉
- checkshiftSuName(rule, value, callback) {
- if (!value) {
- alert('涓嶈兘涓虹┖锛�')
- return
- }
- // debugger
- // let NameSelf = value;
- this.loadData()
- // console.log(dataSource);
- callback()
- },
- loadData() {
- if (!this.url.list) {
- this.$message.error('璇疯缃畊rl.list灞炴��!')
- return
- }
- //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
- // if (arg === 1) {
- // this.ipagination.current = 1;
- // }
- var params = this.getQueryParams()//鏌ヨ鏉′欢
- //
- // if(!params){
- // return false;
- // }
-
- // this.loading = true;
- getAction(this.url.list, params).then((res) => {
- if (res.success) {
- // console.log(res)
- //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- this.dataSource = res.result.records || res.result
- // if(res.result.total)
- // {
- // this.ipagination.total = res.result.total;
- // }else{
- // this.ipagination.total = 0;
- // }
- //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- } else {
- // this.$message.warning(res.message)
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- this.loading = false
- })
- },
- add(record) {
- let _this = this
- this.visible = true
- this.form.resetFields()
- this.model = { shiftId: record.id, shiftName: record.shiftName }
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'shiftName'))
- this.isDaySpan = false
- })
- },
- edit(record) {
- this.form.resetFields()
- this.model = Object.assign({}, record)
- this.visible = true
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'shiftName', 'shiftSubName', 'startDate', 'endDate', 'sleepStartDate', 'sleepEndDate'))
- this.form.setFieldsValue({
- startDate: moment(this.model.startDate, 'HH:mm:ss'),
- endDate: moment(this.model.endDate, 'HH:mm:ss')
- })
- if (this.model.sleepStartDate) {
- this.form.setFieldsValue({
- sleepStartDate: moment(this.model.sleepStartDate, 'HH:mm:ss')
- })
- }
- if (this.model.sleepStartDate) {
- this.form.setFieldsValue({
- sleepEndDate: moment(this.model.sleepEndDate, 'HH:mm:ss')
- })
- }
- if (record.isDaySpan == 'true') {
- this.isDaySpan = true
- } else {
- this.isDaySpan = false
- }
- })
- },
- close() {
- this.$emit('close')
- this.visible = false
- this.show = false
- },
- handleOk() {
- const that = this
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.form.validateFields((err, values) => {
- if (!err) {
- // debugger
- that.confirmLoading = true
- let formData = Object.assign(this.model, values)
- formData.isDaySpan = that.isDaySpan
- console.log(formData.isDaySpan)
- formData.startDate = moment(formData.startDate).format('HH:mm:ss')
- formData.endDate = moment(formData.endDate).format('HH:mm:ss')
- if (formData.sleepStartDate) formData.sleepStartDate = moment(formData.sleepStartDate).format('HH:mm:ss')
- if (formData.sleepEndDate) formData.sleepEndDate = moment(formData.sleepEndDate).format('HH:mm:ss')
- if (formData.isDaySpan == false) {
- let startTimeOne = formData.startDate.replace(/:/g, '')
- let endTimeOne = formData.endDate.replace(/:/g, '')
- if (startTimeOne > endTimeOne) {
- // that.$message.warning("闈炶法澶╃彮娆$粨鏉熸椂闂翠笉鑳藉皬浜庣瓑浜庡紑濮嬫椂闂达紒")
- that.$notification.warning({
- message: '娑堟伅',
- description: '闈炶法澶╃彮娆$粨鏉熸椂闂翠笉鑳藉皬浜庣瓑浜庡紑濮嬫椂闂达紒'
- })
- that.confirmLoading = false
- that.close()
- } else {
- formData.shiftSubStatus = 1
- let obj
- if (!this.model.id) {
- obj = postAction(this.url.add, formData)
- } else {
- obj = requestPut(this.url.edit, formData, {
- id: this.model.id
- })
- }
- obj.then((res) => {
- if (res.success) {
- // that.$message.success("淇濆瓨鎴愬姛")
- that.$notification.success({
- message: '娑堟伅',
- description: '淇濆瓨鎴愬姛'
- })
- that.$emit('ok', res.result)
- } else {
- // that.$message.warning(res.message)
- that.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- that.confirmLoading = false
- that.close()
- })
- }
- } else {
- formData.shiftSubStatus = 1
- let obj
- if (!this.model.id) {
- obj = postAction(this.url.add, formData)
- } else {
- obj = requestPut(this.url.edit, formData, {
- id: this.model.id
- })
- }
- obj.then((res) => {
- if (res.success) {
- // that.$message.success
- that.$notification.success({
- message: '娑堟伅',
- description: '淇濆瓨鎴愬姛'
- })
- that.$emit('ok', res.result)
- } else {
- // that.$message.warning(res.message)
- that.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- that.confirmLoading = false
- that.close()
- })
- }
-
- }
- })
- },
- handleCancel() {
- this.close()
- },
- loadCascade() {
- getAction(this.url.loadCascadeData).then((res) => {
- if (res.success) {
- this.partCategoryCascade = res.result
- }
- })
- },
- //楠岃瘉 缂栫爜
- validateNum(rule, value, callback) {
- var params = {
- tableName: 'lxmes_base_part',
- fieldName: 'num',
- fieldVal: value,
- dataId: this.model.id,
- //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
- delFlag: 'true'
- }
- duplicateCheck(params).then((res) => {
- if (res.success) {
- callback()
- } else {
- callback('瀛樿揣缂栫爜宸插瓨鍦�!')
- }
- })
- },
- checkboxChange(e) {
- this.checked = e.target.checked
- }
- //楠岃瘉 鍚嶇О
- // validateName(rule, value, callback) {
- // var params = {
- // tableName: 'mes_base_part',
- // fieldName: 'name',
- // fieldVal: value,
- // dataId: this.model.id,
- // //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
- // delFlag: 'true',
- // };
- // duplicateCheck(params).then((res) => {
- // if (res.success) {
- // callback();
- // } else {
- // callback("浜у搧鍚嶇О宸插瓨鍦�!");
- // }
- // })
- // },
-
- }
- }
-</script>
-
-<style scoped>
- .ant-btn {
- padding: 0 10px;
- margin-left: 3px;
- }
-
- .ant-form-item-control {
- line-height: 0px;
- }
-
- /** 涓昏〃鍗曡闂磋窛 */
- .ant-form .ant-form-item {
- margin-bottom: 10px;
- }
-
- /** Tab椤甸潰琛岄棿璺� */
- .ant-tabs-content .ant-form-item {
- margin-bottom: 0px;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/shift/ShiftSystem.vue b/src/views/mdc/base/modules/shift/ShiftSystem.vue
deleted file mode 100644
index 7197ad4..0000000
--- a/src/views/mdc/base/modules/shift/ShiftSystem.vue
+++ /dev/null
@@ -1,229 +0,0 @@
-<template>
- <div class="shift_system">
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator">
- <a-button type="primary" @click="handleAdd" icon="plus">鏂板</a-button>
- </div>
- <!-- table鍖哄煙-begin -->
- <div style="flex: 1;overflow: auto">
- <a-table ref="table" bordered size="middle" rowKey="id" :columns="columns"
- :dataSource="dataSource" :pagination="false" :loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:'radio'}">
- <span
- slot="shiftStatus"
- slot-scope="text, record"
- >
- <span v-if="text == 0" style="color:red;">鍋滅敤</span>
- <span v-if="text == 1" style="color:green;">鍚敤</span>
- </span>
- <span
- slot="defaultShift"
- slot-scope="text, record"
- >
- <span v-if="text == 'true'">鏄�</span>
- <span v-else-if="text == 'false'" >鍚�</span>
- <span v-else-if="text == null">鍚�</span>
- </span>
- <span
- slot="action"
- slot-scope="text, record"
- >
- <a-dropdown>
- <a class="ant-dropdown-link">
- <a-icon type="down"/>
- </a>
- <a-menu slot="overlay">
- <a-menu-item v-if="record.shiftStatus == 1">
- <a key="0" @click="handleDefault(record)">璁剧疆涓洪粯璁�</a>
- </a-menu-item>
- <a-menu-item v-if="record.shiftStatus == 1">
- <a key="1" @click="handleEdit(record)">缂栬緫</a>
- </a-menu-item>
- <a-menu-item v-if="record.shiftStatus == 0">
- <a key="2" @click="handleStatus(record.id,1)">鍚敤</a>
- </a-menu-item>
- <a-menu-item v-if="record.shiftStatus == 1">
- <a key="3" @click="handleStatus(record.id,0)">鍋滅敤</a>
- </a-menu-item>
- <a-menu-item >
- <a key="4" @click="handleDelete(record.id)">鍒犻櫎</a>
- </a-menu-item>
- </a-menu>
- </a-dropdown>
- </span>
- </a-table>
- </div>
-
- <shift-system-model ref="modalForm" @ok="modalFormOk"></shift-system-model>
- </div>
-</template>
-
-<script>
- import qs from 'qs'
- import {
- requestPut, putAction, deleteAction,postAction
- } from '@/api/manage'
- import {
- JeecgListMixin
- } from '@/mixins/JeecgListMixin'
- import ShiftSystemModel from './ShiftSystemModel'
-
- export default {
- name: 'ShiftSystem',
- mixins: [JeecgListMixin],
- components: {
- ShiftSystemModel
- },
- data() {
- return {
- statusName: '',
- disabled: true,
- disableMixinCreated: false,
- url: {
- list: '/mdc/mdcMdcShift/queryPageList',
- changeStatus: '/mdc/mdcMdcShift/changeStatus',
- deleteBatch:'/mdc/mdcMdcShift/deleteShift',
- changeDefaultShift: '/mdc/mdcMdcShift/changeDefaultShift'
- },
- columns: [
- {
- title: '鐝埗',
- align: 'center',
- dataIndex: 'shiftName'
- },
- {
- title: '鐘舵��',
- align: 'center',
- dataIndex: 'shiftStatus',
- scopedSlots: { customRender: 'shiftStatus' }
- },
- {
- title: '榛樿鐝埗',
- align: 'center',
- dataIndex: 'defaultShift',
- scopedSlots: { customRender: 'defaultShift' }
- },
- {
- title: '鎿嶄綔',
- align: 'center',
- dataIndex: 'action',
- scopedSlots: { customRender: 'action' }
- }
- ]
- }
- },
- methods: {
- handleStatus(id, status) {
- let _this = this
- putAction(this.url.changeStatus, { id: id, status: status }).then((res) => {
- if (res.success) {
- _this.$notification.success({
- message:'娑堟伅',
- description:res.message
- })
- _this.loadData()
- } else {
- _this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- })
- },
- handleAdd() {
- this.$refs.modalForm.add()
- this.$refs.modalForm.title = '鐝埗閰嶇疆'
- this.$refs.modalForm.disableSubmit = false
- },
- handleDefault:function(record){
- postAction(this.url.changeDefaultShift,qs.stringify({id:record.id})).then((res) =>{
- if(res.success){
- // this.$message.success(res.message);
- this.$notification.success({
- message:'娑堟伅',
- description:res.message
- });
- this.loadData()
- }else{
- // this.$message.success(res.message);
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- })
- },
- handleDelete: function(record){
- if(!this.url.deleteBatch){
- this.$message.error("璇疯缃畊rl.delete灞炴��!")
- return
- }
- var that = this;
- deleteAction(that.url.deleteBatch, {id: record}).then((res) => {
- if (res.success) {
- // that.$message.success(res.message);
- that.$notification.success({
- message:'娑堟伅',
- description:res.message
- });
- that.loadData();
- } else {
- // that.$message.warning(res.message);
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- });
- },
- handleEdit(record) {
- this.$refs.modalForm.edit(record)
- this.$refs.modalForm.title = '鐝埗閰嶇疆'
- this.$refs.modalForm.disableSubmit = true
-
- },
- onSelectChange(selectedRowKeys, selectionRows) {
- this.selectedRowKeys = selectedRowKeys;
- this.selectionRows = selectionRows;
- this.$emit('selectionShiftRow', this.selectionRows[0])
- },
- },
- created() {
- }
-
- }
-</script>
-
-<style lang="less" scoped>
- .shift_system{
- overflow: auto;
- display: flex;
- flex-direction: column;
- }
-
- @media screen and (min-width: 1920px){
- .shift_system{
- height: 748px!important;
- }
- }
- @media screen and (min-width: 1680px) and (max-width: 1920px){
- .shift_system{
- height: 748px!important;
- }
- }
- @media screen and (min-width: 1400px) and (max-width: 1680px){
- .shift_system{
- height: 600px!important;
- }
- }
- @media screen and (min-width: 1280px) and (max-width: 1400px){
- .shift_system{
- height: 501px!important;
- }
- }
- @media screen and (max-width: 1280px){
- .shift_system{
- height: 501px!important;
- }
- }
-</style>
diff --git a/src/views/mdc/base/modules/shift/ShiftSystemModel.vue b/src/views/mdc/base/modules/shift/ShiftSystemModel.vue
deleted file mode 100644
index 4a51038..0000000
--- a/src/views/mdc/base/modules/shift/ShiftSystemModel.vue
+++ /dev/null
@@ -1,218 +0,0 @@
-<template>
- <a-modal :title="title" :width="500" :visible="visible" :confirmLoading="confirmLoading"
- @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴">
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
- <a-row :gutter="24">
- <a-col :span="24">
- <a-form-item label="鐝埗鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input allow-clear placeholder="璇疯緭鍏ョ彮鍒跺悕绉�" v-decorator="['shiftName',validatorRules.shiftName]"/>
- </a-form-item>
-
- </a-col>
- <!--<a-col :span="12">-->
- <!--<a-form-item label="鏄惁榛樿鐝埗" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<a-switch v-model="defaultShift" checked-children="鏄�" un-checked-children="鍚�"/>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
-
- </a-row>
- </a-form>
- </a-spin>
- </a-modal>
-</template>
-
-<script>
- import pick from 'lodash.pick'
- import {
- getAction,
- postAction,
- requestPut
- } from '@/api/manage'
- import {
- duplicateCheck
- } from '@/api/api'
-
- export default {
- name: 'ShiftSystemModel',
- components: {},
- props: {},
- data() {
- return {
- title: '',
- visible: false,
- show: false,
- defaultShift:false,
- model: {},
- checked: false,
- labelCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 4
- }
- },
- wrapperCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 20
- }
- },
- confirmLoading: false,
- form: this.$form.createForm(this),
- validatorRules: {},
- url: {
- add: '/mdc/mdcMdcShift/addShift',
- edit: '/mdc/mdcMdcShift/editShift'
- },
- disableSubmit: true
- }
- },
- created() {
- },
-
- methods: {
- add(node) {
- let _this = this
- this.visible = true
- this.form.resetFields()
- this.model = {}
- /* this.$nextTick(() => {
- this.defaultShift = false
- })*/
- },
- edit(record) {
- this.form.resetFields()
- this.model = Object.assign({}, record)
- this.visible = true
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'shiftName'))
- // if (record.defaultShift == 'true') {
- // this.defaultShift = true
- // } else {
- // this.defaultShift = false
- // }
- })
- },
- close() {
- this.$emit('close')
- this.visible = false
- this.show = false
- },
- handleOk() {
- const that = this
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.form.validateFields((err, values) => {
- if (!err) {
- that.confirmLoading = true
- let formData = Object.assign(this.model, values)
- // formData.shiftStatus = 1
- // formData.defaultShift = that.defaultShift
- let obj
- if (!this.model.id) {
- obj = postAction(this.url.add, formData)
- } else {
- obj = requestPut(this.url.edit, formData, {
- id: this.model.id
- })
- }
- obj.then((res) => {
- if (res.success) {
- // that.$message.success(res.message)
- that.$notification.success({
- message:'娑堟伅',
- description:res.message
- });
- that.$emit('ok', res.result)
- } else {
- // that.$message.warning(res.message)
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() => {
- that.confirmLoading = false
- that.defaultShift =false
- that.close()
- })
- }
- })
- },
- handleCancel() {
- this.close()
- },
- loadCascade() {
- getAction(this.url.loadCascadeData).then((res) => {
- if (res.success) {
- this.partCategoryCascade = res.result
- }
- })
- },
- //楠岃瘉 缂栫爜
- validateNum(rule, value, callback) {
- var params = {
- tableName: 'lxmes_base_part',
- fieldName: 'num',
- fieldVal: value,
- dataId: this.model.id,
- //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
- delFlag: 'true'
- }
- duplicateCheck(params).then((res) => {
- if (res.success) {
- callback()
- } else {
- callback('瀛樿揣缂栫爜宸插瓨鍦�!')
- }
- })
- },
- checkboxChange(e) {
- this.checked = e.target.checked
- }
- //楠岃瘉 鍚嶇О
- // validateName(rule, value, callback) {
- // var params = {
- // tableName: 'mes_base_part',
- // fieldName: 'name',
- // fieldVal: value,
- // dataId: this.model.id,
- // //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
- // delFlag: 'true',
- // };
- // duplicateCheck(params).then((res) => {
- // if (res.success) {
- // callback();
- // } else {
- // callback("浜у搧鍚嶇О宸插瓨鍦�!");
- // }
- // })
- // },
-
- }
- }
-</script>
-
-<style scoped>
- .ant-btn {
- padding: 0 10px;
- margin-left: 3px;
- }
-
- .ant-form-item-control {
- line-height: 0px;
- }
-
- /** 涓昏〃鍗曡闂磋窛 */
- .ant-form .ant-form-item {
- margin-bottom: 10px;
- }
-
- /** Tab椤甸潰琛岄棿璺� */
- .ant-tabs-content .ant-form-item {
- margin-bottom: 0px;
- }
-</style>
diff --git a/src/views/mdc/base/openRateFractionAnalysis.vue b/src/views/mdc/base/openRateFractionAnalysis.vue
deleted file mode 100644
index 3e75b33..0000000
--- a/src/views/mdc/base/openRateFractionAnalysis.vue
+++ /dev/null
@@ -1,86 +0,0 @@
-<template>
- <div style="width: 100%; height: 100%;">
- <a-card :bordered="false">
- <a-row type="flex" :gutter="16">
- <a-col :md="5">
- <a-tabs :activeKey="activeKey" @change="tabChange">
- <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render>
- <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
- </a-tab-pane>
- <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">,
- <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree>
- </a-tab-pane>
- </a-tabs>
- </a-col>
- <a-col :md="19">
- <open-rate-fraction-analysis-main ref="openRateFractionAnalysisMain" :nodePeople='selectPeople' :nodeTree = 'selectEquipment' :Type="selectTypeTree"></open-rate-fraction-analysis-main>
- </a-col>
- </a-row>
- </a-card>
- </div>
-
-</template>
-
-<script>
- import { putAction, getAction } from '@/api/manage'
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import BaseTree from '../common/BaseTree'
- import OpenRateFractionAnalysisMain from './modules/OpenRateFractionAnalysis/OpenRateFractionAnalysisMain'
- import DepartTree from './modules/DepartList/DepartListTree/DepartTree'
- import {mapActions} from 'vuex'
- export default {
- name: 'OpenRateFractionAnalysis',
- components: {
- BaseTree,
- DepartTree,
- OpenRateFractionAnalysisMain
- },
- data() {
- return {
- activeKey: '1',
- description: '璁惧淇℃伅',
- selectEquipmentId: '',
- selectEquipment: {},
- selectPeople:{},
- selectTypeTree:"",
- url: {
- equipmentStatistics: '/mdc/equipment/equipmentStatistics'
- },
- isDepartType:'',
- }
- },
- created() {
- this.queryTreeData()
- },
- methods: {
- ...mapActions(['QueryDepartTree']),
- queryTreeData() {
- this.QueryDepartTree().then(res => {
- if (res.success) {
- this.isDepartType = res.result[0].value
- } else {
- // this.$message.warn(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() =>{
- })
- },
- tabChange(val) {
- this.activeKey = val
- this.selectTypeTree = val
- },
- changeSelectionNode(val) {
- this.selectEquipment = val
- this.selectTypeTree = "1"
- },
- changeSelectionNodedd(val) {
- this.selectPeople = val
- this.selectTypeTree = "2"
- }
- }
-
- }
-</script>
\ No newline at end of file
diff --git a/src/views/mdc/base/openRateTrendAnalysis.vue b/src/views/mdc/base/openRateTrendAnalysis.vue
deleted file mode 100644
index f0498fc..0000000
--- a/src/views/mdc/base/openRateTrendAnalysis.vue
+++ /dev/null
@@ -1,139 +0,0 @@
-<template>
- <div style="width: 100%; height: 100%;">
- <a-card :bordered="false">
- <a-row type="flex" :gutter="16">
- <a-col :md="5">
- <a-tabs :activeKey="activeKey" @change="tabChange">
- <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render>
- <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
- </a-tab-pane>
- <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">,
- <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree>
- </a-tab-pane>
- </a-tabs>
- </a-col>
- <a-col :md="19">
- <open-rate-trend-analysis-main ref="EfficiencyList" :nodePeople='selectPeople' :nodeTree = 'selectEquement' :Type="slectTypeTree"></open-rate-trend-analysis-main>
- </a-col>
- </a-row>
- </a-card>
- </div>
-
-</template>
-
-<script>
- import { putAction, getAction } from '@/api/manage'
- import { frozenBatch } from '@/api/api'
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import JInput from '@/components/jeecg/JInput'
- import BaseTree from '../common/BaseTree'
- import OpenRateTrendAnalysisMain from './modules/OpenRateTrendAnalysis/OpenRateTrendAnalysisMain'
- import JSuperQuery from '@/components/jeecg/JSuperQuery'
- import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton'
- import DepartTree from './modules/DepartList/DepartListTree/DepartTree'
- import {mapActions} from 'vuex'
- export default {
- name: 'OpenRateTrendAnalysis',
- components: {
- JThirdAppButton,
- JInput,
- BaseTree,
- JSuperQuery,
- DepartTree,
- OpenRateTrendAnalysisMain
- },
- data() {
- return {
- activeKey: '1',
- description: '璁惧淇℃伅',
- selectEquementId: '',
- selectEquement: {},
- selectPeople:{},
- slectTypeTree:"",
- url: {
- equipmentStatistics: '/mdc/equipment/equipmentStatistics'
- },
- isDepartType:'',
- }
- },
- created() {
- this.queryTreeData()
- },
- methods: {
- ...mapActions(['QueryDepartTree']),
- queryTreeData() {
- this.QueryDepartTree().then(res => {
- if (res.success) {
- this.isDepartType = res.result[0].value
- } else {
- // this.$message.warn(res.message)
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- }).finally(() =>{
- })
- },
- tabChange(val) {
- // console.log(val);
- this.activeKey = val
- this.slectTypeTree = val
- },
- // changeSelection(val) {
- // this.selectEquementId = val
- // this.$refs.efficiencyList.pQuery(val)
- // this.$refs.efficiencyList.searchQuery()
- // },
- changeSelectionNode(val) {
- this.selectEquement = val
- this.slectTypeTree = "1"
- },
- changeSelectionNodedd(val) {
- this.selectPeople = val
- this.slectTypeTree = "2"
- }
- }
-
- }
-</script>
-<style scoped>
- @import '~@assets/less/common.less';
-
- .equipMessage {
- width: 100%;
- height: 10%;
- }
-
- .equipMessage table {
- width: 60%;
- height: 100%;
- line-height: 50%;
- }
-
- .equipMessage table td {
- text-align: center;
- }
-
- .equipMessage table td span {
- display: inline-block;
- width: 15px;
- height: 15px;
- }
-
- .equipMessage table td .equipShutdown {
- background-color: #808080;
- }
-
- .equipMessage table td .equipStandby {
- background-color: #ffbf37;
- }
-
- .equipMessage table td .equipRun {
- background-color: #19FE01;
- }
-
- .equipMessage table td .equipAlarm {
- background-color: #FD0008;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/mdc/common/BaseTree.vue b/src/views/mdc/common/BaseTree.vue
deleted file mode 100644
index 445f539..0000000
--- a/src/views/mdc/common/BaseTree.vue
+++ /dev/null
@@ -1,404 +0,0 @@
-<template>
- <a-card class="tree_con" :loading="cardLoading" :bordered="false" >
- <a-spin :spinning="loading">
- <div style="display: flex;flex-direction: column;height: 100%">
- <div>
- <a-alert type="info" :showIcon="false" style="margin-right: 54px;padding-left: 5px">
- <div slot="message">
- <span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span>
- <a v-if="this.currSelected.title" style="margin-left: 10px" @click="onClearSelected">鍙栨秷</a>
- <span v-else>鏃�</span>
- </div>
- </a-alert>
- <div class="drawer-bottom-button">
- <a-dropdown :trigger="['click']" placement="bottomCenter">
- <a-menu slot="overlay">
- <a-menu-item key="1" @click="expandAll">灞曞紑鎵�鏈�</a-menu-item>
- <a-menu-item key="2" @click="closeAll">鍚堝苟鎵�鏈�</a-menu-item>
- <a-menu-item key="3" @click="refreshTree">鍒锋柊</a-menu-item>
- </a-menu>
- <a-button>
- <a-icon type="bars"/>
- </a-button>
- </a-dropdown>
- </div>
- </div>
- <a-input-search @search="handleSearch" style="width:100%;margin-top: 10px" placeholder="妫�绱� 绫诲埆缂栫爜/鍚嶇О" allowClear
- v-model="searchInput" @change="handleChange"/>
- <!-- showLine -->
- <div style="flex: 1;overflow:auto;margin-top: 10px">
- <a-tree showLine ref="tree" :checkStrictly="checkStrictly" :expandedKeys.sync="expandedKeys"
- :selectedKeys="selectedKeys" :dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
- :treeData="treeDataSource"
- :autoExpandParent="autoExpandParent" @select="onSelect" @expand="onExpand" slots="{}">
- <template slot="title" slot-scope="{ title, parentId, entity, key}">
- <span v-if="title.indexOf(searchValue) > -1">
- {{ title.substr(0, title.indexOf(searchValue)) }}
- <span class="replaceSearch">{{ searchValue }}</span>
- {{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
- </span>
- <span v-else>{{ title }}</span>
- <a-dropdown v-if="!editDisable && entity.parentId == -1" :trigger="['click']" placement="bottomCenter">
- <a-menu slot="overlay">
- <a-menu-item>
- <a href="javascript:;" @click="handleEdit(entity)">缂栬緫</a>
- </a-menu-item>
- <a-menu-item>
- <a href="javascript:;" @click="batchDel(entity)">
- 鍒犻櫎
- </a>
- </a-menu-item>
- </a-menu>
- <span :style="{position: 'absolute',right: 0}">
- <a-icon type="down"/>
- </span>
- </a-dropdown>
- </template>
- </a-tree>
- </div>
- </div>
- </a-spin>
- <tier-model ref="tierModalForm" @ok="modalFormOk"></tier-model>
- </a-card>
-</template>
-
-<script>
- import {
- getAction,
- postAction,
- deleteAction
- } from '@/api/manage'
- import Tooltip from 'ant-design-vue/es/tooltip'
- import TierModel from './modules/baseTree/TierModel'
- import {mapActions} from 'vuex'
-
- export default {
- name: 'BaseTree',
- props: {
- editDisable: {
- type: Boolean,
- default() {
- return true
- }
- }
- },
- components: {
- Tooltip,
- TierModel
- },
- data() {
- return {
- searchInput: '',
- cardLoading: false,
- loading: false,
- treeDataSource: [],
- selectedKeys: [],
- expandedKeys: [],
- url: {
- getBaseTree: '/mdc/mdcEquipment/queryTreeListByProduction',
- deleteBatch: '/mdc/mdcequipment/deleteBatch'
- },
- searchValue: '',
- dataList: [],
- autoExpandParent: true,
- checkStrictly: true,
- allTreeKeys: [],
- currSelected: {},
- hiding: false,
- mathChange:''
- }
- }
- ,
- created() {
- this.queryTreeData()
- this.closeAll()
- }
- ,
- methods: {
- ...mapActions(['QueryProduction']),
- getCurrSelectedTitle() {
- return !this.currSelected.title ? '' : this.currSelected.title
- },
- /**
- * 鍙栨秷杞﹂棿閫変腑椤�
- */
- onClearSelected() {
- this.hiding = true
- this.currSelected = {}
- this.selectedKeys = []
- // console.log('鍙戦��')
- // this.$bus.$emit('treeClearSelected','閲嶇疆鍒楄〃')
- this.$emit('sendSelectBaseTree', '')
- },
- onSelect(selectedKeys, e) {
- this.hiding = false
- let record = e.node.dataRef
- this.currSelected = Object.assign({}, record)
- this.selectedKeys = [record.key]
- this.$emit('sendSelectBaseTree', this.selectedKeys)
- },
- handleEdit(entity) {
- this.$refs.tierModalForm.edit(entity)
- this.$refs.tierModalForm.title = '缂栬緫灞傜骇'
- this.$refs.tierModalForm.disableSubmit = false
- },
- onExpand(expandedKeys) {
- this.expandedKeys = expandedKeys
- this.autoExpandParent = false
- },
- queryTreeData() {
- this.loading = true
- this.cardLoading = true
- this.QueryProduction().then(res => {
- if (res.success) {
- this.dataList = []
- this.allTreeKeys = []
- this.treeDataSource = res.result
- this.generateList(res.result)
- this.expandedKeys=this.allTreeKeys
- } else {
- this.$message.warn(res.message)
- }
- }).finally(() =>{
- this.loading = false
- this.cardLoading = false
- })
- // getAction(this.url.getBaseTree).then((res) => {
- // if (res.success) {
- // this.dataList = []
- // this.allTreeKeys = []
- // this.treeDataSource = res.result
- // this.generateList(res.result)
- // } else {
- // this.$message.warn(res.message)
- // }
- // }).finally(() => {
- // this.loading = false
- // this.cardLoading = false
- // })
- },
- handleChange() {
- let search = this.searchInput
- let expandedKeys = this.dataList
- .map(item => {
- if(item.title !=null){
- if (item.title.indexOf(search) > -1) {
- return this.getParentKey(item.key, this.treeDataSource)
- }
- return null
- }
- })
- .filter((item, i, self) => item && self.indexOf(item) === i)
- Object.assign(this, {
- expandedKeys,
- searchValue: search,
- autoExpandParent: true
- })
- },
- handleSearch(value) {
- let search = value
- let expandedKeys = this.dataList
- .map(item => {
-
- if(item.title !=null){
- if (item.title.indexOf(search) > -1) {
- return this.getParentKey(item.key, this.treeDataSource)
- }
- return null
- }
- })
- .filter((item, i, self) => item && self.indexOf(item) === i)
- Object.assign(this, {
- expandedKeys,
- searchValue: search,
- autoExpandParent: true
- })
- },
- getParentKey(key, tree) {
- let parentKey
- for (let i = 0; i < tree.length; i++) {
- const node = tree[i]
- if (node.children) {
- if (node.children.some(item => item.key === key)) {
- parentKey = node.key
- } else if (
- this.getParentKey(key, node.children)) {
- parentKey = this.getParentKey(key, node.children)
- }
- }
- }
- return parentKey
- },
- generateList(data) {
- for (let i = 0; i < data.length; i++) {
- const node = data[i]
- const key = node.key
- const title = node.title
- this.dataList.push({
- key,
- title: title
- })
- this.allTreeKeys.push(key)
- if (node.children) {
- this.generateList(node.children)
- }
- }
- },
- expandAll() {
- this.expandedKeys = this.allTreeKeys
- },
- closeAll() {
- this.expandedKeys = ['-1']
- },
- refreshTree() {
- this.queryTreeData()
- },
- batchDel: function(entity) {
- if (!this.url.deleteBatch) {
- this.$message.error('璇疯缃畊rl.deleteBatch灞炴��!')
- return
- }
- let ids = entity.id
- if (!ids) {
- // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒')
- this.$notification.warning({
- message:'娑堟伅',
- description:"璇烽�夋嫨涓�鏉¤褰�"
- });
- return
- } else {
- var that = this
- this.$confirm({
- title: '纭鍒犻櫎',
- content: '鏄惁鍒犻櫎閫変腑鏁版嵁?',
- onOk: function() {
- that.loading = true
- deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => {
- if (res.success) {
- that.$message.success(res.message)
- that.queryTreeData();
- } else {
- that.$message.warning(res.message)
- }
- }).finally(() => {
- that.loading = false
- })
- }
- })
- }
- },
- modalFormOk(val) {
- console.log("mmm")
- // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- this.queryTreeData()
- // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- }
- },
- //鐩戝惉
- watch: {
- currSelected(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
- this.$emit('getCurrSelected', val)
- },
- }
- }
-</script>
-
-<style lang="less" scoped>
- .replaceSearch {
- color: #40a9ff;
- font-weight: bold;
- background-color: rgb(204, 204, 204);
- }
-
- .ant-card-body .table-operator {
- margin: 15px;
- }
-
- .anty-form-btn {
- width: 100%;
- text-align: center;
- }
-
- .anty-form-btn button {
- margin: 0 5px;
- }
-
- .anty-node-layout .ant-layout-header {
- padding-right: 0;
- }
-
- .header {
- padding: 0 8px;
- }
-
- .header button {
- margin: 0 3px;
- }
-
- .ant-modal-cust-warp {
- height: 100%;
- }
-
- .ant-modal-cust-warp .ant-modal-body {
- height: calc(100% - 110px) !important;
- overflow-y: auto;
- }
-
- .ant-modal-cust-warp .ant-modal-content {
- height: 90% !important;
- overflow-y: hidden;
- }
-
- /** Button鎸夐挳闂磋窛 */
- .ant-btn {
- margin-left: 3px;
- }
-
- .ant-alert {
- padding: 5px 15px 5px 37px;
- }
-
- .drawer-bottom-button {
- position: absolute;
- top: 1px;
- /* padding: 10px 16px; */
- text-align: left;
- right: 0;
- background: #fff;
- border-radius: 0 0 2px 2px;
- }
-
- .tree_con{
- overflow: hidden;
- }
-
- @media screen and (min-width: 1920px){
- .tree_con{
- height: 748px!important;
- }
- }
- @media screen and (min-width: 1680px) and (max-width: 1920px){
- .tree_con{
- height: 748px!important;
- }
- }
- @media screen and (min-width: 1400px) and (max-width: 1680px){
- .tree_con{
- height: 600px!important;
- }
- }
- @media screen and (min-width: 1280px) and (max-width: 1400px){
- .tree_con{
- height: 501px!important;
- }
- }
- @media screen and (max-width: 1280px){
- .tree_con{
- height: 501px!important;
- }
- }
-
- /deep/ .ant-card-body,/deep/ .ant-spin-nested-loading,/deep/ .ant-spin-container{
- height: 100%;
- }
-</style>
diff --git a/src/views/mdc/common/modules/baseTree/TierModel.vue b/src/views/mdc/common/modules/baseTree/TierModel.vue
deleted file mode 100644
index e6a0f82..0000000
--- a/src/views/mdc/common/modules/baseTree/TierModel.vue
+++ /dev/null
@@ -1,245 +0,0 @@
-<template>
- <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading"
- :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴">
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="鐖剁骇鍚嶇О">
- <a-input :disabled="true" v-decorator="['parentName', validatorRules.parentName]"/>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="灞傜骇绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="true"
- v-decorator="['tierType', validatorRules.tierType]"/>
- </a-form-item>
- </a-col>
- </a-row>
-
- <a-row :gutter="24">
- <!--<a-col :span="12">-->
- <!--<a-form-item label="灞傜骇缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
- <!--<a-input :readOnly="disableSubmit" :disabled="disableSubmit" allow-clear placeholder="璇疯緭鍏ュ眰绾х紪鍙�"-->
- <!--v-decorator="['tierNumber', validatorRules.tierNumber ]"/>-->
- <!--</a-form-item>-->
- <!--</a-col>-->
- <a-col :span="12">
- <a-form-item label="灞傜骇鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="璇疯緭鍏ュ眰绾у悕绉�"
- v-decorator="['tierName',validatorRules.tierName]"/>
- </a-form-item>
- </a-col>
- </a-row>
- </a-form>
- </a-spin>
- <template slot="footer" v-if="disableSubmit == false">
- <a-button :style="{ marginRight: '8px' }" @click="handleCancel">鍏抽棴</a-button>
- <a-button @click="handleOk" type="primary">纭畾</a-button>
- </template>
- </a-modal>
-</template>
-
-<script>
- import pick from 'lodash.pick'
- import {
- getAction,
- postAction,
- requestPut
- } from '@/api/manage'
- import {
- duplicateCheck
- } from '@/api/api'
-
- export default {
- name: 'TierModel',
- components: {},
- props: {},
- data() {
- return {
- title: '',
- visible: false,
- show: false,
- model: {},
- checked: false,
- labelCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 6
- }
- },
- wrapperCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 18
- }
- },
- confirmLoading: false,
- form: this.$form.createForm(this),
- validatorRules: {},
- url: {
- add: '/mdc/mdcequipment/add',
- edit: '/mdc/mdcequipment/edit'
- },
- disableSubmit: true,
- partCategoryCascade: [],
- cascadeDefaultValue: []
- }
- },
- created() {
- },
-
- methods: {
- //绾ц仈妗唎nChange浜嬩欢
- onChange(value) {
-
- },
- getParentIdsById(id) {
- let that = this
- getAction(this.url.getParentIdsById, {
- id: id
- }).then((res) => {
- debugger
- if (res.success) {
- that.form.setFieldsValue({
- partCategoryId: res.result
- })
- }
- })
- },
- add(node) {
- let _this = this
- this.visible = true
- this.form.resetFields()
- this.model = {}
- this.$nextTick(() => {
- if (node && JSON.stringify(node) != '{}') {
- _this.form.setFieldsValue({ 'tierType': node.entity.tierType + 1, 'parentName': node.title })
- _this.model.parentId = node.key
- } else {
- _this.form.setFieldsValue({ 'tierType': 1, 'parentName': '' })
- _this.model.parentId = -1
- }
- })
- },
- edit(record) {
- this.form.resetFields()
- this.model = Object.assign({}, record)
- this.visible = true
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'tierType','parentName', 'tierNumber', 'tierName', ))
- })
- },
- close() {
- this.$emit('close')
- this.visible = false
- this.show = false
- },
- handleOk() {
- const that = this
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.form.validateFields((err, values) => {
- if (!err) {
- that.confirmLoading = true
- let formData = Object.assign(this.model, values)
- let obj
- if (!this.model.id) {
- obj = postAction(this.url.add, formData)
- } else {
- obj = requestPut(this.url.edit, formData, {
- id: this.model.id
- })
- }
- obj.then((res) => {
- if (res.success) {
- that.$message.success("缂栬緫鎴愬姛")
- // that.$message.success(res.message)
- that.$emit('ok', res.result)
- } else {
- that.$message.warning(res.message)
- }
- }).finally(() => {
- that.confirmLoading = false
- that.close()
- })
- }
- })
- },
- handleCancel() {
- this.close()
- },
- loadCascade() {
- getAction(this.url.loadCascadeData).then((res) => {
- if (res.success) {
- this.partCategoryCascade = res.result
- }
- })
- },
- //楠岃瘉 缂栫爜
- validateNum(rule, value, callback) {
- var params = {
- tableName: 'lxmes_base_part',
- fieldName: 'num',
- fieldVal: value,
- dataId: this.model.id,
- //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
- delFlag: 'true'
- }
- duplicateCheck(params).then((res) => {
- if (res.success) {
- callback()
- } else {
- callback('瀛樿揣缂栫爜宸插瓨鍦�!')
- }
- })
- },
- checkboxChange(e) {
- this.checked = e.target.checked
- }
- //楠岃瘉 鍚嶇О
- // validateName(rule, value, callback) {
- // var params = {
- // tableName: 'mes_base_part',
- // fieldName: 'name',
- // fieldVal: value,
- // dataId: this.model.id,
- // //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
- // delFlag: 'true',
- // };
- // duplicateCheck(params).then((res) => {
- // if (res.success) {
- // callback();
- // } else {
- // callback("浜у搧鍚嶇О宸插瓨鍦�!");
- // }
- // })
- // },
-
- }
- }
-</script>
-
-<style scoped>
- .ant-btn {
- padding: 0 10px;
- margin-left: 3px;
- }
-
- .ant-form-item-control {
- line-height: 0px;
- }
-
- /** 涓昏〃鍗曡闂磋窛 */
- .ant-form .ant-form-item {
- margin-bottom: 10px;
- }
-
- /** Tab椤甸潰琛岄棿璺� */
- .ant-tabs-content .ant-form-item {
- margin-bottom: 0px;
- }
-</style>
diff --git a/src/views/system/WorkshopSignageManagement.vue b/src/views/system/WorkshopSignageManagement.vue
deleted file mode 100644
index 1c02197..0000000
--- a/src/views/system/WorkshopSignageManagement.vue
+++ /dev/null
@@ -1,535 +0,0 @@
-<template>
- <a-row :gutter="10">
- <a-col :md="leftColMd" :sm="24" style="margin-bottom: 20px">
- <a-card :bordered="false">
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <!-- 鎼滅储鍖哄煙 -->
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="8" :sm="8">
- <a-form-item label="杞﹂棿鍚嶇О" :labelCol="{ span: 5 }" :wrapperCol="{ span: 19}">
- <a-input placeholder="" v-model="queryParam.workshopName"></a-input>
- </a-form-item>
- </a-col>
- <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
- <a-col>
- <a-space>
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
- </a-space>
- </a-col>
- </span>
- </a-row>
- </a-form>
- </div>
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator" style="margin: 5px 0 10px 2px">
- <a-button @click="handleAdd" type="primary" icon="plus">鏂板缓杞﹂棿</a-button>
- </div>
-
- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px">
- <i class="anticon anticon-info-circle ant-alert-icon"> </i> 宸查�夋嫨
- <a
- ><b>{{ selectedRowKeys1.length }}</b></a
- >椤�
- <a style="margin-left: 24px" @click="onClearSelected1">娓呯┖</a>
- </div>
-
- <div style="margin-top: 15px">
- <a-table
- style="height: 500px"
- ref="table"
- size="middle"
- bordered
- rowKey="id"
- :columns="columns"
- :dataSource="dataSource"
- :pagination="ipagination"
- :loading="loading"
- :rowSelection="{ selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type: 'radio' }"
- @change="handleTableChange"
- >
- <template slot="backgroundImage" slot-scope="text, record">
- <img :src="getImgView(record.backgroundImage)" width="50" height="50" />
- </template>
- <span slot="action" slot-scope="text, record">
- <a @click="handleOpen(record)">璁惧</a>
- <a-divider type="vertical" />
- <a-dropdown>
- <a class="ant-dropdown-link"> 鏇村 <a-icon type="down" /> </a>
- <a-menu slot="overlay">
- <a-menu-item>
- <a @click="handleEdit(record)">缂栬緫</a>
- </a-menu-item>
- <a-menu-item>
- <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete1(record.id)">
- <a>鍒犻櫎</a>
- </a-popconfirm>
- </a-menu-item>
- </a-menu>
- </a-dropdown>
- </span>
- </a-table>
- </div>
- </a-card>
- </a-col>
- <a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 1">
- <a-card :bordered="false">
- <div @click="hideUserList" class="close-circle">
- <a-icon type="close-circle"/>
- </div>
- <!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline">
- <a-row :gutter="24">
- <a-col :md="12" :sm="12">
- <a-form-item label="缁熶竴缂栫爜">
- <a-input placeholder="" v-model="queryParam2.equipmentId"></a-input>
- </a-form-item>
- </a-col>
- <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
- <a-col :md="9" :sm="24">
- <a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
- </a-col>
- </span>
- </a-row>
- </a-form>
- </div>
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator" :md="24" :sm="24">
- <a-button @click="handleAddDeviceInWorkshop" type="primary" icon="plus" style="margin: 5px 0 10px 2px"
- >宸叉湁璁惧
- </a-button>
-
- <a-dropdown v-if="selectedRowKeys2.length > 0">
- <a-menu slot="overlay">
- <a-menu-item key="1" @click="batchDel2">
- <a-icon type="delete" />
- 鍒犻櫎
- </a-menu-item>
- </a-menu>
- <a-button style="margin-left: 8px">
- 鎵归噺鎿嶄綔
- <a-icon type="down" />
- </a-button>
- </a-dropdown>
- </div>
-
- <!-- table鍖哄煙-begin -->
- <div>
- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px">
- <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨
- <a style="font-weight: 600">{{ selectedRowKeys2.length }}</a
- >椤�
- <a style="margin-left: 24px" @click="onClearSelected2">娓呯┖</a>
- </div>
- <a-table
- style="height: 500px"
- ref="table2"
- bordered
- size="middle"
- rowKey="equipmentId"
- :columns="columns2"
- :dataSource="dataSource2"
- :pagination="ipagination2"
- :loading="loading2"
- :rowSelection="{ selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2 }"
- @change="handleTableChange2"
- >
- <span slot="action" slot-scope="text, record">
- <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete2(record.equipmentId)">
- <a>鍒犻櫎</a>
- </a-popconfirm>
- </span>
- </a-table>
- </div>
- </a-card>
- </a-col>
- <!-- 琛ㄥ崟鍖哄煙 -->
- <workshop-modal ref="modalForm" @ok="modalFormOk"></workshop-modal>
- <!--鏂板杞﹂棿-->
- <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'娣诲姞宸叉湁璁惧'"></select-device-drawer>
- <!--宸叉湁璁惧-->
- </a-row>
-</template>
-<script>
-import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-import { deleteAction, postAction, getAction } from '@/api/manage'
-import SelectDeviceDrawer from './modules/SelectDeviceDrawer'
-import WorkshopModal from './modules/WorkshopModal'
-import { filterObj } from '@/utils/util'
-import moment from 'moment'
-
-export default {
- name: 'WorkshopSignageManagement',
- mixins: [JeecgListMixin],
- components: {
- SelectDeviceDrawer,
- WorkshopModal,
- moment,
- },
- data() {
- return {
- model1: {},
- model2: {},
- currentRoleId: '',
- currentWorkshopId: '',
- queryParam1: {},
- queryParam2: {},
- dataSource1: [],
- dataSource2: [],
- ipagination1: {
- current: 1,
- pageSize: 10,
- pageSizeOptions: ['10', '20', '30'],
- showTotal: (total, range) => {
- return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�'
- },
- showQuickJumper: true,
- showSizeChanger: true,
- total: 0,
- },
- ipagination2: {
- current: 1,
- pageSize: 10,
- pageSizeOptions: ['10', '20', '30'],
- showTotal: (total, range) => {
- return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�'
- },
- showQuickJumper: true,
- showSizeChanger: true,
- total: 0,
- },
- isorter1: {
- column: 'createTime',
- order: 'desc',
- },
- isorter2: {
- column: 'createTime',
- order: 'desc',
- },
- filters1: {},
- filters2: {},
- loading1: false,
- loading2: false,
- selectedRowKeys1: [],
- selectedRowKeys2: [],
- selectionRows1: [],
- selectionRows2: [],
- test: {},
- rightcolval: 0,
- columns: [
- {
- title: '杞﹂棿鍚嶇О',
- align: 'center',
- dataIndex: 'workshopName',
- },
- {
- title: '杞﹂棿鑳屾櫙鍥�',
- dataIndex: 'backgroundImage',
- align: 'center',
- scopedSlots: { customRender: 'backgroundImage' },
- },
- {
- title: '璁惧缂栧彿棰滆壊',
- dataIndex: 'equipmentIdColor',
- align: 'center',
- },
- {
- title: '鎿嶄綔',
- dataIndex: 'action',
- align: 'center',
- scopedSlots: { customRender: 'action' },
- },
- ],
- columns2: [
- {
- title: '缁熶竴缂栫爜',
- align: 'center',
- dataIndex: 'equipmentId',
- width: 120,
- },
- {
- title: '璁惧鍚嶇О',
- align: 'center',
- width: 100,
- dataIndex: 'equipmentName',
- },
- {
- title: '璁惧绫诲瀷',
- align: 'center',
- width: 80,
- dataIndex: 'equipmentType',
- },
-
- {
- title: '鎿嶄綔',
- dataIndex: 'action',
- scopedSlots: { customRender: 'action' },
- align: 'center',
- width: 120,
- },
- ],
- // 楂樼骇鏌ヨ鍙傛暟
- superQueryParams2: '',
- // 楂樼骇鏌ヨ鎷兼帴鏉′欢
- superQueryMatchType2: 'and',
- url: {
- list: '/mdc/mdcWorkshopInfo/list',
- delete: '/mdc/mdcWorkshopInfo/delete',
- list2: '/mdc/mdcWorkshopInfo/workshopEquipmentList',
- addDeviceInWorkshop: '/mdc/mdcWorkshopInfo/addWorkshopEquipment',
- delete2: '/mdc/mdcWorkshopInfo/deleteWorkshopEquipment',
- deleteBatch2: '/mdc/mdcWorkshopInfo/deleteWorkshopEquipmentBatch',
- },
- }
- },
- computed: {
- leftColMd() {
- return this.selectedRowKeys1.length === 0 ? 24 : 12
- },
- rightColMd() {
- return this.selectedRowKeys1.length === 0 ? 0 : 12
- },
- },
- methods: {
- onSelectChange2(selectedRowKeys, selectionRows) {
- this.selectedRowKeys2 = selectedRowKeys
- this.selectionRows2 = selectionRows
- },
- onClearSelected2() {
- this.selectedRowKeys2 = []
- this.selectionRows2 = []
- },
- onClearSelected1() {
- this.selectedRowKeys1 = []
- this.selectionRows1 = []
- },
- onSelectChange1(selectedRowKeys, selectionRows) {
- this.rightcolval = 1
- this.selectedRowKeys1 = selectedRowKeys
- this.selectionRows1 = selectionRows
- this.model1 = Object.assign({}, selectionRows[0])
- this.currentWorkshopId = selectedRowKeys[0]
- this.loadData2()
- },
- getQueryParams2() {
- //鑾峰彇鏌ヨ鏉′欢
- let sqp = {}
- if (this.superQueryParams2) {
- sqp['superQueryParams'] = encodeURI(this.superQueryParams2)
- sqp['superQueryMatchType'] = this.superQueryMatchType2
- }
- var param = Object.assign(sqp, this.queryParam2, this.isorter2, this.filters2)
- param.field = this.getQueryField2()
- param.pageNo = this.ipagination2.current
- param.pageSize = this.ipagination2.pageSize
- return filterObj(param)
- },
- getQueryField2() {
- //TODO 瀛楁鏉冮檺鎺у埗
- var str = 'id,'
- this.columns2.forEach(function (value) {
- str += ',' + value.dataIndex
- })
- return str
- },
- modalFormOk2() {
- // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- this.loadData2()
- },
- loadData2(arg) {
- if (!this.url.list2) {
- this.$message.error('璇疯缃畊rl.list2灞炴��!')
- return
- }
- //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
- if (arg === 1) {
- this.ipagination2.current = 1
- }
- if (this.currentWorkshopId === '') return
- let params = this.getQueryParams2() //鏌ヨ鏉′欢
- params.workshopId = this.currentWorkshopId
- this.loading2 = true
- getAction(this.url.list2, params).then((res) => {
- if (res.success) {
- this.dataSource2 = res.result.records
- this.ipagination2.total = res.result.total
- }else{
- this.dataSource2=[]
- }
- this.loading2 = false
- })
- },
- handleDelete1: function (id) {
- this.handleDelete(id)
- this.dataSource2 = []
- this.currentRoleId = ''
- },
-
- /**
- * 鐐瑰嚮璁惧琛ㄦ牸涓殑鍒犻櫎鎸夐挳鍚庤Е鍙戝垹闄ゅ崟涓溅闂翠笌璁惧鐨勫叧绯�
- * @param equipmentId 褰撳墠琛岀殑璁惧缂栧彿
- */
- handleDelete2: function (equipmentId) {
- if (!this.url.delete2) {
- this.$notification.error({
- message:'娑堟伅',
- description:'璇疯缃畊rl.delete2灞炴��!'
- });
- return
- }
- var that = this
- deleteAction(that.url.delete2, { workshopId: this.currentWorkshopId, equipmentId }).then((res) => {
- if (res.success) {
- that.$notification.success({
- message:'娑堟伅',
- description:res.message
- });
- that.loadData2()
- } else {
- that.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- })
- },
-
- /**
- * 鎵归噺鍒犻櫎杞﹂棿涓庤澶囩殑鍏崇郴
- */
- batchDel2: function () {
- if (!this.url.deleteBatch2) {
- this.$message.error('璇疯缃畊rl.deleteBatch2灞炴��!')
- return
- }
- if (this.selectedRowKeys2.length <= 0) {
- // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒')
- this.$notification.warning({
- message: '娑堟伅',
- description: '璇烽�夋嫨涓�鏉¤褰�',
- })
- return
- } else {
- var ids = ''
- for (var a = 0; a < this.selectedRowKeys2.length; a++) {
- ids += this.selectedRowKeys2[a] + ','
- }
- var that = this
- this.$confirm({
- title: '纭鍒犻櫎',
- content: '鏄惁鍒犻櫎閫変腑鏁版嵁?',
- onOk: function () {
- deleteAction(that.url.deleteBatch2, {
- workshopId: that.currentWorkshopId,
- equipmentIds: ids,
- }).then((res) => {
- if (res.success) {
- that.$message.success(res.message)
- that.loadData2()
- that.onClearSelected2()
- } else {
- that.$message.warning(res.message)
- }
- })
- },
- })
- }
- },
-
- /**
- * 閫夋嫨宸叉湁璁惧鍚庣偣鍑荤‘瀹氭椂瑙﹀彂
- * @param data 宸查�夋嫨鐨勮澶�
- */
- selectOK(data) {
- let params = {}
- params.workshopId = this.currentWorkshopId
- params.equipmentIdList = []
- for (var a = 0; a < data.length; a++) {
- params.equipmentIdList.push(data[a])
- }
- console.log(params)
- postAction(this.url.addDeviceInWorkshop, params).then((res) => {
- if (res.success) {
- this.loadData2()
- this.$notification.success({
- message:'娑堟伅',
- description:res.message
- });
- } else {
- this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
- }
- })
- },
-
- /**
- * 鐐瑰嚮宸叉湁璁惧鎸夐挳瑙﹀彂
- */
- handleAddDeviceInWorkshop() {
- if (this.currentWorkshopId == '') {
- this.$message.error('璇烽�夋嫨涓�涓溅闂�!')
- } else {
- this.$refs.selectDeviceDrawer.visible = true
- this.$refs.selectDeviceDrawer.selectedRowKeys = []
- this.$refs.selectDeviceDrawer.selectedRows = []
- this.$refs.selectDeviceDrawer.checkedKeys = []
- this.$refs.selectDeviceDrawer.expandAll()
- }
- },
-
- /**
- * 鐐瑰嚮褰撳墠琛岃溅闂撮�夐」鍚庤Е鍙戜簨浠�
- * @param record 褰撳墠琛屾暟鎹�
- */
- handleOpen(record) {
- this.rightcolval = 1
- this.selectedRowKeys1 = [record.id]
- this.model1 = Object.assign({}, record)
- this.currentWorkshopId = record.id
- this.onClearSelected2()
- this.loadData2()
- },
-
- searchQuery2() {
- this.loadData2(1)
- },
- searchReset2() {
- this.queryParam2 = {}
- this.loadData2(1)
- },
- handleTableChange2(pagination, filters, sorter) {
- //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂
- //TODO 绛涢��
- if (Object.keys(sorter).length > 0) {
- this.isorter2.column = sorter.field
- this.isorter2.order = 'ascend' == sorter.order ? 'asc' : 'desc'
- }
- this.ipagination2 = pagination
- this.loadData2()
- },
- hideUserList() {
- //this.rightcolval = 0
- this.selectedRowKeys1 = []
- },
- },
-}
-</script>
-<style scoped>
-/** Button鎸夐挳闂磋窛 */
-.ant-btn {
- margin-left: 8px;
-}
- .close-circle{
- position: absolute;
- z-index: 1;
- right: 15px;
- top: 15px;
- cursor: pointer;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/system/modules/SelectDeviceDrawer.vue b/src/views/system/modules/SelectDeviceDrawer.vue
deleted file mode 100644
index 6015831..0000000
--- a/src/views/system/modules/SelectDeviceDrawer.vue
+++ /dev/null
@@ -1,264 +0,0 @@
-<template>
- <a-drawer
- :title="title"
- :visible="visible"
- width="500"
- @ok="handleOk"
- @close="handleCancel"
- >
-
- <a-spin :spinning="loading">
- <!-- showLine -->
- <a-form>
- <a-form-item>
- <a-input-search @search="handleSearch" style="width:100%;" placeholder="妫�绱� 绫诲埆缂栫爜/鍚嶇О" allowClear
- v-model="searchInput" @change="handleChange"/>
- </a-form-item>
- <a-form-item label="杞﹂棿灞傜骇锛�">
- <a-tree showLine ref="tree" :expandedKeys.sync="expandedKeys" :autoExpandParent="autoExpandParent"
- :treeData="treeDataSource" checkable @check="onCheck" v-model="checkedKeys"
- @expand="onExpand">
- <template slot="title" slot-scope="{ title, parentId, entity, key}">
- <span v-if="title.indexOf(searchValue) > -1">{{ title.substr(0, title.indexOf(searchValue)) }}
- <span class="replaceSearch">{{ searchValue }}</span>
- {{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
- </span>
- <span v-else>{{ title }}</span>
- </template>
- </a-tree>
- </a-form-item>
- </a-form>
-
- </a-spin>
-
-
- <div class="drawer-bottom-button">
- <a-dropdown
- style="float: left"
- :trigger="['click']"
- placement="topCenter"
- >
- <a-menu slot="overlay">
- <a-menu-item key="1" @click="expandAll">灞曞紑鎵�鏈�</a-menu-item>
- <a-menu-item key="2" @click="closeAll">鍚堝苟鎵�鏈�</a-menu-item>
- <a-menu-item key="3" @click="refreshTree">鍒锋柊</a-menu-item>
- </a-menu>
- <a-button>
- 鏍戞搷浣�
- <a-icon type="up"/>
- </a-button>
- </a-dropdown>
- <a-popconfirm title="纭畾鏀惧純缂栬緫锛�" @confirm="handleCancel" okText="纭畾" cancelText="鍙栨秷">
- <a-button style="margin-right: .8rem">鍏抽棴</a-button>
- </a-popconfirm>
- <a-button
- @click="handleOk"
- type="primary"
- >纭畾
- </a-button>
- </div>
-
- </a-drawer>
-</template>
-
-<script>
- import {
- getAction,
- postAction,
- deleteAction
- } from '@/api/manage'
- import BaseTree from '@/views/mdc/common/BaseTree'
- import DepartTree from '@/views/mdc/base/modules/DepartList/DepartListTree/DepartTree'
- import { mapActions } from 'vuex'
-
- export default {
- name: 'SelectDeviceDrawer',
- components: {
- BaseTree, DepartTree
- },
- props: {
- editDisable: {
- type: Boolean,
- default() {
- return true
- }
- },
- title: {
- type: String
- }
- },
- data() {
- return {
- searchInput: '',
- cardLoading: false,
- loading: false,
- treeDataSource: [],
- expandedKeys: [],
- checkedKeys: [],
- autoExpandParent: true,
- url: {
- getBaseTree: '/mdc/mdcEquipment/queryTreeListByProduction'
- },
- dataList: [],
- allTreeKeys: [],
- visible: false,
- dataSource: []
- }
- },
- created() {
- this.queryTreeData()
- this.closeAll()
- },
- methods: {
- ...mapActions(['QueryProduction']),
- onExpand(expandedKeys) {
- this.expandedKeys = expandedKeys
- this.autoExpandParent = false
- },
-
- queryTreeData() {
- this.loading = true
- this.cardLoading = true
- this.QueryProduction().then(res => {
- if (res.success) {
- this.dataList = []
- this.allTreeKeys = []
- this.getTreeDataSource(res.result)
- this.treeDataSource = res.result
- this.generateList(this.treeDataSource)
- console.log('treeDataSource', this.treeDataSource)
- this.expandedKeys = this.allTreeKeys
- } else {
- this.$message.warn(res.message)
- }
- }).finally(() => {
- this.loading = false
- this.cardLoading = false
- })
- },
-
- generateList(data) {
- for (let i = 0; i < data.length; i++) {
- const node = data[i]
- const key = node.key
- const title = node.title
- this.dataList.push({
- key,
- title: title
- })
- this.allTreeKeys.push(key)
- if (node.children) {
- this.generateList(node.children)
- }
- }
- },
-
- handleChange() {
- let search = this.searchInput
- let expandedKeys = this.dataList
- .map(item => {
- if (item.title != null) {
- if (item.title.indexOf(search) > -1) {
- return this.getParentKey(item.key, this.treeDataSource)
- }
- return null
- }
- })
- .filter((item, i, self) => item && self.indexOf(item) === i)
- Object.assign(this, {
- expandedKeys,
- searchValue: search,
- autoExpandParent: true
- })
- },
-
- handleSearch(value) {
- let search = value
- let expandedKeys = this.dataList
- .map(item => {
-
- if (item.title != null) {
- if (item.title.indexOf(search) > -1) {
- return this.getParentKey(item.key, this.treeDataSource)
- }
- return null
- }
- })
- .filter((item, i, self) => item && self.indexOf(item) === i)
- Object.assign(this, {
- expandedKeys,
- searchValue: search,
- autoExpandParent: true
- })
- },
-
- getParentKey(key, tree) {
- let parentKey
- for (let i = 0; i < tree.length; i++) {
- const node = tree[i]
- if (node.children) {
- if (node.children.some(item => item.key === key)) {
- parentKey = node.key
- } else if (
- this.getParentKey(key, node.children)) {
- parentKey = this.getParentKey(key, node.children)
- }
- }
- }
- return parentKey
- },
-
- getTreeDataSource(data) {
- data.forEach(item => {
- if (item.children && item.children.length > 0) {
- this.getTreeDataSource(item.children)
- }
- item.key = item.equipmentId ? item.equipmentId : item.key
- item.value = item.equipmentId ? item.equipmentId : item.value
- })
- },
- expandAll() {
- this.expandedKeys = this.allTreeKeys
- },
- closeAll() {
- this.expandedKeys = ['-1']
- },
- refreshTree() {
- this.queryTreeData()
- },
- onCheck(value, obj) {
- this.checkedKeys = value
- console.log('obj,', obj)
- this.deviceNodes = obj.checkedNodes.filter(item => item.data.props.equipmentId).map(item => item.data.props.equipmentId)
- console.log(this.deviceNodes)
- },
- handleCancel() {
- this.visible = false
- },
- handleOk() {
- this.$emit('selectFinished', this.deviceNodes)
- this.visible = false
- }
-
- }
- }
-</script>
-<style lang="less" scoped>
- .replaceSearch {
- color: #40a9ff;
- font-weight: bold;
- background-color: rgb(204, 204, 204);
- }
-
- .drawer-bottom-button {
- position: absolute;
- bottom: 0;
- width: 100%;
- border-top: 1px solid #e8e8e8;
- padding: 10px 16px;
- text-align: right;
- left: 0;
- background: #fff;
- border-radius: 0 0 2px 2px;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/system/modules/SelectDeviceModal.vue b/src/views/system/modules/SelectDeviceModal.vue
deleted file mode 100644
index 599de84..0000000
--- a/src/views/system/modules/SelectDeviceModal.vue
+++ /dev/null
@@ -1,231 +0,0 @@
-<template>
- <a-modal
- :title="title"
- :visible="visible"
- @ok="handleOk"
- @cancel="handleCancel"
- >
-
- <a-spin :spinning="loading">
- <!-- showLine -->
- <a-form>
- <a-form-item label="杞﹂棿灞傜骇锛�">
- <a-tree showLine ref="tree" :expandedKeys.sync="expandedKeys"
- :treeData="treeDataSource" checkable @check="onCheck" v-model="checkedKeys"
- @expand="onExpand">
- </a-tree>
- </a-form-item>
- </a-form>
-
- </a-spin>
-
- <template slot="footer">
- <div>
- <a-dropdown
- style="float: left"
- :trigger="['click']"
- placement="topCenter"
- >
- <a-menu slot="overlay">
- <a-menu-item key="1" @click="expandAll">灞曞紑鎵�鏈�</a-menu-item>
- <a-menu-item key="2" @click="closeAll">鍚堝苟鎵�鏈�</a-menu-item>
- <a-menu-item key="3" @click="refreshTree">鍒锋柊</a-menu-item>
- </a-menu>
- <a-button>
- 鏍戞搷浣�
- <a-icon type="up"/>
- </a-button>
- </a-dropdown>
- <a-popconfirm title="纭畾鏀惧純缂栬緫锛�" @confirm="handleCancel" okText="纭畾" cancelText="鍙栨秷">
- <a-button style="margin-right: .8rem">鍏抽棴</a-button>
- </a-popconfirm>
- <a-button
- @click="handleOk"
- type="primary"
- >纭畾
- </a-button>
- </div>
- </template>
-
- </a-modal>
-</template>
-
-<script>
- import {
- getAction,
- postAction,
- deleteAction
- } from '@/api/manage'
- import BaseTree from '@/views/mdc/common/BaseTree'
- import DepartTree from '@/views/mdc/base/modules/DepartList/DepartListTree/DepartTree'
-
- export default {
- name: 'SelectDeviceModal',
- components: {
- BaseTree, DepartTree
- },
- props: {
- editDisable: {
- type: Boolean,
- default() {
- return true
- }
- },
- title: {
- type: String
- },
- selectedProduction: {
- type: String
- }
- },
- data() {
- return {
- loading: false,
- treeDataSource: [],
- expandedKeys: [],
- checkedKeys: [],
- url: {
- getDeviceTree: '/mdc/mdcEquipment/loadTreeListByProductionIds'
- },
- selectedWorkshopIds: '',
- dataList: [],
- allTreeKeys: [],
- visible: false,
- dataSource: []
- }
- },
- created() {
- this.closeAll()
- },
- methods: {
- onExpand(expandedKeys) {
- this.expandedKeys = expandedKeys
- this.autoExpandParent = false
- },
- queryTreeData(value) {
- this.loading = true
- this.selectedWorkshopIds = value
- getAction(this.url.getDeviceTree, { ids: value })
- .then(res => {
- if (res.success) {
- this.dataList = []
- this.allTreeKeys = []
- this.getTreeDataSouce(res.result)
- this.treeDataSource = res.result
- this.generateList(this.treeDataSource)
- this.expandedKeys = this.allTreeKeys
- } else {
- this.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- })
- .catch(err => {
- this.$notification.error({
- message: '娑堟伅',
- description: err.message
- })
- })
- .finally(() => {
- this.loading = false
- })
- },
-
- generateList(data) {
- for (let i = 0; i < data.length; i++) {
- const node = data[i]
- const key = node.key
- const title = node.title
- this.dataList.push({
- key,
- title: title
- })
- this.allTreeKeys.push(key)
- if (node.children) {
- this.generateList(node.children)
- }
- }
- },
-
- getTreeDataSouce(data) {
- data.forEach(item => {
- if (item.children && item.children.length > 0) {
- this.getTreeDataSouce(item.children)
- }
- item.key = item.equipmentId ? item.equipmentId : item.key
- item.value = item.equipmentId ? item.equipmentId : item.value
- })
- },
- expandAll() {
- this.expandedKeys = this.allTreeKeys
- },
- closeAll() {
- this.expandedKeys = ['-1']
- },
- refreshTree() {
- this.queryTreeData(this.selectedWorkshopIds)
- },
- onCheck(value, obj) {
- this.checkedKeys = value
- this.deviceNodes = obj.checkedNodes.filter(item => item.data.props.equipmentId).map(item => item.data.props.equipmentId)
- },
- handleCancel() {
- this.visible = false
- },
- handleOk() {
- this.$emit('selectFinished', this.deviceNodes)
- this.visible = false
- }
-
- }
- }
-</script>
-<style lang="less" scoped>
- /deep/ .ant-modal {
- /*transform-origin: 337px 50px;*/
- }
-
- .ant-card-body .table-operator {
- margin-bottom: 18px;
- }
-
- .ant-table-tbody .ant-table-row td {
- padding-top: 15px;
- padding-bottom: 15px;
- }
-
- .anty-row-operator button {
- margin: 0 5px
- }
-
- .ant-btn-danger {
- background-color: #ffffff
- }
-
- .ant-modal-cust-warp {
- height: 100%
- }
-
- .ant-modal-cust-warp .ant-modal-body {
- height: calc(100% - 110px) !important;
- overflow-y: auto
- }
-
- .ant-modal-cust-warp .ant-modal-content {
- height: 90% !important;
- overflow-y: hidden
- }
-
- .drawer-bottom-button {
- position: absolute;
- bottom: 0;
- width: 100%;
- border-top: 1px solid #e8e8e8;
- padding: 10px 16px;
- text-align: right;
- left: 0;
- background: #fff;
- border-radius: 0 0 2px 2px;
- }
-</style>
\ No newline at end of file
diff --git a/src/views/system/modules/UserModal.vue b/src/views/system/modules/UserModal.vue
index a497293..8f3883f 100644
--- a/src/views/system/modules/UserModal.vue
+++ b/src/views/system/modules/UserModal.vue
@@ -334,11 +334,11 @@
</a-button>
</div>
- <select-device-modal
- ref="selectDeviceModal"
- @selectFinished="selectOK"
- :title="'閫夋嫨璁惧'"
- />
+<!-- <select-device-modal-->
+<!-- ref="selectDeviceModal"-->
+<!-- @selectFinished="selectOK"-->
+<!-- :title="'閫夋嫨璁惧'"-->
+<!-- />-->
</a-drawer>
</template>
@@ -353,12 +353,12 @@
import JSelectProduction from '../../../components/jeecgbiz/JSelectProduction'
import { mapActions } from 'vuex'
import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
- import SelectDeviceModal from './SelectDeviceModal'
+ // import SelectDeviceModal from './SelectDeviceModal'
export default {
name: 'UserModal',
components: {
- SelectDeviceModal,
+ // SelectDeviceModal,
JSelectProduction
},
data() {
@@ -435,10 +435,10 @@
},
'model.selectedProduction': {
handler(newVal, oldVal) {
- if (newVal && this.$refs.selectDeviceModal) {
+ if (newVal) {
// 濡傛灉杞﹂棿閫夋嫨鍓嶅悗涓嶄竴鑷村垯閲嶇疆閫夋嫨璁惧
if ((oldVal && newVal !== oldVal)) this.model.equipmentIds = ''
- this.$refs.selectDeviceModal.queryTreeData(newVal)
+ //this.$refs.selectDeviceModal.queryTreeData(newVal)
}
// 濡傛灉娓呯┖杞﹂棿鍊煎垯閲嶇疆閫夋嫨璁惧
if (newVal === '') this.model.equipmentIds = ''
@@ -792,10 +792,10 @@
},
deviceSearch() {
- this.$refs.selectDeviceModal.visible = true
- this.$refs.selectDeviceModal.selectedRowKeys = []
- this.$refs.selectDeviceModal.selectedRows = []
- this.$refs.selectDeviceModal.checkedKeys = this.model.equipmentIds ? this.model.equipmentIds.split(',') : []
+ //this.$refs.selectDeviceModal.visible = true
+ //this.$refs.selectDeviceModal.selectedRowKeys = []
+ //this.$refs.selectDeviceModal.selectedRows = []
+ //this.$refs.selectDeviceModal.checkedKeys = this.model.equipmentIds ? this.model.equipmentIds.split(',') : []
},
/**
--
Gitblit v1.9.3