From 345ca30ff9f623dc64e1af03fde456f63d18423a Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期六, 28 十月 2023 18:21:20 +0800 Subject: [PATCH] 三保 授权 二保 移交单修改 --- src/views/eam/modules/daily3MaintenanceOrder/EquipmentPrecisionCheckOrderModal.vue | 1 src/views/eam/DailyInspectionOrderList.vue | 46 src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue | 1 src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue | 9 src/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal.vue | 23 src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderModal.vue | 53 src/views/system/RoleUserList.vue | 999 ++++++++++++++++++------------- src/views/system/modules/UserRoleModalNew.vue | 245 +++++++ src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue | 137 +++ src/views/eam/modules/dailyInspectionStandard/JSelectDailylnspectionStandardModal.vue | 30 src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue | 1 src/views/eam/Daily3MaintenanceOrderList.vue | 2 src/views/eam/modules/daily3MaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue | 32 src/views/eam/modules/dailyInspectionStandard/DailyInspectionStandardDetail.vue | 30 src/views/eam/DailyMaintenanceOrderList.vue | 2 src/views/eam/modules/maintenanceCycle/MaintenanceCycleForm.vue | 35 src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderExeDrawer.vue | 38 src/views/eam/InspectionCycleList.vue | 68 +- src/views/eam/modules/dailyInspectionOrder/DailyInspectionStandardList.vue | 10 src/views/eam/modules/inspectionCycle/InspectionCycleForm.vue | 39 src/views/eam/MaintenanceCycleList.vue | 59 21 files changed, 1,170 insertions(+), 690 deletions(-) diff --git a/src/views/eam/Daily3MaintenanceOrderList.vue b/src/views/eam/Daily3MaintenanceOrderList.vue index 994a4fa..c08a5cc 100644 --- a/src/views/eam/Daily3MaintenanceOrderList.vue +++ b/src/views/eam/Daily3MaintenanceOrderList.vue @@ -606,7 +606,7 @@ handleOrderExe(record) { this.$refs.DailyMaintenanceOrderExeDrawer.visible = true - this.$refs.DailyMaintenanceOrderExeDrawer.title = '鏃ュ父淇濆吇宸ュ崟鎵ц' + this.$refs.DailyMaintenanceOrderExeDrawer.title = '涓夌骇淇濆吇宸ュ崟鎵ц' this.$refs.DailyMaintenanceOrderExeDrawer.handleShow(record) if (record.status === '3') { this.$refs.DailyMaintenanceOrderExeDrawer.buttonDistable = true//淇濆瓨銆佹殏瀛樸�佹姤宸� diff --git a/src/views/eam/DailyInspectionOrderList.vue b/src/views/eam/DailyInspectionOrderList.vue index 7d1fc8d..d94dec3 100644 --- a/src/views/eam/DailyInspectionOrderList.vue +++ b/src/views/eam/DailyInspectionOrderList.vue @@ -323,21 +323,21 @@ align: "center", dataIndex: 'statusName' }, - { - title: '鐐规鏃ユ湡', - align: "center", - dataIndex: 'inspectionDate', - customRender: function (text) { - return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text) - } - }, + // { + // title: '鐐规鏃ユ湡', + // align: "center", + // dataIndex: 'inspectionDate', + // customRender: function (text) { + // return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text) + // } + // }, { title: '鐐规鏃堕棿', align: "center", dataIndex: 'inspectionTime', - customRender: function (text) { - return !text ? "" : (text.length > 10 ? text.substr(11, 20) : text) - } + // customRender: function (text) { + // return !text ? "" : (text.length > 10 ? text.substr(11, 20) : text) + // } }, { title: '鎴鏃堕棿', @@ -369,18 +369,18 @@ align: "center", dataIndex: 'teamName' }, - { - title: '寮�宸ユ潯浠�', - align: "center", - dataIndex: 'startWorkCondition', - customRender: (text) => { - if (text == '1') { - return "鏄�"; - } else if (text == '0') { - return "鍚�"; - } - }, - }, + // { + // title: '寮�宸ユ潯浠�', + // align: "center", + // dataIndex: 'startWorkCondition', + // customRender: (text) => { + // if (text == '1') { + // return "鏄�"; + // } else if (text == '0') { + // return "鍚�"; + // } + // }, + // }, { title: '鐐规鏍囧噯缂栫爜', align: "center", diff --git a/src/views/eam/DailyMaintenanceOrderList.vue b/src/views/eam/DailyMaintenanceOrderList.vue index d9790a7..3d0edaf 100644 --- a/src/views/eam/DailyMaintenanceOrderList.vue +++ b/src/views/eam/DailyMaintenanceOrderList.vue @@ -503,7 +503,7 @@ handleOrderExe(record) { this.$refs.DailyMaintenanceOrderExeDrawer.visible = true - this.$refs.DailyMaintenanceOrderExeDrawer.title = '鏃ュ父淇濆吇宸ュ崟鎵ц' + this.$refs.DailyMaintenanceOrderExeDrawer.title = '浜岀骇淇濆吇宸ュ崟鎵ц' this.$refs.DailyMaintenanceOrderExeDrawer.handleShow(record) if (record.status === '3') { this.$refs.DailyMaintenanceOrderExeDrawer.buttonDistable = true//淇濆瓨銆佹殏瀛樸�佹姤宸� diff --git a/src/views/eam/InspectionCycleList.vue b/src/views/eam/InspectionCycleList.vue index 4fa75de..e1d149b 100644 --- a/src/views/eam/InspectionCycleList.vue +++ b/src/views/eam/InspectionCycleList.vue @@ -206,16 +206,6 @@ }, }, { - title: '鐗堟湰', - align: 'center', - dataIndex: 'version', - }, - { - title: '鐗堟湰鐘舵��', - align: 'center', - dataIndex: 'versionStatusName', - }, - { title: '鍛ㄦ湡缂栫爜', align: 'center', dataIndex: 'code', @@ -267,35 +257,45 @@ dataIndex: 'unitName', }, { - title: '璋冩暣鏂瑰紡', + title: '鐗堟湰', align: 'center', - dataIndex: 'arrangeWayName', + dataIndex: 'version', }, { - title: '寮�宸ユ潯浠�', + title: '鐗堟湰鐘舵��', align: 'center', - dataIndex: 'startConditionName', + dataIndex: 'versionStatusName', }, - { - title: '閫炬湡澶勭悊鏂瑰紡', - align: 'center', - dataIndex: 'overdueDisposeModeName', - }, - { - title: '渚濇嵁鏃ュ巻', - align: 'center', - dataIndex: 'accordingCalendarName', - }, - { - title: '鐢熸晥鏃堕棿', - align: 'center', - dataIndex: 'takeEffectTime', - }, - { - title: '澶辨晥鏃堕棿', - align: 'center', - dataIndex: 'loseEfficacyTime', - }, + // { + // title: '璋冩暣鏂瑰紡', + // align: 'center', + // dataIndex: 'arrangeWayName', + // }, + // { + // title: '寮�宸ユ潯浠�', + // align: 'center', + // dataIndex: 'startConditionName', + // }, + // { + // title: '閫炬湡澶勭悊鏂瑰紡', + // align: 'center', + // dataIndex: 'overdueDisposeModeName', + // }, + // { + // title: '渚濇嵁鏃ュ巻', + // align: 'center', + // dataIndex: 'accordingCalendarName', + // }, + // { + // title: '鐢熸晥鏃堕棿', + // align: 'center', + // dataIndex: 'takeEffectTime', + // }, + // { + // title: '澶辨晥鏃堕棿', + // align: 'center', + // dataIndex: 'loseEfficacyTime', + // }, { title: '鍒涘缓浜�', align: 'center', diff --git a/src/views/eam/MaintenanceCycleList.vue b/src/views/eam/MaintenanceCycleList.vue index 5883675..80c00f5 100644 --- a/src/views/eam/MaintenanceCycleList.vue +++ b/src/views/eam/MaintenanceCycleList.vue @@ -191,16 +191,7 @@ return parseInt(index) + 1 }, }, - { - title: '鐗堟湰', - align: 'center', - dataIndex: 'version', - }, - { - title: '鐗堟湰鐘舵��', - align: 'center', - dataIndex: 'versionStatusName', - }, + { title: '鍛ㄦ湡缂栫爜', align: 'center', @@ -252,30 +243,40 @@ align: 'center', dataIndex: 'unitName', }, + // { + // title: '璋冩暣鏂瑰紡', + // align: 'center', + // dataIndex: 'arrangeWayName', + // }, + // { + // title: '閫炬湡澶勭悊鏂瑰紡', + // align: 'center', + // dataIndex: 'overdueDisposeModeName', + // }, + // { + // title: '渚濇嵁鏃ュ巻', + // align: 'center', + // dataIndex: 'accordingCalendarName', + // }, + // { + // title: '鐢熸晥鏃堕棿', + // align: 'center', + // dataIndex: 'takeEffectTime', + // }, + // { + // title: '澶辨晥鏃堕棿', + // align: 'center', + // dataIndex: 'loseEfficacyTime', + // }, { - title: '璋冩暣鏂瑰紡', + title: '鐗堟湰', align: 'center', - dataIndex: 'arrangeWayName', + dataIndex: 'version', }, { - title: '閫炬湡澶勭悊鏂瑰紡', + title: '鐗堟湰鐘舵��', align: 'center', - dataIndex: 'overdueDisposeModeName', - }, - { - title: '渚濇嵁鏃ュ巻', - align: 'center', - dataIndex: 'accordingCalendarName', - }, - { - title: '鐢熸晥鏃堕棿', - align: 'center', - dataIndex: 'takeEffectTime', - }, - { - title: '澶辨晥鏃堕棿', - align: 'center', - dataIndex: 'loseEfficacyTime', + dataIndex: 'versionStatusName', }, { title: '鍒涘缓浜�', diff --git a/src/views/eam/modules/daily3MaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue b/src/views/eam/modules/daily3MaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue index 0070563..ec52559 100644 --- a/src/views/eam/modules/daily3MaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue +++ b/src/views/eam/modules/daily3MaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue @@ -348,7 +348,7 @@ }, data() { return { - title: "鏃ュ父淇濆吇宸ュ崟鎵ц", + title: "涓夌骇淇濆吇宸ュ崟鎵ц", visible: false, maskClosable: true, confirmLoading: false, @@ -422,26 +422,26 @@ // align: 'center', // dataIndex: 'maintenanceTool', // }, - { - title: '瀹夊叏瑕佹眰', - align: 'center', - dataIndex: 'maintenanceRequire', - }, - { - title: '宸ユ椂瀹氶锛堝皬鏃讹級', - align: 'center', - dataIndex: 'workingHourQuota', - }, + // { + // title: '瀹夊叏瑕佹眰', + // align: 'center', + // dataIndex: 'maintenanceRequire', + // }, + // { + // title: '宸ユ椂瀹氶锛堝皬鏃讹級', + // align: 'center', + // dataIndex: 'workingHourQuota', + // }, { title: '淇濆吇鍛ㄦ湡', align: 'center', dataIndex: 'maintenanceCycleName', }, - { - title: '缁翠繚涓撲笟', - align: 'center', - dataIndex: 'maintenanceSpecialtyName', - }, + // { + // title: '缁翠繚涓撲笟', + // align: 'center', + // dataIndex: 'maintenanceSpecialtyName', + // }, { title: '淇濆吇浜�', align: 'center', diff --git a/src/views/eam/modules/daily3MaintenanceOrder/EquipmentPrecisionCheckOrderModal.vue b/src/views/eam/modules/daily3MaintenanceOrder/EquipmentPrecisionCheckOrderModal.vue index f865e11..35c64b4 100644 --- a/src/views/eam/modules/daily3MaintenanceOrder/EquipmentPrecisionCheckOrderModal.vue +++ b/src/views/eam/modules/daily3MaintenanceOrder/EquipmentPrecisionCheckOrderModal.vue @@ -78,6 +78,7 @@ rowKey='id' :columns="columns" :dataSource="dataSource" + :pagination="false" > <template v-for="col in columns" diff --git a/src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderExeDrawer.vue b/src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderExeDrawer.vue index e5a0ffc..5658db1 100644 --- a/src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderExeDrawer.vue +++ b/src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderExeDrawer.vue @@ -129,7 +129,7 @@ :pagination="ipagination" :loading="loading" @change="handleTableChange" - :scroll="{ x: 'calc(1200px + 50%)', y: 900 }" + :scroll="{ x: 'calc(1000px + 50%)', y: 900 }" > <template v-for="col in columns" @@ -159,6 +159,8 @@ <!-- :options="record.inspectionCycles" --> <a-select-option value="1">姝e父</a-select-option> <a-select-option value="2">寮傚父</a-select-option> + <a-select-option value="3">鏁呴殰鍋滄満</a-select-option> + <a-select-option value="4">娌″紑鏈�</a-select-option> </a-select> <a-input-number :value="text" @@ -361,28 +363,28 @@ align: 'center', dataIndex: 'detectionStandard', }, - { - title: '鍚堟牸鑼冨洿', - align: 'center', - dataIndex: 'acceptabilityLimit', - }, - { - title: '鏂规硶', - align: 'center', - dataIndex: 'inspectionMethod_dictText', - }, - { - title: '宸ュ叿', - align: 'center', - dataIndex: 'inspectionTool', - }, + // { + // title: '鍚堟牸鑼冨洿', + // align: 'center', + // dataIndex: 'acceptabilityLimit', + // }, + // { + // title: '鏂规硶', + // align: 'center', + // dataIndex: 'inspectionMethod_dictText', + // }, + // { + // title: '宸ュ叿', + // align: 'center', + // dataIndex: 'inspectionTool', + // }, { title: '*鐐规缁撴灉', align: 'center', dataIndex: 'inspectionProjectResult', scopedSlots: { customRender: 'inspectionProjectResult' }, - className: 'red', }, + // className: 'red', { title: '鍒ゅ畾', align: 'center', @@ -411,9 +413,9 @@ title: '*寮傚父澶勭疆', align: 'center', dataIndex: 'treatmentMeasure', - className: 'red', scopedSlots: { customRender: 'treatmentMeasure' }, }, + // className: 'red', ], url: { list: "/eam/inspectionOrderDetail/list", diff --git a/src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderModal.vue b/src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderModal.vue index a21d64d..ac7eaa1 100644 --- a/src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderModal.vue +++ b/src/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderModal.vue @@ -26,7 +26,7 @@ /> </a-form-item> </a-col> - <a-col :span="12"> + <!-- <a-col :span="12"> <a-form-item label="寮�宸ユ潯浠�" :labelCol="labelCol" @@ -40,7 +40,7 @@ @change="handle2Switch(model.startWorkCondition)" /> </a-form-item> - </a-col> + </a-col> --> </a-row> <a-row :gutter="24"> <a-col :span="12"> @@ -386,28 +386,28 @@ { title: '鐐规椤圭洰', align: 'center', - dataIndex: 'inspectionProjectNum' + dataIndex: 'inspectionProjectName' }, { title: '妫�娴嬫爣鍑�', align: 'center', dataIndex: 'detectionStandard' }, - { - title: '鍚堟牸鑼冨洿', - align: 'center', - dataIndex: 'acceptabilityLimit' - }, - { - title: '鏂规硶', - align: 'center', - dataIndex: 'inspectionMethodName' - }, - { - title: '宸ュ叿', - align: 'center', - dataIndex: 'inspectionTool' - }, + // { + // title: '鍚堟牸鑼冨洿', + // align: 'center', + // dataIndex: 'acceptabilityLimit' + // }, + // { + // title: '鏂规硶', + // align: 'center', + // dataIndex: 'inspectionMethodName' + // }, + // { + // title: '宸ュ叿', + // align: 'center', + // dataIndex: 'inspectionTool' + // }, { title: '绀烘剰鍥�', align: "center", @@ -489,7 +489,8 @@ methods: { add() { - this.edit({ startWorkCondition: "1", inspectionOrderDetails: [] }) + this.edit({ inspectionOrderDetails: [] }) + // this.edit({ startWorkCondition: "1", inspectionOrderDetails: [] }) this.getSeq() }, @@ -602,13 +603,13 @@ // } // }, - handle2Switch(startWorkCondition) { - if ('1' == startWorkCondition) { - this.model.startWorkCondition = '0' - } else { - this.model.startWorkCondition = '1' - } - }, + // handle2Switch(startWorkCondition) { + // if ('1' == startWorkCondition) { + // this.model.startWorkCondition = '0' + // } else { + // this.model.startWorkCondition = '1' + // } + // }, // handle2Change(val) { // this.inspectionCycles = []; diff --git a/src/views/eam/modules/dailyInspectionOrder/DailyInspectionStandardList.vue b/src/views/eam/modules/dailyInspectionOrder/DailyInspectionStandardList.vue index 22932f2..71d9fd1 100644 --- a/src/views/eam/modules/dailyInspectionOrder/DailyInspectionStandardList.vue +++ b/src/views/eam/modules/dailyInspectionOrder/DailyInspectionStandardList.vue @@ -160,11 +160,6 @@ dataIndex: 'num', }, { - title: '鐗堟湰', - align: 'center', - dataIndex: 'version', - }, - { title: '璁惧缂栫爜', align: 'center', dataIndex: 'equipmentNum', @@ -189,6 +184,11 @@ align: "center", dataIndex: 'useDepartName' }, + { + title: '鐗堟湰', + align: 'center', + dataIndex: 'version', + }, ], url: { list: "/eam/inspectionStandard/findInspectionStandardList", diff --git a/src/views/eam/modules/dailyInspectionStandard/DailyInspectionStandardDetail.vue b/src/views/eam/modules/dailyInspectionStandard/DailyInspectionStandardDetail.vue index ccdcd82..d9aca3e 100644 --- a/src/views/eam/modules/dailyInspectionStandard/DailyInspectionStandardDetail.vue +++ b/src/views/eam/modules/dailyInspectionStandard/DailyInspectionStandardDetail.vue @@ -127,23 +127,23 @@ dataIndex: 'detectionStandard', }, - { - title: '鍚堟牸鑼冨洿', - align: "center", - dataIndex: 'acceptabilityLimit', + // { + // title: '鍚堟牸鑼冨洿', + // align: "center", + // dataIndex: 'acceptabilityLimit', - }, - { - title: '鏂规硶', - align: "center", - dataIndex: 'inspectionMethodName', + // }, + // { + // title: '鏂规硶', + // align: "center", + // dataIndex: 'inspectionMethodName', - }, - { - title: '宸ュ叿', - align: "center", - dataIndex: 'inspectionTool', - }, + // }, + // { + // title: '宸ュ叿', + // align: "center", + // dataIndex: 'inspectionTool', + // }, { title: '鍛ㄦ湡', align: "center", diff --git a/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue b/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue index f4cdf85..2100db5 100644 --- a/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue +++ b/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue @@ -201,6 +201,7 @@ rowKey='id' :columns="columns" :dataSource="dataSource" + :pagination="false" > <template v-for="col in columns" diff --git a/src/views/eam/modules/dailyInspectionStandard/JSelectDailylnspectionStandardModal.vue b/src/views/eam/modules/dailyInspectionStandard/JSelectDailylnspectionStandardModal.vue index 85611d4..c5f352f 100644 --- a/src/views/eam/modules/dailyInspectionStandard/JSelectDailylnspectionStandardModal.vue +++ b/src/views/eam/modules/dailyInspectionStandard/JSelectDailylnspectionStandardModal.vue @@ -101,21 +101,21 @@ align: 'center', dataIndex: 'detectionStandard' }, - { - title: '鍚堟牸鑼冨洿', - align: 'center', - dataIndex: 'acceptabilityLimit' - }, - { - title: '鏂规硶', - align: 'center', - dataIndex: 'inspectionMethod_dictText' - }, - { - title: '宸ュ叿', - align: 'center', - dataIndex: 'inspectionTool' - }, + // { + // title: '鍚堟牸鑼冨洿', + // align: 'center', + // dataIndex: 'acceptabilityLimit' + // }, + // { + // title: '鏂规硶', + // align: 'center', + // dataIndex: 'inspectionMethod_dictText' + // }, + // { + // title: '宸ュ叿', + // align: 'center', + // dataIndex: 'inspectionTool' + // }, // { // title: '鍛ㄦ湡', // align: 'center', diff --git a/src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue b/src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue index 1e3fb34..bacf158 100644 --- a/src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue +++ b/src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue @@ -152,7 +152,7 @@ <template v-for="col in columns" :slot="col.dataIndex" - slot-scope='text, record' + slot-scope='text, record, index' > <div :key="col.dataIndex"> <span @@ -192,11 +192,39 @@ 棰勮 </a> --> + <a-input + :value="text" + v-if="col.dataIndex == 'maintenanceOrderDetailUda1'" + @change="(e)=>handleChange(e, record.key, col, index)" + placeholder="璇疯緭鍏ヤ繚鍏讳汉" + /> + <a-input + :value="text" + v-if="col.dataIndex == 'maintenanceOrderDetailUda2'" + @change="(e)=>handleChange(e, record.key, col, index)" + placeholder="璇疯緭鍏ユ墽琛屾儏鍐�" + /> </div> - </template> - </a-table> + <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> + <a-row :style="{textAlign:'right'}"> + <a-button + :style="{marginRight: '8px'}" + @click="handleCancel" + > + 鍙栨秷 + </a-button> + <a-button + @click="handleOk()" + type="primary" + :disabled="this.model.status!='4'" + :loading="confirmLoading" + >淇濆瓨</a-button> + </a-row> + <!-- v-has="'dailyMaintenanceOrder:actualWorkHoursSave'" --> + <!-- :disabled="false" --> + </div> </div> </a-tab-pane> @@ -297,7 +325,7 @@ <script> import { JeecgListMixin } from '@/mixins/JeecgListMixin' -import { requestPut, getAction, downFile } from '@/api/manage' +import { requestPut, getAction, downFile, postAction } from '@/api/manage' import Tooltip from 'ant-design-vue/es/tooltip' import { preview } from 'vue-photo-preview' @@ -327,7 +355,7 @@ }, data() { return { - title: "鏃ュ父淇濆吇宸ュ崟鎵ц", + title: "浜岀骇淇濆吇宸ュ崟鎵ц", visible: false, maskClosable: true, confirmLoading: false, @@ -339,6 +367,7 @@ maintenanceStandardId: '-1', dataSource: [], model: {}, + form: this.$form.createForm(this), labelCol: { xs: { span: 24 }, sm: { span: 6 }, @@ -389,35 +418,49 @@ align: 'center', dataIndex: 'standard', }, - { - title: '鏂规硶', - align: 'center', - dataIndex: 'maintenanceMethodName', - }, - { - title: '宸ュ叿', - align: 'center', - dataIndex: 'maintenanceTool', - }, - { - title: '瀹夊叏瑕佹眰', - align: 'center', - dataIndex: 'maintenanceRequire', - }, - { - title: '宸ユ椂瀹氶锛堝皬鏃讹級', - align: 'center', - dataIndex: 'workingHourQuota', - }, + // { + // title: '鏂规硶', + // align: 'center', + // dataIndex: 'maintenanceMethodName', + // }, + // { + // title: '宸ュ叿', + // align: 'center', + // dataIndex: 'maintenanceTool', + // }, + // { + // title: '瀹夊叏瑕佹眰', + // align: 'center', + // dataIndex: 'maintenanceRequire', + // }, + // { + // title: '宸ユ椂瀹氶锛堝皬鏃讹級', + // align: 'center', + // dataIndex: 'workingHourQuota', + // }, { title: '淇濆吇鍛ㄦ湡', align: 'center', dataIndex: 'maintenanceCycleName', }, + // { + // title: '缁翠繚涓撲笟', + // align: 'center', + // dataIndex: 'maintenanceSpecialtyName', + // }, { - title: '缁翠繚涓撲笟', + title: '鎵ц鎯呭喌', align: 'center', - dataIndex: 'maintenanceSpecialtyName', + dataIndex: 'maintenanceOrderDetailUda2', + width: 200, + scopedSlots: { customRender: 'maintenanceOrderDetailUda2' }, + }, + { + title: '淇濆吇浜�', + align: 'center', + dataIndex: 'maintenanceOrderDetailUda1', + width: 200, + scopedSlots: { customRender: 'maintenanceOrderDetailUda1' }, }, ], url: { @@ -427,6 +470,7 @@ editStatus: "/eam/dailyMaintenanceOrder/editStatus", revocation: "/eam/dailyMaintenanceOrder/revocation", report: "/eam/dailyMaintenanceOrder/report", + edit: "/eam/dailyMaintenanceOrderDetail/edit" }, } }, @@ -587,7 +631,46 @@ }, //淇濆瓨 handleOk() { + const that = this + this.loading = true; + this.form.validateFields((err, values) => { + if (!err) { + that.confirmLoading = true + let formData = {} + formData.dailyMaintenanceOrderDetails = that.dataSource; + let obj = obj = postAction(this.url.edit, formData) + 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.loadData1(); + this.loading = false; + }) + } + }) + }, + + handleChange(value, key, column, index) { + debugger + let that = this; + const temp = [...that.dataSource]; + const target = temp[index]; + if (target) { + target[column.dataIndex] = value; + if ('maintenanceOrderDetailUda1' == column.dataIndex) { + target['maintenanceOrderDetailUda1'] = value.target.value; + } + if ('maintenanceOrderDetailUda2' == column.dataIndex) { + target['maintenanceOrderDetailUda2'] = value.target.value; + } + that.dataSource = temp; + } }, view(record) { diff --git a/src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue b/src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue index 13d9c64..ae05671 100644 --- a/src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue +++ b/src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue @@ -78,6 +78,7 @@ rowKey='id' :columns="columns" :dataSource="dataSource" + :pagination="false" > </a-table> @@ -190,7 +191,7 @@ { title: '绫诲瀷', align: 'center', - dataIndex: 'maintenanceMethod1' + dataIndex: 'maintenanceRole' }, { @@ -201,7 +202,7 @@ { title: '淇濆吇椤圭洰', align: 'center', - dataIndex: 'maintenanceProjectNum' + dataIndex: 'maintenanceProjectName' }, { title: '淇濆吇鏍囧噯', @@ -211,12 +212,12 @@ { title: '鎵ц鎯呭喌', align: 'center', - dataIndex: 'maintenanceTool1' + dataIndex: 'maintenanceOrderDetailUda2' }, { title: '鎵ц浜�', align: 'center', - dataIndex: 'photo1', + dataIndex: 'maintenanceOrderDetailUda1', }, ], diff --git a/src/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal.vue b/src/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal.vue index a199f59..59a3e8a 100644 --- a/src/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal.vue +++ b/src/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal.vue @@ -298,6 +298,7 @@ rowKey='id' :columns="columns" :dataSource="dataSource" + :pagination="false" > <!-- <span slot="photo" @@ -431,23 +432,23 @@ { title: '淇濆吇椤圭洰', align: 'center', - dataIndex: 'maintenanceProjectNum' + dataIndex: 'maintenanceProjectName' }, { title: '淇濆吇鏍囧噯', align: 'center', dataIndex: 'standard' }, - { - title: '鏂规硶', - align: 'center', - dataIndex: 'maintenanceMethod' - }, - { - title: '宸ュ叿', - align: 'center', - dataIndex: 'maintenanceTool' - }, + // { + // title: '鏂规硶', + // align: 'center', + // dataIndex: 'maintenanceMethod' + // }, + // { + // title: '宸ュ叿', + // align: 'center', + // dataIndex: 'maintenanceTool' + // }, { title: '绀烘剰鍥�', align: 'center', diff --git a/src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue b/src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue index 07c1959..f8a4047 100644 --- a/src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue +++ b/src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue @@ -263,6 +263,7 @@ rowKey='id' :columns="columns" :dataSource="dataSource" + :pagination="false" > <template v-for="col in columns" diff --git a/src/views/eam/modules/inspectionCycle/InspectionCycleForm.vue b/src/views/eam/modules/inspectionCycle/InspectionCycleForm.vue index 4ce46b9..fbfa3a4 100644 --- a/src/views/eam/modules/inspectionCycle/InspectionCycleForm.vue +++ b/src/views/eam/modules/inspectionCycle/InspectionCycleForm.vue @@ -122,6 +122,20 @@ </a-col> <a-col :span="24/2"> <a-form-model-item + label="鐗堟湰" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="version" + > + <a-input + v-model="model.version" + placeholder="璇疯緭鍏ョ増鏈彿" + :disabled=true + ></a-input> + </a-form-model-item> + </a-col> + <!-- <a-col :span="24/2"> + <a-form-model-item label="寮�宸ユ潯浠�" :labelCol="labelCol" :wrapperCol="wrapperCol" @@ -134,9 +148,9 @@ v-model="model.startCondition" /> </a-form-model-item> - </a-col> + </a-col> --> </a-row> - <a-row> + <!-- <a-row> <a-col :span="24/2"> <a-form-model-item label="璋冩暣鏂瑰紡" @@ -167,9 +181,9 @@ /> </a-form-model-item> </a-col> - </a-row> + </a-row> --> <a-row> - <a-col :span="24/2"> + <!-- <a-col :span="24/2"> <a-form-model-item label="渚濇嵁鏃ュ巻" :labelCol="labelCol" @@ -183,21 +197,8 @@ v-model="model.accordingCalendar" /> </a-form-model-item> - </a-col> - <a-col :span="24/2"> - <a-form-model-item - label="鐗堟湰" - :labelCol="labelCol" - :wrapperCol="wrapperCol" - prop="version" - > - <a-input - v-model="model.version" - placeholder="璇疯緭鍏ョ増鏈彿" - :disabled=true - ></a-input> - </a-form-model-item> - </a-col> + </a-col> --> + </a-row> <a-row> diff --git a/src/views/eam/modules/maintenanceCycle/MaintenanceCycleForm.vue b/src/views/eam/modules/maintenanceCycle/MaintenanceCycleForm.vue index d03e5f3..ca8060e 100644 --- a/src/views/eam/modules/maintenanceCycle/MaintenanceCycleForm.vue +++ b/src/views/eam/modules/maintenanceCycle/MaintenanceCycleForm.vue @@ -121,6 +121,20 @@ </a-col> <a-col :span="24/2"> <a-form-model-item + label="鐗堟湰" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="version" + > + <a-input + v-model="model.version" + placeholder="璇疯緭鍏ョ増鏈彿" + :disabled=true + ></a-input> + </a-form-model-item> + </a-col> + <!-- <a-col :span="24/2"> + <a-form-model-item label="璋冩暣鏂瑰紡" :labelCol="labelCol" :wrapperCol="wrapperCol" @@ -133,9 +147,9 @@ v-model="model.arrangeWay" /> </a-form-model-item> - </a-col> + </a-col> --> </a-row> - <a-row> + <!-- <a-row> <a-col :span="24/2"> <a-form-model-item label="閫炬湡澶勭悊鏂瑰紡" @@ -166,7 +180,7 @@ /> </a-form-model-item> </a-col> - </a-row> + </a-row> --> <a-row> <a-col :span="24/2"> <a-form-item @@ -203,20 +217,7 @@ </a-col> </a-row> <a-row> - <a-col :span="24/2"> - <a-form-model-item - label="鐗堟湰" - :labelCol="labelCol" - :wrapperCol="wrapperCol" - prop="version" - > - <a-input - v-model="model.version" - placeholder="璇疯緭鍏ョ増鏈彿" - :disabled=true - ></a-input> - </a-form-model-item> - </a-col> + <a-col v-if=" model.isRevise == true" :span="24/2" diff --git a/src/views/system/RoleUserList.vue b/src/views/system/RoleUserList.vue index cb70ae8..d6c78cb 100644 --- a/src/views/system/RoleUserList.vue +++ b/src/views/system/RoleUserList.vue @@ -1,15 +1,32 @@ <template> <a-row :gutter="10"> - <a-col :md="leftColMd" :sm="24" style="margin-bottom: 20px"> + <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-form + layout="inline" + @keyup.enter.native="searchQuery" + > <a-row :gutter="24"> - <a-col :md="12" :sm="8"> - <a-form-item label="瑙掕壊鍚嶇О" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}"> - <a-input placeholder="" v-model="queryParam.roleName"></a-input> + <a-col + :md="12" + :sm="8" + > + <a-form-item + label="瑙掕壊鍚嶇О" + :labelCol="{span: 5}" + :wrapperCol="{span: 18, offset: 1}" + > + <a-input + placeholder="" + v-model="queryParam.roleName" + ></a-input> </a-form-item> </a-col> <!-- @@ -21,29 +38,72 @@ </a-form-item> </a-col> --> - <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> - <a-col :md="12" :sm="24"> - <a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 21px">鏌ヨ</a-button> - <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> - </a-col> - </span> + <span + style="float: left;overflow: hidden;" + class="table-page-search-submitButtons" + > + <a-col + :md="12" + :sm="24" + > + <a-button + type="primary" + @click="searchQuery" + icon="search" + style="margin-left: 21px" + >鏌ヨ</a-button> + <a-button + type="primary" + @click="searchReset" + icon="reload" + style="margin-left: 8px" + >閲嶇疆</a-button> + </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 + class="table-operator" + style="margin: 5px 0 10px 2px" + > + <a-button + @click="handleAdd" + type="primary" + icon="plus" + >鏂板缓瑙掕壊</a-button> <!--<a-button @click="handleEdit(model1)" 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 + name="file" + :showUploadList="false" + :multiple="false" + :headers="tokenHeader" + :action="importExcelUrl" + @change="handleImportExcel" + > + <a-button + type="primary" + icon="import" + >瀵煎叆</a-button> </a-upload> - <a-button type="primary" icon="download" @click="handleExportXls('瑙掕壊绠$悊')">瀵煎嚭</a-button> + <a-button + type="primary" + icon="download" + @click="handleExportXls('瑙掕壊绠$悊')" + >瀵煎嚭</a-button> </div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> + <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> + <a + style="margin-left: 24px" + @click="onClearSelected1" + >娓呯┖</a> </div> <div style="margin-top: 15px"> @@ -58,86 +118,149 @@ :pagination="ipagination" :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type:'radio'}" - @change="handleTableChange"> - <span slot="action" slot-scope="text, record"> - <a @click="handleOpen(record)">鐢ㄦ埛</a> - <a-divider type="vertical"/> + @change="handleTableChange" + > + <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="handlePerssion(record.id)">鎺堟潈</a> - </a-menu-item> - <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-dropdown> + <a class="ant-dropdown-link"> + 鏇村 <a-icon type="down" /> + </a> + <a-menu slot="overlay"> + <a-menu-item> + <a @click="handlePerssion(record.id)">鎺堟潈</a> + </a-menu-item> + <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> <!-- 鍙充晶鐨勮鑹叉潈闄愰厤缃� --> - <user-role-modal ref="modalUserRole"></user-role-modal> - <role-modal ref="modalForm" @ok="modalFormOk"></role-modal> + <!-- <user-role-modal ref="modalUserRole"></user-role-modal> --> + <user-role-modal-new ref="modalUserRole"></user-role-modal-new> + <role-modal + ref="modalForm" + @ok="modalFormOk" + ></role-modal> </a-card> </a-col> - <a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 1"> + <a-col + :md="rightColMd" + :sm="24" + v-if="this.rightcolval == 1" + > <a-card :bordered="false"> <div style="text-align: right;"> - <a-icon type="close-circle" @click="hideUserList" /> + <a-icon + type="close-circle" + @click="hideUserList" + /> </div> <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> <a-form layout="inline"> <a-row :gutter="24"> - <a-col :md="12" :sm="12"> + <a-col + :md="12" + :sm="12" + > <a-form-item label="鐢ㄦ埛璐﹀彿"> - <a-input placeholder="" v-model="queryParam2.username"></a-input> + <a-input + placeholder="" + v-model="queryParam2.username" + ></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> + <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-col> + </span> </a-row> </a-form> </div> <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <div class="table-operator" :md="24" :sm="24"> - <a-button @click="handleAdd2" type="primary" icon="plus" style="margin-top: 16px">鏂板鐢ㄦ埛</a-button> + <div + class="table-operator" + :md="24" + :sm="24" + > + <a-button + @click="handleAdd2" + type="primary" + icon="plus" + style="margin-top: 16px" + >鏂板鐢ㄦ埛</a-button> <!--<a-button @click="handleEdit2" type="primary" icon="edit" style="margin-top: 16px">鐢ㄦ埛缂栬緫</a-button>--> - <a-button @click="handleAddUserRole" type="primary" icon="plus" style="margin-top: 16px">宸叉湁鐢ㄦ埛</a-button> + <a-button + @click="handleAddUserRole" + type="primary" + icon="plus" + style="margin-top: 16px" + >宸叉湁鐢ㄦ埛</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 + key="1" + @click="batchDel2" + > + <a-icon type="delete" /> 鍒犻櫎 </a-menu-item> </a-menu> <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 - <a-icon type="down"/> + <a-icon type="down" /> </a-button> </a-dropdown> </div> <!-- table鍖哄煙-begin --> <div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> + <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> + <a + style="margin-left: 24px" + @click="onClearSelected2" + >娓呯┖</a> </div> <a-table style="height:500px" @@ -150,399 +273,417 @@ :pagination="ipagination2" :loading="loading2" :rowSelection="{selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2}" - @change="handleTableChange2"> - <span slot="action" slot-scope="text, record"> - <a @click="handleEdit2(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-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete2(record.id)"> - <a>鍒犻櫎</a> - </a-popconfirm> - </a-menu-item> - </a-menu> - </a-dropdown> - </span> + @change="handleTableChange2" + > + <span + slot="action" + slot-scope="text, record" + > + <a @click="handleEdit2(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-popconfirm + title="纭畾鍒犻櫎鍚�?" + @confirm="() => handleDelete2(record.id)" + > + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> + </span> </a-table> </div> <!-- 琛ㄥ崟鍖哄煙 --> - <role-modal ref="modalForm" @ok="modalFormOk"></role-modal> - <user-modal ref="modalForm2" @ok="modalFormOk2"></user-modal> - <Select-User-Modal ref="selectUserModal" @selectFinished="selectOK"></Select-User-Modal> + <role-modal + ref="modalForm" + @ok="modalFormOk" + ></role-modal> + <user-modal + ref="modalForm2" + @ok="modalFormOk2" + ></user-modal> + <Select-User-Modal + ref="selectUserModal" + @selectFinished="selectOK" + ></Select-User-Modal> </a-card> </a-col> </a-row> </template> <script> - import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import { deleteAction, postAction, getAction } from '@/api/manage' - import SelectUserModal from './modules/SelectUserModal' - import RoleModal from './modules/RoleModal' - import UserModal from './modules/UserModal' - import { filterObj } from '@/utils/util' - import UserRoleModal from './modules/UserRoleModal' - import moment from 'moment' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import { deleteAction, postAction, getAction } from '@/api/manage' +import SelectUserModal from './modules/SelectUserModal' +import RoleModal from './modules/RoleModal' +import UserModal from './modules/UserModal' +import { filterObj } from '@/utils/util' +import UserRoleModal from './modules/UserRoleModal' +import moment from 'moment' +import UserRoleModalNew from './modules/UserRoleModalNew' - export default { - name: 'RoleUserList', - mixins: [JeecgListMixin], - components: { - UserRoleModal, - SelectUserModal, - RoleModal, - UserModal, - moment - }, - data() { - return { - model1: {}, - model2: {}, - currentRoleId: '', - queryParam1: {}, - queryParam2: {}, - dataSource1: [], - dataSource2: [], - ipagination1: { - current: 1, - pageSize: 10, - pageSizeOptions: ['10', '20', '30'], - showTotal: (total, range) => { - return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�' +export default { + name: 'RoleUserList', + mixins: [JeecgListMixin], + components: { + UserRoleModal, + SelectUserModal, + RoleModal, + UserModal, + moment, + UserRoleModalNew + }, + data() { + return { + model1: {}, + model2: {}, + currentRoleId: '', + 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: 'roleCode' }, - showQuickJumper: true, - showSizeChanger: true, - total: 0 - }, - ipagination2: { - current: 1, - pageSize: 10, - pageSizeOptions: ['10', '20', '30'], - showTotal: (total, range) => { - return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�' + { + title: '瑙掕壊鍚嶇О', + align: 'center', + dataIndex: 'roleName' }, - 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: 'roleCode' - }, - { - title: '瑙掕壊鍚嶇О', - align: 'center', - dataIndex: 'roleName' - }, - { - title: '鍒涘缓鏃堕棿', - dataIndex: 'createTime', - align:"center", - sorter: true, - customRender: (text) => { - return moment(text).format('YYYY-MM-DD') - } - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align: 'center', - scopedSlots: { customRender: 'action' } + { + title: '鍒涘缓鏃堕棿', + dataIndex: 'createTime', + align: "center", + sorter: true, + customRender: (text) => { + return moment(text).format('YYYY-MM-DD') } - ], - columns2: [{ - title: '鐢ㄦ埛璐﹀彿', - align: 'center', - dataIndex: 'username', - width: 120 - }, - { - title: '鐢ㄦ埛鍚嶇О', - align: 'center', - width: 100, - dataIndex: 'realname' }, - { - title: '鐘舵��', - align: 'center', - width: 80, - dataIndex: 'status_dictText' - }, - { title: '鎿嶄綔', dataIndex: 'action', - scopedSlots: { customRender: 'action' }, align: 'center', - width: 120 - }], - - // 楂樼骇鏌ヨ鍙傛暟 - superQueryParams2: '', - // 楂樼骇鏌ヨ鎷兼帴鏉′欢 - superQueryMatchType2: 'and', - url: { - list: '/sys/role/list', - delete: '/sys/role/delete', - list2: '/sys/user/userRoleList', - addUserRole: '/sys/user/addSysUserRole', - delete2: '/sys/user/deleteUserRole', - deleteBatch2: '/sys/user/deleteUserRoleBatch', - exportXlsUrl: 'sys/role/exportXls', - importExcelUrl: 'sys/role/importExcel' - } - } - }, - computed: { - importExcelUrl: function() { - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` - }, - 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]) - console.log(this.model1) - this.currentRoleId = selectedRowKeys[0] - this.loadData2() - }, - onClearSelected() { - }, - - 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 - }, - handleEdit2: function(record) { - this.$refs.modalForm2.title = '缂栬緫' - this.$refs.modalForm2.roleDisabled = true - this.$refs.modalForm2.edit(record) - }, - handleAdd2: function() { - if (this.currentRoleId == '') { - this.$message.error('璇烽�夋嫨涓�涓鑹�!') - } else { - this.$refs.modalForm2.roleDisabled = true - this.$refs.modalForm2.title = '鏂板' - this.$refs.modalForm2.edit({activitiSync:'1',userIdentity:1,selectedroles:this.currentRoleId}) - } - }, - 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.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 - + scopedSlots: { customRender: 'action' } } - this.loading2 = false - }) + ], + columns2: [{ + title: '鐢ㄦ埛璐﹀彿', + align: 'center', + dataIndex: 'username', + width: 120 + }, + { + title: '鐢ㄦ埛鍚嶇О', + align: 'center', + width: 100, + dataIndex: 'realname' + }, + { + title: '鐘舵��', + align: 'center', + width: 80, + dataIndex: 'status_dictText' + }, - }, - handleDelete1: function(id) { - this.handleDelete(id) - this.dataSource2 = [] - this.currentRoleId = '' - }, - handleDelete2: function(id) { - if (!this.url.delete2) { - this.$message.error('璇疯缃畊rl.delete2灞炴��!') - return + { + title: '鎿嶄綔', + dataIndex: 'action', + scopedSlots: { customRender: 'action' }, + align: 'center', + width: 120 + }], + + // 楂樼骇鏌ヨ鍙傛暟 + superQueryParams2: '', + // 楂樼骇鏌ヨ鎷兼帴鏉′欢 + superQueryMatchType2: 'and', + url: { + list: '/sys/role/list', + delete: '/sys/role/delete', + list2: '/sys/user/userRoleList', + addUserRole: '/sys/user/addSysUserRole', + delete2: '/sys/user/deleteUserRole', + deleteBatch2: '/sys/user/deleteUserRoleBatch', + exportXlsUrl: 'sys/role/exportXls', + importExcelUrl: 'sys/role/importExcel' + } + } + }, + computed: { + importExcelUrl: function () { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + }, + 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]) + console.log(this.model1) + this.currentRoleId = selectedRowKeys[0] + this.loadData2() + }, + onClearSelected() { + }, + + 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 + }, + handleEdit2: function (record) { + this.$refs.modalForm2.title = '缂栬緫' + this.$refs.modalForm2.roleDisabled = true + this.$refs.modalForm2.edit(record) + }, + handleAdd2: function () { + if (this.currentRoleId == '') { + this.$message.error('璇烽�夋嫨涓�涓鑹�!') + } else { + this.$refs.modalForm2.roleDisabled = true + this.$refs.modalForm2.title = '鏂板' + this.$refs.modalForm2.edit({ activitiSync: '1', userIdentity: 1, selectedroles: this.currentRoleId }) + } + }, + 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.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 + }) + + }, + handleDelete1: function (id) { + this.handleDelete(id) + this.dataSource2 = [] + this.currentRoleId = '' + }, + handleDelete2: function (id) { + if (!this.url.delete2) { + this.$message.error('璇疯缃畊rl.delete2灞炴��!') + return + } + var that = this + deleteAction(that.url.delete2, { roleId: this.currentRoleId, userId: id }).then((res) => { + if (res.success) { + that.$message.success(res.message) + that.loadData2() + } else { + that.$message.warning(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 - deleteAction(that.url.delete2, { roleId: this.currentRoleId, userId: id }).then((res) => { - if (res.success) { - that.$message.success(res.message) - that.loadData2() - } else { - that.$message.warning(res.message) + console.log(this.currentDeptId) + this.$confirm({ + title: '纭鍒犻櫎', + content: '鏄惁鍒犻櫎閫変腑鏁版嵁?', + onOk: function () { + deleteAction(that.url.deleteBatch2, { roleId: that.currentRoleId, userIds: ids }).then((res) => { + if (res.success) { + that.$message.success(res.message) + that.loadData2() + that.onClearSelected() + } else { + that.$message.warning(res.message) + } + }) } }) - }, - batchDel2: function() { + } + }, + selectOK(data) { + let params = {} + params.roleId = this.currentRoleId + params.userIdList = [] + for (var a = 0; a < data.length; a++) { + params.userIdList.push(data[a]) + } + console.log(params) + postAction(this.url.addUserRole, params).then((res) => { + if (res.success) { + this.loadData2() + this.$message.success(res.message) + } else { + this.$message.warning(res.message) + } + }) + }, - 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 - console.log(this.currentDeptId) - this.$confirm({ - title: '纭鍒犻櫎', - content: '鏄惁鍒犻櫎閫変腑鏁版嵁?', - onOk: function() { - deleteAction(that.url.deleteBatch2, { roleId: that.currentRoleId, userIds: ids }).then((res) => { - if (res.success) { - that.$message.success(res.message) - that.loadData2() - that.onClearSelected() - } else { - that.$message.warning(res.message) - } - }) - } - }) - } - }, - selectOK(data) { - let params = {} - params.roleId = this.currentRoleId - params.userIdList = [] - for (var a = 0; a < data.length; a++) { - params.userIdList.push(data[a]) - } - console.log(params) - postAction(this.url.addUserRole, params).then((res) => { - if (res.success) { - this.loadData2() - this.$message.success(res.message) - } else { - this.$message.warning(res.message) - } - }) - }, - - handleAddUserRole() { - if (this.currentRoleId == '') { - this.$message.error('璇烽�夋嫨涓�涓鑹�!') - } else { - this.$refs.selectUserModal.visible = true - } - }, - handleOpen(record) { - this.rightcolval = 1 - this.selectedRowKeys1 = [record.id] - this.model1 = Object.assign({}, record) - this.currentRoleId = record.id - this.onClearSelected2() - this.loadData2() - }, - /*handleEdit: function(record) { - if (this.currentRoleId == '') { - this.$message.error('璇烽�夋嫨涓�涓鑹�!') - } else { - this.$refs.modalForm.edit(record) - this.$refs.modalForm.title = '缂栬緫' - } - },*/ - 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 = [] - }, - handlePerssion(roleId){ - this.$refs.modalUserRole.show(roleId); - }, - } + handleAddUserRole() { + if (this.currentRoleId == '') { + this.$message.error('璇烽�夋嫨涓�涓鑹�!') + } else { + this.$refs.selectUserModal.visible = true + } + }, + handleOpen(record) { + this.rightcolval = 1 + this.selectedRowKeys1 = [record.id] + this.model1 = Object.assign({}, record) + this.currentRoleId = record.id + this.onClearSelected2() + this.loadData2() + }, + /*handleEdit: function(record) { + if (this.currentRoleId == '') { + this.$message.error('璇烽�夋嫨涓�涓鑹�!') + } else { + this.$refs.modalForm.edit(record) + this.$refs.modalForm.title = '缂栬緫' + } + },*/ + 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 = [] + }, + handlePerssion(roleId) { + this.$refs.modalUserRole.show(roleId); + }, } +} </script> <style scoped> - /** Button鎸夐挳闂磋窛 */ - .ant-btn { - margin-left: 8px - } +/** Button鎸夐挳闂磋窛 */ +.ant-btn { + margin-left: 8px; +} </style> \ No newline at end of file diff --git a/src/views/system/modules/UserRoleModalNew.vue b/src/views/system/modules/UserRoleModalNew.vue new file mode 100644 index 0000000..3ecb6ef --- /dev/null +++ b/src/views/system/modules/UserRoleModalNew.vue @@ -0,0 +1,245 @@ +<template> + <a-modal + :title="title" + :width="650" + :visible="visible" + :maskClosable="false" + :confirmLoading="confirmLoading" + @ok="handleOk" + cancelText="鍏抽棴" + @cancel="handleCancel" + > + <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> + </div> + + <template slot="footer"> + <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> + </template> + <role-datarule-modal ref="datarule"></role-datarule-modal> + </a-modal> + +</template> + +<script> +import { queryTreeListForRole, queryRolePermission, saveRolePermission } from '@/api/api' +import RoleDataruleModal from './RoleDataruleModal.vue' + +export default { + name: "RoleModal", + components: { + RoleDataruleModal + }, + data() { + return { + roleId: "", + treeData: [], + defaultCheckedKeys: [], + checkedKeys: [], + expandedKeysss: [], + allTreeKeys: [], + autoExpandParent: true, + checkStrictly: true, + 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.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; + console.log("璇锋眰鍙傛暟锛�", params); + saveRolePermission(params).then((res) => { + if (res.success) { + that.$message.success(res.message); + that.loading = false; + if (exit) { + that.close() + } + } else { + that.$message.error(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; + console.log(this.defaultCheckedKeys) + }) + }) + } + }, + 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> -- Gitblit v1.9.3