Merge remote-tracking branch 'origin/master'
| | |
| | | </div> |
| | | |
| | | |
| | | <AssignApproveUserModal ref="modalForm" @ok="modalFormOk"></AssignApproveUserModal> |
| | | <WorkDoneModal ref="modalForm" @ok="modalFormOk"></WorkDoneModal> |
| | | |
| | | </a-card> |
| | | </template> |
| | |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JDictSelectTag from '@comp/dict/JDictSelectTag.vue' |
| | | import AssignApproveUserModal from './modules/AssignApproveUser/AssignApproveUserModal__Style#Drawer.vue' |
| | | import WorkDoneModal from './modules/WorkDone/WorkDoneModal__Style#Drawer.vue' |
| | | |
| | | export default { |
| | | name: 'AssignApproveUser', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | JDictSelectTag, |
| | | AssignApproveUserModal |
| | | WorkDoneModal |
| | | }, |
| | | data () { |
| | | return { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | Description: æµç¨é
置管çé¡µé¢ Form |
| | | Author: ä½è
liuyh |
| | | Date: 2025-01-15 |
| | | --> |
| | | <template> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <j-form-container :disabled="formDisabled"> |
| | | <a-form :form="form" slot="detail"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-item label="产ååç§°" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-decorator="['productName', validatorRules.productName]" placeholder="请è¾å
¥äº§ååç§°"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="é¨ä»¶åç§°" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-decorator="['componentName', validatorRules.componentName]" placeholder="请è¾å
¥é¨ä»¶åç§°"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="é¶ä»¶åç§°" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-decorator="['partsName', validatorRules.partsName]" placeholder="请è¾å
¥é¶ä»¶åç§°"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="ææ¡£åç§°" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-decorator="['docName', validatorRules.docName]" placeholder="请è¾å
¥ææ¡£åç§°"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="设å¤åç§°" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-decorator="['deviceName', validatorRules.deviceName]" placeholder="请è¾å
¥è®¾å¤åç§°"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="ææ¡£çæ¬" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-decorator="['version', validatorRules.version]" placeholder="请è¾å
¥ææ¡£çæ¬"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="ç³è¯·äºº" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-decorator="['applyUser', validatorRules.applyUser]" placeholder="请è¾å
¥ç³è¯·äºº"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="ç³è¯·åå " :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-decorator="['applyReason', validatorRules.applyReason]" placeholder="请è¾å
¥ç³è¯·åå "></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="ç³è¯·æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-decorator="['applyTime', validatorRules.applyTime]" placeholder="请è¾å
¥ç³è¯·æ¶é´"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="审æ¹äºº" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-decorator="['approveUser', validatorRules.approveUser]" placeholder="请è¾å
¥å®¡æ¹äºº"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="å®¡æ¹æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-decorator="['approveTime', validatorRules.approveTime]" placeholder="请è¾å
¥å®¡æ¹æ¶é´"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="å®¡æ¹æè§" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-textarea v-decorator="['approveContent']" rows="4" placeholder="请è¾å
¥å®¡æ¹æè§"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center"> |
| | | <a-button @click="submitForm">æ 交</a-button> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </j-form-container> |
| | | </a-spin> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import pick from 'lodash.pick' |
| | | import JFormContainer from '@/components/jeecg/JFormContainer' |
| | | import JDictSelectTag from "@/components/dict/JDictSelectTag" |
| | | |
| | | export default { |
| | | name: 'AssignApproveUserForm', |
| | | components: { |
| | | JFormContainer, |
| | | JDictSelectTag, |
| | | }, |
| | | props: { |
| | | //æµç¨è¡¨ådata |
| | | formData: { |
| | | type: Object, |
| | | default: ()=>{}, |
| | | required: false |
| | | }, |
| | | //è¡¨åæ¨¡å¼ï¼trueæµç¨è¡¨å falseæ®é表å |
| | | formBpm: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | }, |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | form: this.$form.createForm(this), |
| | | users:"", |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | actName: { |
| | | productName: [ |
| | | { required: true, message: '请è¾å
¥æµç¨åç§°!'}, |
| | | ] |
| | | }, |
| | | componentName: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©é¨é¨åç»!'}, |
| | | ] |
| | | }, |
| | | partsName: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©å®¡æ¹äºº!'}, |
| | | ] |
| | | }, |
| | | docName: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥ç¹æ®å符!'}, |
| | | ] |
| | | }, |
| | | deviceName: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥ç¹æ®å符!'}, |
| | | ] |
| | | }, |
| | | version: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥ç¹æ®å符!'}, |
| | | ] |
| | | }, |
| | | applyUser: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥ç¹æ®å符!'}, |
| | | ] |
| | | }, |
| | | applyReason: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥ç¹æ®å符!'}, |
| | | ] |
| | | }, |
| | | }, |
| | | url: { |
| | | add: "/nc/definition/add", |
| | | edit: "/nc/definition/edit", |
| | | // queryById: "/zhshj/wglltwh/query/by/id" |
| | | }, |
| | | userOptions:[] |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled(){ |
| | | if(this.formBpm===true){ |
| | | if(this.formData.disabled===false){ |
| | | return false |
| | | } |
| | | return true |
| | | } |
| | | return this.disabled |
| | | }, |
| | | showFlowSubmitButton(){ |
| | | if(this.formBpm===true){ |
| | | if(this.formData.disabled===false){ |
| | | return true |
| | | } |
| | | } |
| | | return false |
| | | } |
| | | }, |
| | | created () { |
| | | //å¦ææ¯æµç¨ä¸è¡¨åï¼åéè¦å è½½æµç¨è¡¨ådata |
| | | this.showFlowData(); |
| | | }, |
| | | methods: { |
| | | add () { |
| | | this.edit({}); |
| | | }, |
| | | edit (record) { |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model,'productName','componentName','partsName','docName','deviceName','version','applyUser','applyReason','applyTime','approveUser','approveTime','approveContent')) |
| | | }) |
| | | }, |
| | | getFormFieldValue(field){ |
| | | return this.form.getFieldValue(field) |
| | | }, |
| | | //æ¸²ææµç¨è¡¨åæ°æ® |
| | | showFlowData(){ |
| | | if(this.formBpm === true){ |
| | | let params = {id:this.formData.dataId}; |
| | | getAction(this.url.queryById,params).then((res)=>{ |
| | | if(res.success){ |
| | | this.edit (res.result); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | submitForm () { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let httpurl = ''; |
| | | let method = ''; |
| | | if(!this.model.id){ |
| | | httpurl+=this.url.add; |
| | | method = 'post'; |
| | | }else{ |
| | | httpurl+=this.url.edit; |
| | | method = 'put'; |
| | | } |
| | | let formData = Object.assign(this.model, values); |
| | | console.log("表åæäº¤æ°æ®",formData) |
| | | httpAction(httpurl,formData,method).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | popupCallback(row){ |
| | | this.form.setFieldsValue(pick(row,'productName','componentName','partsName','docName','deviceName','version','applyUser','applyReason','applyTime','approveUser','approveTime','approveContent')) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | Description: æµç¨é
置管çé¡µé¢ Modal |
| | | Author: ä½è
liuyh |
| | | Date: 2025-01-15 |
| | | --> |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="width" |
| | | :visible="visible" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <WorkDoneForm ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></WorkDoneForm> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import WorkDoneForm from './WorkDoneForm.vue' |
| | | export default { |
| | | name: 'AssignApproveUserModal', |
| | | components: { |
| | | WorkDoneForm |
| | | }, |
| | | data () { |
| | | return { |
| | | title:'', |
| | | width:800, |
| | | visible: false, |
| | | disableSubmit: false |
| | | } |
| | | }, |
| | | methods: { |
| | | add () { |
| | | this.visible=true |
| | | this.$nextTick(()=>{ |
| | | this.$refs.realForm.add(); |
| | | }) |
| | | }, |
| | | edit (record) { |
| | | this.visible=true |
| | | this.$nextTick(()=>{ |
| | | this.$refs.realForm.edit(record); |
| | | }) |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | handleOk () { |
| | | this.$refs.realForm.submitForm(); |
| | | }, |
| | | submitCallback(){ |
| | | this.$emit('ok'); |
| | | this.visible = false; |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | Description: æµç¨é
置管çé¡µé¢ Modal-Drawer |
| | | Author: ä½è
liuyh |
| | | Date: 2025-01-15 |
| | | --> |
| | | <template> |
| | | <a-drawer |
| | | :title="title" |
| | | :width="width" |
| | | placement="right" |
| | | :closable="false" |
| | | @close="close" |
| | | destroyOnClose |
| | | :visible="visible"> |
| | | <WorkDoneForm ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></WorkDoneForm> |
| | | <div class="drawer-footer"> |
| | | <a-button @click="handleCancel" style="margin-bottom: 0;">å
³é</a-button> |
| | | <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">æäº¤</a-button> |
| | | </div> |
| | | </a-drawer> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | |
| | | |
| | | import WorkDoneForm from './WorkDoneForm.vue' |
| | | |
| | | export default { |
| | | name: 'AssignApproveUserModal', |
| | | components: { |
| | | WorkDoneForm, |
| | | }, |
| | | data() { |
| | | return { |
| | | title: "æä½", |
| | | width: 800, |
| | | visible: false, |
| | | disableSubmit: false |
| | | } |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.realForm.add(); |
| | | }) |
| | | }, |
| | | edit(record) { |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.realForm.edit(record); |
| | | }); |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | submitCallback() { |
| | | this.$emit('ok'); |
| | | this.visible = false; |
| | | }, |
| | | handleOk() { |
| | | this.$refs.realForm.submitForm(); |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | /** Buttonæé®é´è· */ |
| | | .ant-btn { |
| | | margin-left: 30px; |
| | | margin-bottom: 30px; |
| | | float: right; |
| | | } |
| | | .drawer-footer{ |
| | | position: absolute; |
| | | bottom: -8px; |
| | | width: 100%; |
| | | border-top: 1px solid #e8e8e8; |
| | | padding: 10px 16px; |
| | | text-align: right; |
| | | left: 0; |
| | | background: #fff; |
| | | border-radius: 0 0 2px 2px; |
| | | } |
| | | </style> |