From 41d50b20c975faeaa9e5277bdcff13b5acecb575 Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期三, 13 十二月 2023 16:57:37 +0800 Subject: [PATCH] Merge branch 'master' of http://117.34.109.166:18448/r/vue_mdc_430 into develop --- src/views/eam/modules/malfunctionRepair/AcceptModel.vue | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 155 insertions(+), 0 deletions(-) diff --git a/src/views/eam/modules/malfunctionRepair/AcceptModel.vue b/src/views/eam/modules/malfunctionRepair/AcceptModel.vue new file mode 100644 index 0000000..03735f5 --- /dev/null +++ b/src/views/eam/modules/malfunctionRepair/AcceptModel.vue @@ -0,0 +1,155 @@ +<template> + <j-modal + :title="title" + :width="width" + :visible="visible" + :confirmLoading="confirmLoading" + switchFullscreen + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴" + > + <a-spin :spinning="confirmLoading"> + <a-form-model + ref="form" + :model="model" + :rules="validatorRules" + > + <a-row :gutter="24"> + <a-col :span='24'> + <a-form-model-item + label='楠屾敹浜�' + prop='errUda3' + :labelCol="labelCol" + :wrapperCol="wrapperCol"> + <a-input v-model='model.errUda3' + > + </a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item + label="楠屾敹鎰忚" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="errUda5" + > + <a-textarea v-model="model.errUda5" rows="4" placeholder="楠屾敹鎰忚" /> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> + </j-modal> +</template> +<script> +import { httpAction } from '@/api/manage' +import { validateDuplicateValue } from '@/utils/util' +import pick from 'lodash.pick' +import { postAction, requestPut, getAction } from '@/api/manage' +import { duplicateCheck } from '@/api/api' +import moment from 'moment' +import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' +import { JVXETypes } from '@/components/jeecg/JVxeTable' +export default { + name: "NodeModel", + mixins: [JVxeTableModelMixin], + components: { + validateDuplicateValue, + }, + props: { + disableSubmit: { + type: Boolean, + default: false, + required: false + }, + caytegoryParam: { + type: String, + default: '', + required: false + } + }, + data() { + return { + title: "鎿嶄綔", + width: 1500, + visible: false, + model: { + }, + labelCol: { + xs: { span: 24 }, + sm: { span: 5 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 }, + }, + + confirmLoading: false, + validatorRules: { + errUda5: [ + {required:true,message:"璇疯緭鍏ラ獙鏀舵剰瑙�"}, + { min: 0, max: 100, message: '闀垮害涓嶈秴杩� 100 涓瓧绗�' }, + ], + errUda3 :[ + {required:true,message:"璇疯緭鍏ュ悕绉�"}, + { min: 0, max: 10, message: '鍚嶇О涓嶈秴杩� 10 涓瓧绗�'}, + ], + }, + url: { + accept: "/eam/equipmentReportRepair/accept", + }, + } + }, + created() { + //澶囦唤model鍘熷鍊� + this.modelDefault = JSON.parse(JSON.stringify(this.model)); + }, + methods: { + add() { + this.edit(this.modelDefault); + }, + edit(record) { + this.model = Object.assign({}, record); + this.visible = true; + }, + close() { + this.$emit('close'); + this.visible = false; + this.$refs.form.clearValidate(); + }, + handleOk() { + const that = this; + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true; + let httpurl = this.url.accept; + let method = 'put'; + httpAction(httpurl, this.model, method).then((res) => { + if (res.success) { + that.$message.success(res.message); + that.$emit('ok'); + } else { + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + that.close(); + }) + } else { + return false + } + }) + }, + handleCancel() { + this.close() + }, + }, + computed: { + formDisabled() { + return this.disableSubmit + }, + }, +} +</script> \ No newline at end of file -- Gitblit v1.9.3