Bläddra i källkod

fix some bugs

pull/155/head
lb 9 månader sedan
förälder
incheckning
9561dc27e3
6 ändrade filer med 45 tillägg och 9 borttagningar
  1. +22
    -2
      src/components/DialogForm/index.vue
  2. +4
    -4
      src/views/specialEquipment/basic/FireFighthing.vue
  3. +2
    -2
      src/views/specialEquipment/basic/Safety.vue
  4. +3
    -0
      src/views/specialEquipment/check/Record-add.vue
  5. +1
    -1
      src/views/specialEquipment/maintain/PlanConfig.vue
  6. +13
    -0
      src/views/specialEquipment/maintain/Record.vue

+ 22
- 2
src/components/DialogForm/index.vue Visa fil

@@ -101,7 +101,9 @@
} }
" "
v-bind="col.bind"> v-bind="col.bind">
<el-button size="mini" :disabled="disabled || col.bind?.disabled || false">
<el-button
size="mini"
:disabled="disabled || col.bind?.disabled || false">
<svg-icon <svg-icon
icon-class="icon-upload" icon-class="icon-upload"
style="color: inherit"></svg-icon> style="color: inherit"></svg-icon>
@@ -410,8 +412,26 @@ export default {
} }
if (!promiseList.length) this.formLoading = false; if (!promiseList.length) this.formLoading = false;
}, },

// 上传成功的特殊处理 // 上传成功的特殊处理
beforeUpload() {},
beforeUpload(file) {
const checkFileSize = () => {
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
this.$modal.msgError('上传文件大小不能超过 2MB!');
}
return isLt2M;
};
const checkFileType = () => {
const isJPG =
file.type === 'image/jpeg' ||
file.type === 'image/png' ||
file.type === 'image/jpg';
return isJPG;
};
return checkFileSize() && checkFileType();
},

// 上传前的验证规则可通过 bind 属性传入 // 上传前的验证规则可通过 bind 属性传入
handleUploadSuccess(response, file, prop) { handleUploadSuccess(response, file, prop) {
console.log('[handleUploadSuccess]', response, file, prop); console.log('[handleUploadSuccess]', response, file, prop);


+ 4
- 4
src/views/specialEquipment/basic/FireFighthing.vue Visa fil

@@ -170,19 +170,19 @@ export default {
{ width: 256, prop: 'code', label: '设备编码' }, { width: 256, prop: 'code', label: '设备编码' },
{ prop: 'location', label: '位置' }, { prop: 'location', label: '位置' },
{ prop: 'responsiblePeopleName', label: '负责人' }, { prop: 'responsiblePeopleName', label: '负责人' },
{ prop: 'dueDate', label: '有效期至' },
{ prop: 'dueTime', label: '有效期至' },
{ prop: 'remark', label: '备注' }, { prop: 'remark', label: '备注' },
], ],
searchBarFormConfig: [ searchBarFormConfig: [
{ {
type: 'input', type: 'input',
label: '名称',
label: '设备名称',
placeholder: '请输入设备名称', placeholder: '请输入设备名称',
param: 'name', param: 'name',
}, },
{ {
type: 'input', type: 'input',
label: '编码',
label: '设备编码',
placeholder: '请输入设备编码', placeholder: '请输入设备编码',
param: 'code', param: 'code',
}, },
@@ -251,7 +251,7 @@ export default {
{ {
datetime: true, datetime: true,
label: '有效期至', label: '有效期至',
prop: 'dueDate',
prop: 'dueTime',
bind: { clearable: true }, bind: { clearable: true },
}, },
{}, {},


+ 2
- 2
src/views/specialEquipment/basic/Safety.vue Visa fil

@@ -175,13 +175,13 @@ export default {
searchBarFormConfig: [ searchBarFormConfig: [
{ {
type: 'input', type: 'input',
label: '名称',
label: '设备名称',
placeholder: '请输入设备名称', placeholder: '请输入设备名称',
param: 'name', param: 'name',
}, },
{ {
type: 'input', type: 'input',
label: '编码',
label: '设备编码',
placeholder: '请输入设备编码', placeholder: '请输入设备编码',
param: 'code', param: 'code',
}, },


+ 3
- 0
src/views/specialEquipment/check/Record-add.vue Visa fil

@@ -54,6 +54,7 @@
<el-select <el-select
v-model="dataForm.equipmentId" v-model="dataForm.equipmentId"
filterable filterable
clearable
:disabled="isdetail" :disabled="isdetail"
style="width: 100%" style="width: 100%"
placeholder="请选择设备名称" placeholder="请选择设备名称"
@@ -74,6 +75,7 @@
<el-select <el-select
v-model="dataForm.configId" v-model="dataForm.configId"
filterable filterable
clearable
:disabled="isdetail" :disabled="isdetail"
style="width: 100%" style="width: 100%"
placeholder="请选择巡检配置" placeholder="请选择巡检配置"
@@ -121,6 +123,7 @@
<el-select <el-select
v-model="dataForm.origin" v-model="dataForm.origin"
filterable filterable
clearable
:disabled="isdetail" :disabled="isdetail"
style="width: 100%" style="width: 100%"
placeholder="请选择数据来源"> placeholder="请选择数据来源">


+ 1
- 1
src/views/specialEquipment/maintain/PlanConfig.vue Visa fil

@@ -353,7 +353,7 @@ export default {
queryData.createTime = this.queryParams.createTime; queryData.createTime = this.queryParams.createTime;
} }
this.$router.push({ this.$router.push({
path: '/equipment/base/maintain/record',
path: '/safety-environmental/special-equipment/equipment-maintain/maintain-record',
query: queryData, query: queryData,
}); });
// this.$router.push({ path: '/equipment/base/maintain/record', query: { orderNo: row.orderNo }}) // this.$router.push({ path: '/equipment/base/maintain/record', query: { orderNo: row.orderNo }})


+ 13
- 0
src/views/specialEquipment/maintain/Record.vue Visa fil

@@ -556,6 +556,19 @@ export default {
this.form.relatePlan = tempRow.nextMaintainTime ? 1 : 2; this.form.relatePlan = tempRow.nextMaintainTime ? 1 : 2;
this.form.startTime = tempRow.nextMaintainTime; this.form.startTime = tempRow.nextMaintainTime;
this.form.maintainPlanId = tempRow.id; this.form.maintainPlanId = tempRow.id;
// await (() => {
// return new Promise((acpt, rejt) => {
// this.form.relatePlan =
// this.$route.query.relatePlan ||
// (tempRow.nextMaintainTime ? 1 : 2);
// this.form.startTime = tempRow.nextMaintainTime;
// acpt();
// });
// })();
// this.$nextTick(() => {
// this.form.maintainPlanId = tempRow.id;
// this.form.equipmentId = tempRow.equipmentId;
// });
} }
if (this.$route.query.isAdd) { if (this.$route.query.isAdd) {
// 赋值 // 赋值


Laddar…
Avbryt
Spara