¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | Description: 设å¤ç¹æ®å符管çé¡µé¢ List |
| | | Author: ä½è
liuyh |
| | | Date: 2025-01-15 |
| | | --> |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <a-input placeholder="请è¾å
¥è®¾å¤ç¼å·" v-model="queryParam.deviceNo"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç¹æ®å符"> |
| | | <a-input placeholder="请è¾å
¥ç¹æ®å符" v-model="queryParam.characters"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="é¨é¨åç»"> |
| | | <j-dict-select-tag v-model="queryParam.departId" placeholder="è¯·éæ©é¨é¨åç»" dictCode="sys_department,depart_name,depart_id"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æ°æ§ç³»ç»"> |
| | | <a-input placeholder="请è¾å
¥æ°æ§ç³»ç»" v-model="queryParam.controlSystem"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="10" :lg="11" :md="12" :sm="24"> |
| | | <a-form-item label="æä½æ¶é´"> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©å¼å§æ¶é´" class="query-group-cust" v-model="queryParam.startTime"></j-date> |
| | | <span class="query-group-split-cust"></span> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©ç»ææ¶é´" class="query-group-cust" v-model="queryParam.endTime"></j-date> |
| | | </a-form-item> |
| | | </a-col> |
| | | </template> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | <a @click="handleToggleSearch" style="margin-left: 8px">{{ toggleSearchStatus ? 'æ¶èµ·' : 'å±å¼' }}<a-icon :type="toggleSearchStatus ? 'up' : 'down'" /></a> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | :scroll="{x:true}" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template slot="imgSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ å¾ç</span> |
| | | <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
| | | </template> |
| | | <template slot="fileSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ æä»¶</span> |
| | | <a-button |
| | | v-else |
| | | :ghost="true" |
| | | type="primary" |
| | | icon="download" |
| | | size="small" |
| | | @click="downloadFile(text)"> |
| | | ä¸è½½ |
| | | </a-button> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ |
| | | <a-icon type="down" /> |
| | | </a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | |
| | | |
| | | <NcDeviceCharactersModal ref="modalForm" @ok="modalFormOk"></NcDeviceCharactersModal> |
| | | |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' |
| | | import NcDeviceCharactersModal from './modules/NcDeviceCharacters/NcDeviceCharactersModal__Style#Drawer.vue' |
| | | |
| | | export default { |
| | | name: 'NcDeviceCharactersList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | JDictSelectTag, |
| | | NcDeviceCharactersModal |
| | | }, |
| | | data () { |
| | | return { |
| | | description: '设å¤ç¹æ®å符管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:200, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title: '设å¤ç¼å·', |
| | | align: "center", |
| | | dataIndex: 'deviceNo', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: 'æå±é¨é¨', |
| | | align: "center", |
| | | dataIndex: 'departId_dictText', |
| | | width: 220, |
| | | }, |
| | | { |
| | | title: 'æ°æ§ç³»ç»', |
| | | align: "center", |
| | | dataIndex: 'controlSystem', |
| | | width: 250, |
| | | }, |
| | | { |
| | | title: 'ç¹æ®å符', |
| | | align: "center", |
| | | dataIndex: 'characters', |
| | | width:250 |
| | | }, |
| | | { |
| | | title: 'æä½æ¶é´', |
| | | align: "center", |
| | | dataIndex: 'createTime', |
| | | width:300 |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 200, |
| | | fixed: 'right' |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/nc/device/characters/find/page", |
| | | delete: "/nc/device/characters/delete", |
| | | deleteBatch: "/mdc/mdcDriveTypeParamConfig/deleteBatch", |
| | | exportXlsUrl: "/mdc/mdcDriveTypeParamConfig/exportXls", |
| | | importExcelUrl: "mdc/mdcDriveTypeParamConfig/importExcel", |
| | | }, |
| | | dictOptions:{}, |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | }, |
| | | methods: { |
| | | initDictConfig(){ |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | 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="['deviceNo', validatorRules.deviceNo]" placeholder="请è¾å
¥è®¾å¤ç¼å·"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="æå±é¨é¨" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag type="list" v-decorator="['departId']" :trigger-change="true" dictCode="sys_department,depart_name,depart_id" placeholder="è¯·éæ©æå±é¨é¨"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="æ°æ§ç³»ç»" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-decorator="['controlSystem', validatorRules.controlSystem]" placeholder="请è¾å
¥æ°æ§ç³»ç»"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="ç¹æ®å符" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-decorator="['characters', validatorRules.characters]" placeholder="请è¾å
¥ç¹æ®å符"></a-input> |
| | | </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: 'NcDeviceCharactersForm', |
| | | 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), |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | deviceNo: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥è®¾å¤ç¼å·!'}, |
| | | ] |
| | | }, |
| | | departId: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©é¨é¨åç»!'}, |
| | | ] |
| | | }, |
| | | controlSystem: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥æ°æ§ç³»ç»!'}, |
| | | ] |
| | | }, |
| | | characters: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥ç¹æ®å符!'}, |
| | | ] |
| | | }, |
| | | }, |
| | | url: { |
| | | add: "/nc/device/characters/add", |
| | | edit: "/nc/device/characters/edit", |
| | | // queryById: "/zhshj/wglltwh/query/by/id" |
| | | } |
| | | } |
| | | }, |
| | | 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,'deviceNo','departId','controlSystem','characters')) |
| | | }) |
| | | }, |
| | | //æ¸²ææµç¨è¡¨åæ°æ® |
| | | 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,'deviceNo','departId','controlSystem','characters')) |
| | | }, |
| | | } |
| | | } |
| | | </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="å
³é"> |
| | | <NcDeviceCharactersForm ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></NcDeviceCharactersForm> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import NcDeviceCharactersForm from './NcDeviceCharactersForm.vue' |
| | | export default { |
| | | name: 'NcDeviceCharactersModal', |
| | | components: { |
| | | NcDeviceCharactersForm |
| | | }, |
| | | 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"> |
| | | <NcDeviceCharactersForm ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></NcDeviceCharactersForm> |
| | | <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 MdcEquipmentTypeForm from '@views/mdc/base/modules/EquipmentTypeList/MdcEquipmentTypeForm.vue' |
| | | import NcDeviceCharactersForm from './NcDeviceCharactersForm.vue' |
| | | |
| | | export default { |
| | | name: 'NcDeviceCharactersModal', |
| | | components: { |
| | | MdcEquipmentTypeForm, |
| | | NcDeviceCharactersForm |
| | | }, |
| | | 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> |