Compare commits

..

No commits in common. "da5596766c33f5f0defcc69afd4e069aefae289a" and "4a68467d88baa1cfe7e377be51983190964bcbb4" have entirely different histories.

9 changed files with 148 additions and 401 deletions

View File

@ -14,8 +14,7 @@ VUE_APP_TITLE = MES系统
# 芋道管理系统/开发环境 # 芋道管理系统/开发环境
# VUE_APP_BASE_API = 'http://100.64.0.26:48082' # VUE_APP_BASE_API = 'http://100.64.0.26:48082'
# VUE_APP_BASE_API = 'http://10.70.2.2:8080' # VUE_APP_BASE_API = 'http://10.70.2.2:8080'
VUE_APP_BASE_API = 'http://192.168.1.47:48082' VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.4.173:48080' # VUE_APP_BASE_API = 'http://192.168.4.173:48080'
# VUE_APP_BASE_API = 'http://192.168.2.173:48080' # VUE_APP_BASE_API = 'http://192.168.2.173:48080'
# VUE_APP_BASE_API = 'http://192.168.1.49:48082' # VUE_APP_BASE_API = 'http://192.168.1.49:48082'

View File

@ -106,8 +106,6 @@ export default {
case 'detail': case 'detail':
this.handleDetail(data); this.handleDetail(data);
break; break;
default:
this.handleTableActions({data, type});
} }
}, },
// 处理搜索栏按钮 // 处理搜索栏按钮

View File

@ -59,11 +59,10 @@
</base-dialog> </base-dialog>
<!-- 设备 详情 - 编辑 --> <!-- 设备 详情 - 编辑 -->
<EquipmentDrawer <!-- <EquipmentDrawer
v-if="editVisible" v-if="editVisible"
ref="drawer" ref="drawer"
:mode="editMode" :mode="editMode"
:isFireEquipment="true"
@update-mode="editMode = $event" @update-mode="editMode = $event"
:data-id="form.id" :data-id="form.id"
:sections="[ :sections="[
@ -109,7 +108,7 @@
]" ]"
@refreshDataList="getList" @refreshDataList="getList"
@cancel="cancelEdit" @cancel="cancelEdit"
@destroy="cancelEdit" /> @destroy="cancelEdit" /> -->
</div> </div>
</template> </template>
@ -404,41 +403,25 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
this.form.id = row.id;
this.showUploadComponents = false; this.showUploadComponents = false;
this.editMode = 'edit'; this.editMode = 'edit';
this.editVisible = true; const id = row.id;
this.$nextTick(() => { getEquipment(id).then((response) => {
this.$refs['drawer'].init(); this.form = response.data;
this.open = true;
this.title = '修改设备';
}); });
// this.reset();
// this.showUploadComponents = false;
// this.editMode = 'edit';
// const id = row.id;
// getEquipment(id).then((response) => {
// this.form = response.data;
// this.open = true;
// this.title = '';
// });
}, },
handleDetail(row, mode='detail') { handleDetail(row) {
const {id} = row; this.reset();
this.form.id = id; this.showUploadComponents = false;
// const id = row.id;
this.editMode = mode; this.editMode = 'detail';
this.editVisible = true; getEquipment(id).then((response) => {
this.$nextTick(() => { this.form = response.data;
this.$refs['drawer'].init(); this.open = true;
}) this.title = '查看详情';
// this.reset(); });
// this.showUploadComponents = false;
// const id = row.id;
// this.editMode = 'detail';
// getEquipment(id).then((response) => {
// this.form = response.data;
// this.open = true;
// this.title = '';
// });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {

View File

@ -59,7 +59,7 @@
</base-dialog> </base-dialog>
<!-- 设备 详情 - 编辑 --> <!-- 设备 详情 - 编辑 -->
<EquipmentDrawer <!-- <EquipmentDrawer
v-if="editVisible" v-if="editVisible"
ref="drawer" ref="drawer"
:mode="editMode" :mode="editMode"
@ -108,7 +108,7 @@
]" ]"
@refreshDataList="getList" @refreshDataList="getList"
@cancel="cancelEdit" @cancel="cancelEdit"
@destroy="cancelEdit" /> @destroy="cancelEdit" /> -->
</div> </div>
</template> </template>
@ -388,41 +388,25 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
this.form.id = row.id;
this.showUploadComponents = false; this.showUploadComponents = false;
this.editMode = 'edit'; this.editMode = 'edit';
this.editVisible = true; const id = row.id;
this.$nextTick(() => { getEquipment(id).then((response) => {
this.$refs['drawer'].init(); this.form = response.data;
this.open = true;
this.title = '修改设备';
}); });
// this.reset();
// this.showUploadComponents = false;
// this.editMode = 'edit';
// const id = row.id;
// getEquipment(id).then((response) => {
// this.form = response.data;
// this.open = true;
// this.title = '';
// });
}, },
handleDetail(row, mode='detail') { handleDetail(row) {
const {id} = row; this.reset();
this.form.id = id; this.showUploadComponents = false;
// const id = row.id;
this.editMode = mode; this.editMode = 'detail';
this.editVisible = true; getEquipment(id).then((response) => {
this.$nextTick(() => { this.form = response.data;
this.$refs['drawer'].init(); this.open = true;
}) this.title = '查看详情';
// this.reset(); });
// this.showUploadComponents = false;
// const id = row.id;
// this.editMode = 'detail';
// getEquipment(id).then((response) => {
// this.form = response.data;
// this.open = true;
// this.title = '';
// });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {

View File

@ -37,7 +37,6 @@
<EquipmentInfoForm <EquipmentInfoForm
key="drawer-dialog-form" key="drawer-dialog-form"
v-if="showForm" v-if="showForm"
:isFireEquipment="isFireEquipment"
:disabled="mode.includes('detail')" :disabled="mode.includes('detail')"
:sync-filelist="syncFileListFlag" :sync-filelist="syncFileListFlag"
v-model="form" /> v-model="form" />
@ -150,7 +149,7 @@ const SmallTitle = {
export default { export default {
components: { SmallTitle, DialogForm, EquipmentInfoForm }, components: { SmallTitle, DialogForm, EquipmentInfoForm },
props: ['sections', 'mode', 'dataId', 'isFireEquipment'], // dataId id props: ['sections', 'mode', 'dataId'], // dataId id
data() { data() {
return { return {
visible: false, visible: false,
@ -280,7 +279,7 @@ export default {
} }
this.btnLoading = false; this.btnLoading = false;
this.$emit('refreshDataList'); this.$emit('refreshDataList')
this.handleCancel(); this.handleCancel();
}); });
}, },

View File

@ -121,16 +121,6 @@
</el-col> --> </el-col> -->
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col v-if="isFireEquipment" :span="12">
<el-form-item label="有效期至" prop="dueDate" :rules="[]">
<el-date-picker
v-model="form.dueDate"
:disabled="disabled"
type="datetime"
placeholder="请选择生产日期"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<!-- <el-col :span="8"> <!-- <el-col :span="8">
<el-form-item label="生产日期" prop="productionTime" :rules="[]"> <el-form-item label="生产日期" prop="productionTime" :rules="[]">
<el-date-picker <el-date-picker
@ -140,8 +130,8 @@
placeholder="请选择生产日期" placeholder="请选择生产日期"
value-format="timestamp"></el-date-picker> value-format="timestamp"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> --> </el-col>
<!-- <el-col :span="8"> <el-col :span="8">
<el-form-item label="进场日期" prop="enterTime" :rules="[]"> <el-form-item label="进场日期" prop="enterTime" :rules="[]">
<el-date-picker <el-date-picker
v-model="form.enterTime" v-model="form.enterTime"
@ -284,10 +274,6 @@ export default {
default: null, default: null,
required: false, required: false,
}, },
isFireEquipment: {
type: Boolean,
default: false
}
}, },
data() { data() {
@ -310,7 +296,6 @@ export default {
description: '', description: '',
assets: [], assets: [],
pics: [], pics: [],
dueDate: ''
}, },
rpList: [], rpList: [],
dataLoaded: false, dataLoaded: false,

View File

@ -15,55 +15,34 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="保养计划名称" label="计划名称"
prop="name" prop="name"
:rules="[ :rules="[
{ required: true, message: '请输入保养计划名称', trigger: 'blur' }, { required: true, message: '请输入计划名称', trigger: 'blur' },
]"> ]">
<el-input <el-input
v-model="form.name" v-model="form.name"
@change="$emit('update', form)" @change="$emit('update', form)"
:placeholder="`请输入保养计划名称`" :placeholder="`请输入计划名称`"
:disabled="disabled" /> :disabled="disabled" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="保养计划编号" label="计划编号"
prop="code" prop="code"
:rules="[ :rules="[
{ required: true, message: '请输入保养计划编号', trigger: 'blur' }, { required: true, message: '请输入计划编号', trigger: 'blur' },
]"> ]">
<el-input <el-input
v-model="form.code" v-model="form.code"
@change="$emit('update', form)" @change="$emit('update', form)"
:placeholder="`请输入保养计划编号`" :placeholder="`请输入计划编号`"
:disabled="disabled" /> :disabled="disabled" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="部门"
prop="departmentId"
:rules="[{ required: true, message: '请选择部门', trigger: 'blur' }]">
<el-select
v-model="form.departmentId"
:placeholder="`请选择部门`"
:disabled="disabled"
clearable
filterable
@change="$emit('update', form)">
<el-option
v-for="opt in departmentOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
<!-- <el-form-item
label="设备大类" label="设备大类"
prop="equipmentCategory" prop="equipmentCategory"
:rules="[ :rules="[
@ -80,29 +59,10 @@
:label="opt.label" :label="opt.label"
:value="opt.value" /> :value="opt.value" />
</el-select> </el-select>
</el-form-item> --> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="产线"
prop="lineId"
:rules="[{ required: true, message: '请选择产线', trigger: 'blur' }]">
<el-select
v-model="form.lineId"
:placeholder="`请选择产线`"
:disabled="disabled"
clearable
filterable
@change="$emit('update', form)">
<el-option
v-for="opt in lineOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
<!-- <el-form-item
label="设备" label="设备"
prop="equipmentId" prop="equipmentId"
:rules="[{ required: true, message: '请选择设备', trigger: 'blur' }]"> :rules="[{ required: true, message: '请选择设备', trigger: 'blur' }]">
@ -117,9 +77,42 @@
:label="opt.label" :label="opt.label"
:value="opt.value" /> :value="opt.value" />
</el-select> </el-select>
</el-form-item> --> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="保养类型" prop="maintainType">
<el-select
v-model="form.maintainType"
:placeholder="`请选择保养类型`"
:disabled="disabled"
@change="$emit('update', form)">
<el-option
v-for="opt in getDictDatas(DICT_TYPE.MAINTAIN_TYPE)"
:key="opt.value"
:label="opt.label"
:value="+opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="保养时长(h)"
prop="maintainDuration"
:rules="[
{
type: 'number',
message: '请输入正确的数字',
trigger: 'blur',
transform: (val) => Number(val),
},
]">
<el-input
v-model="form.maintainDuration"
@change="$emit('update', form)"
:placeholder="`请输入保养时长`"
:disabled="disabled" />
</el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="保养频率(天/次)" label="保养频率(天/次)"
@ -140,100 +133,6 @@
:disabled="disabled" /> :disabled="disabled" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item
label="确认时限(h)"
prop="confirmTimeLimit"
:rules="[
{ required: true, message: '请输入确认时限', trigger: 'blur' },
{
type: 'number',
message: '请输入正确的数字',
trigger: 'blur',
transform: (val) => Number(val),
},
]">
<el-input
v-model="form.confirmTimeLimit"
@change="$emit('update', form)"
:placeholder="`请输入确认时限(小时)`"
:disabled="disabled" />
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="保养类型" prop="maintainType">
<el-select
v-model="form.maintainType"
:placeholder="`请选择保养类型`"
:disabled="disabled"
@change="$emit('update', form)">
<el-option
v-for="opt in getDictDatas(DICT_TYPE.MAINTAIN_TYPE)"
:key="opt.value"
:label="opt.label"
:value="+opt.value" />
</el-select>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item
label="保养时长(h)"
prop="maintainDuration"
:rules="[
{
type: 'number',
message: '请输入正确的数字',
trigger: 'blur',
transform: (val) => Number(val),
},
]">
<el-input
v-model="form.maintainDuration"
@change="$emit('update', form)"
:placeholder="`请输入保养时长(小时)`"
:disabled="disabled" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="首次保养时间" prop="firstMaintenanceTime">
<el-date-picker
v-model="form.firstMaintenanceTime"
type="datetime"
:disabled="edit"
:placeholder="`请选择首次保养时间`"
@change="$emit('update', form)"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="计划保养人员"
prop="maintainer"
:rules="[
{ required: true, message: '请选择计划保养人员', trigger: 'blur' },
]">
<el-select
v-model="form.maintainer"
:placeholder="`请选择计划保养人员`"
:disabled="disabled"
multiple
clearable
filterable
@change="$emit('update', form)">
<el-option
v-for="opt in maintainerOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input <el-input
@ -269,10 +168,6 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
edit: {
type: Boolean,
default: false,
},
hasFiles: { hasFiles: {
type: Boolean | Array, type: Boolean | Array,
default: false, default: false,
@ -290,21 +185,20 @@ export default {
return { return {
form: {}, form: {},
formLoading: true, formLoading: true,
dataLoaded: false,
equipmentList: [],
equipmentOptions: [],
equipmentTypeOptions: [ equipmentTypeOptions: [
{ label: '安全设备', value: 1 }, { label: '安全设备', value: 1 },
{ label: '消防设备', value: 2 }, { label: '消防设备', value: 2 },
{ label: '特种设备', value: 3 }, { label: '特种设备', value: 3 },
], ],
lineList: [],
maintainerList: [],
departmentList: []
}; };
}, },
watch: { watch: {
dataForm: { dataForm: {
handler(val) { handler(val) {
this.form = JSON.parse(JSON.stringify(val)); this.form = JSON.parse(JSON.stringify(val));
if (typeof val.maintainer == 'string') this.form.maintainer = val.maintainer.split(',')
if (this.form.equipmentCategory != null) { if (this.form.equipmentCategory != null) {
setTimeout(() => { setTimeout(() => {
this.equipmentOptions = this.equipmentList this.equipmentOptions = this.equipmentList
@ -330,33 +224,8 @@ export default {
}, },
}, },
mounted() { mounted() {
!this.edit && this.getCode('/base/equipment-maintain-plan/getCode'); this.getEquipmentList();
this.getList('maintainer'); this.getCode('/base/equipment-maintain-plan/getCode');
this.getList('department');
this.getList('line');
},
computed: {
departmentOptions() {
return (this.departmentList || []).map((item) => ({
id: item.id,
label: item.name,
value: item.id,
}));
},
lineOptions() {
return (this.lineList || []).map((item) => ({
id: item.id,
label: item.name,
value: item.id,
}));
},
maintainerOptions() {
return (this.maintainerList || []).map((item) => ({
id: item.id,
label: item.name,
value: item.name,
}));
},
}, },
methods: { methods: {
/** 模拟透传 ref */ /** 模拟透传 ref */
@ -384,29 +253,6 @@ export default {
})); }));
this.formLoading = false; this.formLoading = false;
}, },
async getList(source = 'department') {
const urls = [
'/base/core-production-line/listAll',
'/base/core-department/listAll',
'/base/core-worker/listAll',
];
let res;
switch (source) {
case 'department':
res = await this.$axios(urls[1]);
this.departmentList = res.data || [];
break;
case 'maintainer':
res = await this.$axios(urls[2]);
this.maintainerList = res.data || [];
break;
case 'line':
res = await this.$axios(urls[0]);
this.lineList = res.data || [];
break;
}
this.formLoading = false;
},
// handlers // handlers
handleEqTypeChange(type) { handleEqTypeChange(type) {

View File

@ -24,7 +24,7 @@
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
label="操作" label="操作"
:width="180" :width="120"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" />
</base-table> </base-table>
@ -44,7 +44,7 @@
@close="cancel" @close="cancel"
@cancel="cancel" @cancel="cancel"
@confirm="submitForm"> @confirm="submitForm">
<DialogForm v-if="open" ref="form" :edit="form.id != null" v-model="form" :has-files="false" /> <DialogForm v-if="open" ref="form" v-model="form" :has-files="false" />
</base-dialog> </base-dialog>
</div> </div>
</template> </template>
@ -64,15 +64,11 @@ export default {
const t = new Date(); const t = new Date();
const [y, m, d] = [t.getFullYear(), t.getMonth(), t.getDate()]; const [y, m, d] = [t.getFullYear(), t.getMonth(), t.getDate()];
return { return {
searchBarKeys: ['planName'], // 'specialType', 'equipmentName', 'createTime'], searchBarKeys: ['equipmentName', 'specialType', 'createTime'],
tableBtn: [ tableBtn: [
// {
// type: 'detail',
// btnName: '',
// },
{ {
type: 'addContent', type: 'detail',
btnName: '添加内容', btnName: '保养记录',
}, },
this.$auth.hasPermi('equipment:plan-config:update') this.$auth.hasPermi('equipment:plan-config:update')
? { ? {
@ -88,23 +84,6 @@ export default {
: undefined, : undefined,
].filter((v) => v), ].filter((v) => v),
tableProps: [ tableProps: [
{ prop: 'name', label: '计划名称' },
{ prop: 'departmentName', label: '部门' },
{ width: 144, prop: 'lineName', label: '产线名' },
{ width: 144, prop: 'maintenancePeriod', label: '保养频率(天/次)' },
{ width: 144, prop: 'firstMaintenanceTime', label: '首次保养时间' },
{ width: 144, prop: 'maintainDuration', label: '保养时长' },
{ prop: 'maintainer', label: '计划保养人员' },
{
width: 144,
prop: 'confirmTimeLimit',
label: '确认时限',
filter: (val) =>
val != null && val > 24
? `${(val - (val % 24)) / 24}${val % 24}小时`
: `${val}小时`,
},
{ prop: 'remark', label: '备注' },
// { // {
// prop: 'createTime', // prop: 'createTime',
// label: '', // label: '',
@ -112,64 +91,59 @@ export default {
// width: 180, // width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), // filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// }, // },
// { prop: 'code', label: '' }, { prop: 'name', label: '计划名称' },
// { { prop: 'code', label: '计划编号' },
// prop: 'enabled', {
// label: '', prop: 'enabled',
// filter: (val) => ['', ''][val], label: '启用状态',
// }, filter: (val) => ['停用', '启用'][val],
// { },
// prop: 'equipmentCategory', { prop: 'lineName', label: '产线' },
// label: '', {
// filter: (val) => prop: 'equipmentCategory',
// val != null ? ['-', '', '', ''][val] : '-', label: '设备大类',
// }, filter: (val) =>
// { prop: 'equipmentName', label: '' }, val != null ? ['-', '安全', '消防', '特种'][val] : '-',
// { width: 144, prop: 'maintainDuration', label: '(h)' }, },
// { { prop: 'equipmentName', label: '设备名称' },
// prop: 'maintainType', { width: 144, prop: 'maintainDuration', label: '计划保养用时(h)' },
// label: '', { width: 144, prop: 'maintenancePeriod', label: '保养频率(天/次)' },
// filter: publicFormatter('maintain_type'), {
// }, prop: 'maintainType',
label: '保养类型',
filter: publicFormatter('maintain_type'),
},
{ prop: 'remark', label: '备注' },
], ],
searchBarFormConfig: [ searchBarFormConfig: [
// { {
// type: 'select', type: 'select',
// label: '', label: '设备大类',
// selectOptions: [ selectOptions: [
// { id: 1, name: '' }, { id: 1, name: '安全设备' },
// { id: 2, name: '' }, { id: 2, name: '消防设备' },
// { id: 3, name: '' }, { id: 3, name: '特种设备' },
// ], ],
// placeholder: '', placeholder: '请选择设备大类',
// param: 'specialType', param: 'specialType',
// }, },
{ {
type: 'input', type: 'input',
label: '保养计划名称', label: '设备名',
placeholder: '请输入保养计划名称', placeholder: '请输入设备名称',
param: 'planName', param: 'equipmentName',
// selectOptions: [ },
// {name: 1, id: 1} {
// ] type: 'datePicker',
label: '时间段',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'createTime',
}, },
// {
// type: 'input',
// label: '',
// placeholder: '',
// param: 'equipmentName',
// },
// {
// type: 'datePicker',
// label: '',
// dateType: 'daterange',
// format: 'yyyy-MM-dd',
// valueFormat: 'yyyy-MM-dd HH:mm:ss',
// rangeSeparator: '-',
// startPlaceholder: '',
// endPlaceholder: '',
// param: 'createTime',
// },
{ {
type: 'button', type: 'button',
btnName: '查询', btnName: '查询',
@ -297,10 +271,9 @@ export default {
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
// equipmentName: null, equipmentName: null,
// createTime: null, createTime: null,
specialType: null, specialType: null,
planName: null,
}, },
// //
form: {}, form: {},
@ -338,33 +311,19 @@ export default {
/** 表单重置 */ /** 表单重置 */
reset() { reset() {
this.form = { this.form = {
id: null,
code: null, code: null,
name: null, name: null,
// equipmentId: null, equipmentId: null,
maintainer: null, enabled: null,
lineId: null,
departmentId: null,
// enabled: null,
maintenancePeriod: null, maintenancePeriod: null,
maintainDuration: null, maintainDuration: null,
maintainType: null, maintainType: null,
remark: null, remark: null,
confirmTimeLimit: null, enabled: 1,
firstMaintenanceTime: null, equipmentCategory: null,
speical: false,
// equipmentCategory: null,
}; };
this.resetForm('form'); this.resetForm('form');
}, },
handleTableActions({data, type}) {
switch(type) {
case 'addContent':
//
alert('添加内容...')
break;
}
},
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNo = 1; this.queryParams.pageNo = 1;
@ -405,6 +364,7 @@ export default {
const id = row.id; const id = row.id;
this.info({ id }).then((response) => { this.info({ id }).then((response) => {
this.form = response.data; this.form = response.data;
debugger;
this.open = true; this.open = true;
this.title = '修改保养计划'; this.title = '修改保养计划';
}); });
@ -417,10 +377,7 @@ export default {
} }
// //
if (this.form.id != null) { if (this.form.id != null) {
this.put({ this.put(this.form).then((response) => {
...this.form,
maintainer: this.form.maintainer.join(','),
}).then((response) => {
this.$modal.msgSuccess('修改成功'); this.$modal.msgSuccess('修改成功');
this.open = false; this.open = false;
this.getList(); this.getList();
@ -428,11 +385,7 @@ export default {
return; return;
} }
// //
this.post({ this.post(this.form).then((response) => {
...this.form,
special: true,
maintainer: this.form.maintainer.join(','),
}).then((response) => {
this.$modal.msgSuccess('新增成功'); this.$modal.msgSuccess('新增成功');
this.open = false; this.open = false;
this.getList(); this.getList();