From fa6dc53472296228d1e56fb570dfb9472a00b927 Mon Sep 17 00:00:00 2001
From: “linengliang” <vanSuperEnergy@163.com>
Date: 星期三, 25 十月 2023 18:40:27 +0800
Subject: [PATCH] 数据权限
---
src/views/eam/modules/specialtyMaintenanceStandard/SpecialtyMaintenanceStandardModal.vue | 139 +++++++++++++++++++++++++--------------------
1 files changed, 77 insertions(+), 62 deletions(-)
diff --git a/src/views/eam/modules/specialtyMaintenanceStandard/SpecialtyMaintenanceStandardModal.vue b/src/views/eam/modules/specialtyMaintenanceStandard/SpecialtyMaintenanceStandardModal.vue
index 89c3c9c..9ead2db 100644
--- a/src/views/eam/modules/specialtyMaintenanceStandard/SpecialtyMaintenanceStandardModal.vue
+++ b/src/views/eam/modules/specialtyMaintenanceStandard/SpecialtyMaintenanceStandardModal.vue
@@ -1,7 +1,7 @@
<template>
<a-modal
:title="title"
- :width="1250"
+ :width="1500"
:visible="visible"
:maskClosable="false"
@ok="handleOk"
@@ -32,7 +32,7 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
>
- <a-input-search
+ <a-input-search
:disabled="disableSubmit"
placeholder="璇烽�夋嫨璁惧"
enter-button
@@ -42,14 +42,17 @@
/>
</a-form-item>
</a-col>
- <a-col :span="12" hidden >
+ <a-col
+ :span="12"
+ hidden
+ >
<!-- v-if="false" -->
<a-form-item
label="璁惧鍚嶇ОId"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
>
- <a-input
+ <a-input
:disabled="disableSubmit"
placeholder="璇烽�夋嫨璁惧鍚嶇ОId"
enter-button
@@ -79,15 +82,15 @@
<a-row :gutter="24">
<a-col :span="12">
<a-form-item
- label="瀵硅薄閮ㄩ棬"
+ label="浣跨敤閮ㄩ棬"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
>
- <j-dict-select-tag
+ <j-dict-select-tag
allow-clear
- :placeholder="disableSubmit?'':'璇烽�夋嫨瀵硅薄閮ㄩ棬'"
+ :placeholder="disableSubmit?'':'璇烽�夋嫨浣跨敤閮ㄩ棬'"
:triggerChange="true"
- :disabled = "true"
+ :disabled="true"
dictCode="sys_depart,depart_name,id"
v-decorator="['departId', validatorRules.departId]"
/>
@@ -196,8 +199,9 @@
v-if="col.dataIndex == 'location'"
:maxLength="500"
auto-size
- placeholder="璇疯緭鍏ヤ綅缃�"
+ placeholder="璇疯緭鍏ヤ繚鍏婚儴浣�"
@change="(e)=>handleChange(e, record.key, col, index)"
+ :disabled="true"
/>
<j-image-upload
:value="text"
@@ -226,7 +230,7 @@
slot="photo"
slot-scope="text,record"
> -->
- <!-- <Tooltip
+ <!-- <Tooltip
placement="top"
title="棰勮鍥剧墖"
>
@@ -347,24 +351,24 @@
dataIndex: 'standard',
width: 100,
},
- {
- title: '鏂规硶',
- align: 'center',
- dataIndex: 'maintenanceMethodName',
- width: 100,
- },
- {
- title: '宸ュ叿',
- align: 'center',
- dataIndex: 'maintenanceTool',
- width: 100,
- },
- {
- title: '缁翠繚涓撲笟',
- align: 'center',
- dataIndex: 'maintenanceSpecialtyName',
- width: 100,
- },
+ // {
+ // title: '鏂规硶',
+ // align: 'center',
+ // dataIndex: 'maintenanceMethodName',
+ // width: 100,
+ // },
+ // {
+ // title: '宸ュ叿',
+ // align: 'center',
+ // dataIndex: 'maintenanceTool',
+ // width: 100,
+ // },
+ // {
+ // title: '缁翠繚涓撲笟',
+ // align: 'center',
+ // dataIndex: 'maintenanceSpecialtyName',
+ // width: 100,
+ // },
{
title: '瀹夊叏瑕佹眰',
align: 'center',
@@ -386,7 +390,7 @@
width: 140,
},
{
- title: '閮ㄤ綅',
+ title: '淇濆吇閮ㄤ綅',
align: 'center',
dataIndex: 'location',
scopedSlots: { customRender: 'location' },
@@ -464,7 +468,7 @@
]
},
version: {
- rules: [
+ rules: [
{ required: true, message: '璇疯緭鍏ョ増鏈�!' },
]
},
@@ -478,7 +482,8 @@
getMaintenanceMode: "/eam/maintenanceStandardDetail/getMaintenanceMode",
realDelete: "/eam/maintenanceStandardDetail/realDelete",
revise: '/eam/maintenanceStandard/revise',
- getReviseVersion:"/eam/maintenanceStandard/getReviseVersion"
+ getReviseVersion: "/eam/maintenanceStandard/getReviseVersion",
+ getNum: '/eam/sysIdentity/getNumNew'
},
dataSource: [],
@@ -495,6 +500,7 @@
maintenanceProjectId: data[i].id,
name: data[i].name,
standard: data[i].standard,
+ location: data[i].location,
maintenanceMethodName: data[i].maintenanceMethod_dictText,
maintenanceTool: data[i].maintenanceTool,
maintenanceSpecialtyName: data[i].maintenanceSpecialtyId_dictText,
@@ -546,6 +552,7 @@
add() {
this.edit({ maintenanceStandardDetaillist: [] })
+ this.getSeq()
},
@@ -566,7 +573,7 @@
that.dataSource = temp;
}
that.$nextTick(() => {
- that.form.setFieldsValue(pick(that.model,'version', 'num', 'departId', 'teamId', 'equipmentId','equipmentName','remark'));
+ that.form.setFieldsValue(pick(that.model, 'version', 'num', 'departId', 'teamId', 'equipmentId', 'equipmentName', 'remark'));
});
if (record.id) {
that.codeDisable = true;
@@ -609,35 +616,35 @@
that.confirmLoading = false;
return
}
- for(var i = 0;i<that.dataSource.length;i++){
- if(that.dataSource[i].maintenanceRequire==null||that.dataSource[i].maintenanceRequire==undefined||that.dataSource[i].maintenanceRequire==''){
- this.$message.error("绗�"+(i+1)+"琛屽畨鍏ㄨ姹備负绌猴紝璇峰~鍐�")
- that.confirmLoading = false
- return false;
- }
- if(that.dataSource[i].photo==null||that.dataSource[i].photo==undefined||that.dataSource[i].photo==''){
- this.$message.error("绗�"+(i+1)+"琛岀ず鎰忓浘涓虹┖锛岃涓婁紶")
- that.confirmLoading = false
- return false;
- }
- if(that.dataSource[i].location==null||that.dataSource[i].location==undefined||that.dataSource[i].location==''){
- this.$message.error("绗�"+(i+1)+"琛岄儴浣嶄负绌猴紝璇峰~鍐�")
- that.confirmLoading = false
- return false;
- }
- if(that.dataSource[i].maintenanceCycleId==null||that.dataSource[i].maintenanceCycleId==undefined){
- this.$message.error("绗�"+(i+1)+"琛屽懆鏈熶负绌猴紝璇烽�夋嫨")
- that.confirmLoading = false
- return false;
- }
- if(that.dataSource[i].maintenanceMode==null||that.dataSource[i].maintenanceMode==undefined||that.dataSource[i].maintenanceMode==''){
- this.$message.error("绗�"+(i+1)+"琛岀淮淇濇柟寮忎负绌猴紝璇烽�夋嫨")
- that.confirmLoading = false
- return false;
- }
-
-
-
+ for (var i = 0; i < that.dataSource.length; i++) {
+ // if (that.dataSource[i].maintenanceRequire == null || that.dataSource[i].maintenanceRequire == undefined || that.dataSource[i].maintenanceRequire == '') {
+ // this.$message.error("绗�" + (i + 1) + "琛屽畨鍏ㄨ姹備负绌猴紝璇峰~鍐�")
+ // that.confirmLoading = false
+ // return false;
+ // }
+ // if (that.dataSource[i].photo == null || that.dataSource[i].photo == undefined || that.dataSource[i].photo == '') {
+ // this.$message.error("绗�" + (i + 1) + "琛岀ず鎰忓浘涓虹┖锛岃涓婁紶")
+ // that.confirmLoading = false
+ // return false;
+ // }
+ // if (that.dataSource[i].location == null || that.dataSource[i].location == undefined || that.dataSource[i].location == '') {
+ // this.$message.error("绗�" + (i + 1) + "琛岄儴浣嶄负绌猴紝璇峰~鍐�")
+ // that.confirmLoading = false
+ // return false;
+ // }
+ if (that.dataSource[i].maintenanceCycleId == null || that.dataSource[i].maintenanceCycleId == undefined) {
+ this.$message.error("绗�" + (i + 1) + "琛屽懆鏈熶负绌猴紝璇烽�夋嫨")
+ that.confirmLoading = false
+ return false;
+ }
+ // if (that.dataSource[i].maintenanceMode == null || that.dataSource[i].maintenanceMode == undefined || that.dataSource[i].maintenanceMode == '') {
+ // this.$message.error("绗�" + (i + 1) + "琛岀淮淇濇柟寮忎负绌猴紝璇烽�夋嫨")
+ // that.confirmLoading = false
+ // return false;
+ // }
+
+
+
}
formData.maintenanceStandardDetaillist = that.dataSource;
formData.type = 'specialty';
@@ -682,6 +689,14 @@
// that.loadData()
} else {
// that.$message.warning(res.message)
+ }
+ })
+ },
+
+ getSeq() {
+ getAction(this.url.getNum, { type: 'SpecialtyMaintenanceStandard', length: 4 }).then(res => {
+ if (res.success) {
+ this.form.setFieldsValue({ "num": res.result })
}
})
},
@@ -816,7 +831,7 @@
this.dataSource = [];
let record = data.record;
console.log(record.id)
- this.form.setFieldsValue({ departId:record.useId,equipmentId: record.id, equipmentName: record.num + "/" + record.name + "/" + record.model });
+ this.form.setFieldsValue({ departId: record.useId, equipmentId: record.id, equipmentName: record.num + "/" + record.name + "/" + record.model });
},
--
Gitblit v1.9.3