¶Ô±ÈÐÂÎļþ |
| | |
| | | <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 |
| | | :md="8" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="æ£éªé¡¹ç®åç§°"> |
| | | <j-input |
| | | placeholder="请è¾å
¥æ£éªé¡¹ç®åç§°" |
| | | v-model="queryParam.name" |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | @click="searchReset" |
| | | icon="reload" |
| | | >éç½®</a-button> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <!-- <a-button type="primary" icon="download" @click="handleExportXls('精度管ç')">导åº</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导å
¥</a-button> |
| | | </a-upload> --> |
| | | <!-- é«çº§æ¥è¯¢åºå --> |
| | | <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>å é¤</a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ <a-icon type="down" /></a-button> |
| | | </a-dropdown> --> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | :scroll="{x:true}" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | 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,record"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ å¾ç</span> |
| | | <img v-else :src="getImgView(text)" :preview="record.id" 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> |
| | | |
| | | <precision-parameters-new-modal ref="modalForm" @ok="modalFormOk"></precision-parameters-new-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import PrecisionParametersNewModal from './modules/precisionParametersNew/PrecisionParametersNewModal' |
| | | export default { |
| | | name: 'PrecisionParametersNewList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | PrecisionParametersNewModal |
| | | }, |
| | | data () { |
| | | return { |
| | | description: '精度管ç管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'æ£éªé¡¹ç®åç§°', |
| | | align:"center", |
| | | dataIndex: 'name', |
| | | |
| | | }, |
| | | { |
| | | title:'æ¹å', |
| | | align:"center", |
| | | dataIndex: 'precisionParametersUda1', |
| | | width:240 |
| | | }, |
| | | { |
| | | title:'å建人', |
| | | align:"center", |
| | | dataIndex: 'createBy', |
| | | width:240 |
| | | }, |
| | | { |
| | | title:'å建æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'createTime', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title:'ä¿®æ¹äºº', |
| | | align:"center", |
| | | dataIndex: 'updateBy', |
| | | width:240 |
| | | }, |
| | | { |
| | | title:'ä¿®æ¹æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'updateTime', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/precisionParameters/list", |
| | | delete: "/eam/precisionParameters/delete", |
| | | deleteBatch: "/eam/precisionParameters/deleteBatch", |
| | | exportXlsUrl: "/eam/precisionParameters/exportXls", |
| | | importExcelUrl: "eam/precisionParameters/importExcel", |
| | | |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | }, |
| | | methods: { |
| | | initDictConfig(){ |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | fieldList.push({type:'string',value:'name',text:'name',dictCode:''}) |
| | | fieldList.push({type:'string',value:'createBy',text:'createBy',dictCode:''}) |
| | | fieldList.push({type:'date',value:'createTime',text:'createTime'}) |
| | | fieldList.push({type:'string',value:'updateBy',text:'updateBy',dictCode:''}) |
| | | fieldList.push({type:'date',value:'updateTime',text:'updateTime'}) |
| | | fieldList.push({type:'string',value:'precisionParametersUda1',text:'æ¹å',dictCode:''}) |
| | | this.superFieldList = fieldList |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | |
| | | } |
| | | }, |
| | | { |
| | | title:'ç²¾åº¦åæ°ç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'precisionParametersNum', |
| | | width:400 |
| | | }, |
| | | { |
| | | title:'ç²¾åº¦åæ°åç§°', |
| | | title:'æ£éªé¡¹ç®åç§°', |
| | | align:"center", |
| | | dataIndex: 'precisionParametersName', |
| | | width:400 |
| | | }, |
| | | { |
| | | title:'ç²¾åº¦åæ°åç±»', |
| | | title:'ä½ç½®', |
| | | align:"center", |
| | | dataIndex: 'precisionParametersCategory', |
| | | dataIndex: 'precisionParametersUda1', |
| | | width:400 |
| | | }, |
| | | { |
| | | title:'计éåä½', |
| | | title:'å
å·®ï¼mmï¼', |
| | | align:"center", |
| | | dataIndex: 'unit', |
| | | dataIndex: 'tolerance', |
| | | width:400 |
| | | }, |
| | | ], |
| | | url: { |
| | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-button @click="handleCopy" type="primary" icon="copy" :disabled="selectedRowKeys.length!=1">å¤å¶</a-button> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:'radio'}" |
| | | :customRow="clickThenSelect" |
| | | @change="handleTableChange"> |
| | | |
| | |
| | | |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | | <precision-parameters-template-model ref="modalForm" @ok="modalFormOk"></precision-parameters-template-model> |
| | | <precision-parameters-template-edit-modal ref="modalForm" @ok="modalFormOk"></precision-parameters-template-edit-modal> |
| | | <!-- <precision-parameters-template-model ref="modalForm" @ok="modalFormOk"></precision-parameters-template-model> --> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import PrecisionParametersTemplateModel from './modules/precisionParametersTemplate/PrecisionParametersTemplateModel' |
| | | // import PrecisionParametersTemplateModel from './modules/precisionParametersTemplate/PrecisionParametersTemplateModel' |
| | | import { getAction } from '@/api/manage' |
| | | import PrecisionParametersTemplateDetail from './PrecisionParametersTemplateDetail' |
| | | import '@/assets/less/TableExpand.less' |
| | | import PrecisionParametersTemplateEditModal from './modules/precisionParametersTemplate/PrecisionParametersTemplateEditModal.vue' |
| | | |
| | | export default { |
| | | name: "PrecisionParametersTemplateList", |
| | | mixins:[JeecgListMixin], |
| | | components: { |
| | | PrecisionParametersTemplateDetail, |
| | | PrecisionParametersTemplateModel |
| | | // PrecisionParametersTemplateModel, |
| | | PrecisionParametersTemplateEditModal |
| | | }, |
| | | data () { |
| | | return { |
| | |
| | | width: 50, |
| | | }, |
| | | { |
| | | title:'ç²¾åº¦åæ°æ¨¡æ¿ç¼ç ', |
| | | title:'ç»ä¸ç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'num', |
| | | width:150 |
| | |
| | | this.queryParam = {}; |
| | | this.precisionParametersTemplateId=''; |
| | | this.loadData(1); |
| | | }, |
| | | }, |
| | | handleCopy(){ |
| | | let record = this.selectionRows[0]; |
| | | record.num = ''; |
| | | this.handleEdit(record); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="设å¤å¾ç" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="equipmentPhoto" |
| | | > |
| | | <j-image-upload |
| | | :isMultiple="false" |
| | | v-model="model.equipmentPhoto" |
| | | ></j-image-upload> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-divider |
| | | orientation="center" |
| | | style="font-size: large;font-style: italic;color: #66aeed;" |
| | | >ç»´æ¤å使ç¨ä¿¡æ¯</a-divider> |
| | | |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="使ç¨é¨é¨" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="设å¤å¾ç" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="equipmentPhoto" |
| | | > |
| | | <j-image-upload |
| | | :isMultiple="false" |
| | | v-model="model.equipmentPhoto" |
| | | ></j-image-upload> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-divider |
| | | orientation="center" |
| | | style="font-size: large;font-style: italic;color: #f20707;" |
| | | >ç»´æ¤å使ç¨ä¿¡æ¯</a-divider> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="ç»´ä¿®é¨é¨" |
| | |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="ABCæ è¯" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="equipmentImportanceId" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="formDisabled" |
| | | placeholder="è¯·éæ©ABCæ è¯" |
| | | :triggerChange="true" |
| | | dictCode="ABC-standard-result" |
| | | @change="changeNeedSpecific" |
| | | v-model="model.equipmentImportanceId" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col |
| | | :span="6" |
| | | v-if="needSpecific" |
| | | > |
| | | <a-form-model-item |
| | | label="å
³é®è®¾å¤æ è¯" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="specificEquipment" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | placeholder="è¯·éæ©å
³é®è®¾å¤æ è¯" |
| | | :disabled="formDisabled" |
| | | :triggerChange="true" |
| | | dictCode="specific_equipment" |
| | | v-model="model.specificEquipment" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="å®å
¨é
ç½®" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="securityConfiguration" |
| | | > |
| | | <a-input |
| | | v-model="model.securityConfiguration" |
| | | :disabled="formDisabled" |
| | | placeholder="请è¾å
¥å®å
¨é
ç½®" |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="å·å´ç³»ç»" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="coolingSystem" |
| | | > |
| | | <a-input |
| | | v-model="model.coolingSystem" |
| | | :disabled="formDisabled" |
| | | placeholder="请è¾å
¥å·å´ç³»ç»" |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="çç«å¨" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="fireExtinguisher" |
| | | > |
| | | <a-input |
| | | v-model="model.fireExtinguisher" |
| | | :disabled="formDisabled" |
| | | placeholder="请è¾å
¥çç«å¨" |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="çç«å¨æææ" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="fireExtinguisherValidityPeriod" |
| | | > |
| | | <a-input |
| | | v-model="model.fireExtinguisherValidityPeriod" |
| | | :disabled="formDisabled" |
| | | placeholder="请è¾å
¥çç«å¨æææ" |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="æä½ç³»ç»" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="operatingSystem" |
| | | > |
| | | <a-input |
| | | v-model="model.operatingSystem" |
| | | :disabled="formDisabled" |
| | | placeholder="请è¾å
¥æä½ç³»ç»" |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="ç³»ç»" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="system" |
| | | > |
| | | <a-input |
| | | v-model="model.system" |
| | | :disabled="formDisabled" |
| | | placeholder="请è¾å
¥ç³»ç»" |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="端å£" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="port" |
| | | > |
| | | <a-input |
| | | v-model="model.port" |
| | | :disabled="formDisabled" |
| | | placeholder="请è¾å
¥ç«¯å£" |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="åæ æ°é" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="coordinateNum" |
| | | > |
| | | <a-input-number |
| | | v-model="model.coordinateNum" |
| | | :disabled="formDisabled" |
| | | placeholder="请è¾å
¥åæ æ°é" |
| | | style="width: 100%" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <!-- <a-col :span="6"> |
| | |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="åè½ä½ç½®" |
| | |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="èµéæ¥æº" |
| | |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="èµäº§æ¥æºå½å®¶" |
| | |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="å®å
¨é
ç½®" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="securityConfiguration" |
| | | > |
| | | <a-input |
| | | v-model="model.securityConfiguration" |
| | | :disabled="formDisabled" |
| | | placeholder="请è¾å
¥å®å
¨é
ç½®" |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="å·å´ç³»ç»" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="coolingSystem" |
| | | > |
| | | <a-input |
| | | v-model="model.coolingSystem" |
| | | :disabled="formDisabled" |
| | | placeholder="请è¾å
¥å·å´ç³»ç»" |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="çç«å¨" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="fireExtinguisher" |
| | | > |
| | | <a-input |
| | | v-model="model.fireExtinguisher" |
| | | :disabled="formDisabled" |
| | | placeholder="请è¾å
¥çç«å¨" |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="çç«å¨æææ" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="fireExtinguisherValidityPeriod" |
| | | > |
| | | <a-input |
| | | v-model="model.fireExtinguisherValidityPeriod" |
| | | :disabled="formDisabled" |
| | | placeholder="请è¾å
¥çç«å¨æææ" |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="æä½ç³»ç»" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="operatingSystem" |
| | | > |
| | | <a-input |
| | | v-model="model.operatingSystem" |
| | | :disabled="formDisabled" |
| | | placeholder="请è¾å
¥æä½ç³»ç»" |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="ç³»ç»" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="system" |
| | | > |
| | | <a-input |
| | | v-model="model.system" |
| | | :disabled="formDisabled" |
| | | placeholder="请è¾å
¥ç³»ç»" |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="端å£" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="port" |
| | | > |
| | | <a-input |
| | | v-model="model.port" |
| | | :disabled="formDisabled" |
| | | placeholder="请è¾å
¥ç«¯å£" |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="åæ æ°é" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="coordinateNum" |
| | | > |
| | | <a-input-number |
| | | v-model="model.coordinateNum" |
| | | :disabled="formDisabled" |
| | | placeholder="请è¾å
¥åæ æ°é" |
| | | style="width: 100%" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="夿³¨" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-divider |
| | | orientation="center" |
| | | style="font-size: large;font-style: italic;color: #66aeed;" |
| | | >ABCæ è¯</a-divider> |
| | | </a-row> |
| | | <a-row> |
| | | </a-row> |
| | | <a-row hidden> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="å¹³å使ç¨ç" |
| | |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row hidden> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="坿¿æ¢æ§" |
| | |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="æ
éé¢ç" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="standardE" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | placeholder="è¯·éæ©æ
éé¢ç" |
| | | :disabled="formDisabled" |
| | | :triggerChange="true" |
| | | dictCode="ABC-standardE" |
| | | @change="standardResultCompute" |
| | | v-model="model.standardE" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="设å¤ä»·å¼" |
| | |
| | | dictCode="ABC-standardF" |
| | | v-model="model.standardF" |
| | | @change="standardResultCompute" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="ABCæ è¯" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="equipmentImportanceId" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="formDisabled" |
| | | placeholder="è¯·éæ©ABCæ è¯" |
| | | :triggerChange="true" |
| | | dictCode="ABC-standard-result" |
| | | @change="changeNeedSpecific" |
| | | v-model="model.equipmentImportanceId" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col |
| | | :span="6" |
| | | v-if="needSpecific" |
| | | > |
| | | <a-form-model-item |
| | | label="å
³é®è®¾å¤æ è¯" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="specificEquipment" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | placeholder="è¯·éæ©å
³é®è®¾å¤æ è¯" |
| | | :disabled="formDisabled" |
| | | :triggerChange="true" |
| | | dictCode="specific_equipment" |
| | | v-model="model.specificEquipment" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <j-form-container :disabled="formDisabled"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="æ£éªé¡¹åç§°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name"> |
| | | <a-input v-model="model.name" placeholder="请è¾å
¥æ£éªé¡¹åç§°" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="æ¹å" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="precisionParametersUda1"> |
| | | <a-auto-complete |
| | | v-model="model.precisionParametersUda1" |
| | | :data-source="dataSource" |
| | | placeholder="请è¾å
¥æ¹å" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </j-form-container> |
| | | </a-spin> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | |
| | | export default { |
| | | name: 'PrecisionParametersNewForm', |
| | | components: { |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | model:{ |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | name: [ |
| | | { required: true, message: '请è¾å
¥è®¾å¤åç§°!' }, |
| | | { min: 1, max: 60, message: 'é¿åº¦å¨ 2 å° 60 个å符', trigger: 'blur' }, |
| | | ], |
| | | precisionParametersUda1:[ |
| | | { required: true, message: '请è¾å
¥æ¹å!' }, |
| | | ] |
| | | }, |
| | | url: { |
| | | add: "/eam/precisionParameters/add", |
| | | edit: "/eam/precisionParameters/edit", |
| | | queryById: "/eam/precisionParameters/queryById" |
| | | }, |
| | | dataSource:[ |
| | | '纵å', |
| | | '横å', |
| | | 'Xè½´', |
| | | 'Yè½´', |
| | | 'Zè½´' |
| | | ] |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled(){ |
| | | return this.disabled |
| | | }, |
| | | }, |
| | | 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; |
| | | }, |
| | | submitForm () { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true; |
| | | let httpurl = ''; |
| | | let method = ''; |
| | | if(!this.model.id){ |
| | | httpurl+=this.url.add; |
| | | method = 'post'; |
| | | }else{ |
| | | httpurl+=this.url.edit; |
| | | 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; |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="width" |
| | | :visible="visible" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <precision-parameters-new-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></precision-parameters-new-form> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import PrecisionParametersNewForm from './PrecisionParametersNewForm' |
| | | export default { |
| | | name: 'PrecisionParametersNewModal', |
| | | components: { |
| | | PrecisionParametersNewForm |
| | | }, |
| | | 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> |
| | |
| | | :md="8" |
| | | :sm="6" |
| | | > |
| | | <a-form-item label="ç²¾åº¦åæ°ä»£ç "> |
| | | <a-form-item label="æ£éªé¡¹ç®åç§°"> |
| | | <a-input |
| | | placeholder="请è¾å
¥ç²¾åº¦åæ°ä»£ç " |
| | | v-model="queryParam.num" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="8" |
| | | :sm="6" |
| | | > |
| | | <a-form-item label="ç²¾åº¦åæ°åç§°"> |
| | | <a-input |
| | | placeholder="请è¾å
¥ç²¾åº¦åæ°åç§°" |
| | | placeholder="请è¾å
¥æ£éªé¡¹ç®åç§°" |
| | | v-model="queryParam.name" |
| | | /> |
| | | </a-form-item> |
| | |
| | | } |
| | | }, |
| | | { |
| | | title: 'ç²¾åº¦åæ°ä»£ç ', |
| | | align: 'center', |
| | | dataIndex: 'num', |
| | | }, |
| | | { |
| | | title: 'ç²¾åº¦åæ°åç§°', |
| | | title: 'æ£éªé¡¹ç®åç§°', |
| | | align: 'center', |
| | | dataIndex: 'name', |
| | | width:400, |
| | | }, |
| | | { |
| | | title: 'ç²¾åº¦åæ°åç±»', |
| | | title: 'æ¹å', |
| | | align: 'center', |
| | | dataIndex: 'precisionParametersCategoryNumName', |
| | | }, |
| | | { |
| | | title: '计éåä½', |
| | | align: 'center', |
| | | dataIndex: 'unitId_dictText', |
| | | dataIndex: 'precisionParametersUda1', |
| | | width:400, |
| | | }, |
| | | ], |
| | | selectedRowKeys: [], |
| | |
| | | this.loadData(); |
| | | }, |
| | | handleSubmit() { |
| | | this.$bus.$emit('selectionRows', this.selectionRows); |
| | | this.$emit('selectionRows', this.selectionRows); |
| | | this.searchReset(0) |
| | | this.close(); |
| | | }, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <j-form-container :disabled="formDisabled"> |
| | | <!-- 主表ååºå --> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item |
| | | label="ç»ä¸ç¼ç " |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="num" |
| | | > |
| | | <a-auto-complete |
| | | v-model="model.num" |
| | | :data-source="numList" |
| | | :disabled="formDisabled" |
| | | placeholder="请è¾å
¥ç²¾åº¦åæ°æ¨¡æ¿ç¼ç " |
| | | @search="onSearchNums" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" > |
| | | <a-form-model-item |
| | | label="åç§°" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="name" |
| | | > |
| | | <a-input |
| | | allowClear |
| | | :disabled="formDisabled" |
| | | placeholder="请è¾å
¥ç²¾åº¦åæ°æ¨¡æ¿åç§°" |
| | | v-model="model.name" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item |
| | | label="夿³¨" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="remark" |
| | | > |
| | | <a-textarea |
| | | allowClear |
| | | :disabled="formDisabled" |
| | | placeholder="请è¾å
¥å¤æ³¨" |
| | | v-model="model.remark" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </j-form-container> |
| | | <!-- å表ååºå --> |
| | | <a-tabs v-model="activeKey" @change="handleChangeTabs"> |
| | | <a-tab-pane tab="ç²¾åº¦åæ°æç»" :key="refKeys[0]" :forceRender="true"> |
| | | <j-vxe-table |
| | | keep-source |
| | | :ref="refKeys[0]" |
| | | :loading="precisionParameters.loading" |
| | | :columns="precisionParameters.columns" |
| | | :dataSource="precisionParameters.dataSource" |
| | | :maxHeight="600" |
| | | :disabled="formDisabled" |
| | | :rowNumber="true" |
| | | :rowSelection="true" |
| | | :toolbar="true" |
| | | bordered |
| | | :alwaysEdit="true" |
| | | :toolbarConfig='toolbarConfig' |
| | | > |
| | | <!-- @valueChange="changeDate" --> |
| | | <template slot='toolbarPrefix'> |
| | | <a-button type='primary' @click='precisionParametersDetailSelect' :disabled="formDisabled" icon="plus">éæ©ç²¾åº¦åæ° |
| | | </a-button> |
| | | </template> |
| | | </j-vxe-table> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <j-select-precision-parameters-modal @selectionRows='selectionRows' ref='JSelectPrecisionParametersModal' ></j-select-precision-parameters-modal> |
| | | </a-spin> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { getAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { duplicateCheck } from '@/api/api' |
| | | import { JVXETypes } from '@/components/jeecg/JVxeTable' |
| | | import { getRefPromise,VALIDATE_FAILED} from '@/components/jeecg/JVxeTable/utils/vxeUtils.js' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | import JFormContainer from '@/components/jeecg/JFormContainer' |
| | | |
| | | |
| | | import dayjs from 'dayjs' |
| | | import JSelectPrecisionParametersModal from './JSelectPrecisionParametersModal' |
| | | export default { |
| | | name: 'PrecisionParameters', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | JFormContainer, |
| | | dayjs, |
| | | JSelectPrecisionParametersModal |
| | | }, |
| | | data() { |
| | | return { |
| | | toolbarConfig: { |
| | | // prefix åç¼ï¼suffix åç¼ |
| | | slot: ['prefix', 'suffix'], |
| | | // add æ°å¢æé®ï¼remove å 餿é®ï¼clearSelection æ¸
ç©ºéæ©æé® |
| | | btn: ['remove', 'clearSelection'] |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | model:{ |
| | | }, |
| | | // æ°å¢æ¶å表é»è®¤æ·»å å è¡ç©ºæ°æ® |
| | | addDefaultRowNum: 0, |
| | | validatorRules: { |
| | | num: [ |
| | | { required: true, message: '请è¾å
¥ç¼ç !' }, |
| | | { min: 1, max: 30, message: 'é¿åº¦å¨ 2 å° 30 个å符', trigger: 'blur' }, |
| | | { validator: this.validateNum }, |
| | | ], |
| | | name: [ |
| | | { required: true, message: '请è¾å
¥åç§°!' }, |
| | | { min: 1, max: 30, message: 'é¿åº¦å¨ 2 å° 30 个å符', trigger: 'blur' }, |
| | | ], |
| | | }, |
| | | refKeys: ['precisionParametersList', ], |
| | | tableKeys:['precisionParametersList', ], |
| | | activeKey: 'precisionParametersList', |
| | | precisionParameters: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'id', |
| | | key: 'id', |
| | | type: JVXETypes.hidden, |
| | | disabled:true, |
| | | align:'center', |
| | | }, |
| | | { |
| | | title: 'æ£éªé¡¹ç®åç§°', |
| | | key: 'precisionParametersName', |
| | | type: JVXETypes.normal, |
| | | width:"350px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | disabled:true, |
| | | align:'center', |
| | | defaultValue:'', |
| | | }, |
| | | { |
| | | title: 'æ¹å', |
| | | key: 'precisionParametersUda1', |
| | | type: JVXETypes.normal, |
| | | width:"350px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | disabled:true, |
| | | align:'center', |
| | | defaultValue:'', |
| | | }, |
| | | { |
| | | title: 'å
å·®ï¼mmï¼', |
| | | key: 'tolerance', |
| | | type: JVXETypes.input, |
| | | width:"350px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | align:'center', |
| | | validateRules: [ |
| | | { handler({ cellValue, row, column }, callback, target) { |
| | | const regex = /^[+]?\d*\.?\d+\/[+]?\d*\.?\d+$/; |
| | | if (!new RegExp(regex).test(cellValue)&&cellValue!=null) { |
| | | callback(false, 'å
å·®è¦ç¬¦åãä¸é/è·ç¦»ãçå¡«åè§åï¼å¦: 0.16/300') // false = æªéè¿ï¼å¯ä»¥è·èªå®ä¹æç¤º |
| | | } else { |
| | | callback(true) // true = éè¿éªè¯ |
| | | } |
| | | }, |
| | | message: '${title}é»è®¤æç¤º' |
| | | }, |
| | | ] |
| | | }, |
| | | ] |
| | | }, |
| | | url: { |
| | | getNums:'/eam/precisionParametersTemplate/getNums', |
| | | add: '/eam/precisionParametersTemplate/addNew', |
| | | edit:'/eam/precisionParametersTemplate/editNew', |
| | | precisionParametersList: { |
| | | list: '/eam/precisionParametersTemplateDetail/listByPrecisionParametersTemplateId' |
| | | }, |
| | | }, |
| | | numList:[], |
| | | } |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | }, |
| | | }, |
| | | computed: { |
| | | formDisabled(){ |
| | | return this.disabled |
| | | }, |
| | | }, |
| | | created () { |
| | | }, |
| | | methods: { |
| | | addBefore(){ |
| | | this.precisionParameters |
| | | |
| | | }, |
| | | getAllTable() { |
| | | let values = this.tableKeys.map(key => getRefPromise(this, key)) |
| | | return Promise.all(values) |
| | | }, |
| | | /** è°ç¨å®edit()æ¹æ³ä¹åä¼èªå¨è°ç¨æ¤æ¹æ³ */ |
| | | editAfter() { |
| | | this.$nextTick(() => { |
| | | }) |
| | | // å è½½åè¡¨æ°æ® |
| | | if (this.model.id) { |
| | | let params = { |
| | | precisionParametersTemplateId: this.model.id, |
| | | pageSize:9999, |
| | | } |
| | | this.requestSubTableData(this.url.precisionParametersList.list, params, this.precisionParameters) |
| | | } |
| | | if(this.model.num==''){ |
| | | this.model.id = '' |
| | | } |
| | | }, |
| | | //æ ¡éªææä¸å¯¹ä¸å表表å |
| | | validateSubForm(allValues){ |
| | | return new Promise((resolve,reject)=>{ |
| | | Promise.all([ |
| | | ]).then(() => { |
| | | resolve(allValues) |
| | | }).catch(e => { |
| | | if (e.error === VALIDATE_FAILED) { |
| | | // å¦æææªéè¿è¡¨åéªè¯çå表ï¼å°±èªå¨è·³è½¬å°å®æå¨çtab |
| | | this.activeKey = e.index == null ? this.activeKey : this.refKeys[e.index] |
| | | } else { |
| | | console.error(e) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | /** æ´çæformData */ |
| | | classifyIntoFormData(allValues) { |
| | | let main = Object.assign(this.model, allValues.formValue) |
| | | let details = allValues.tablesValue[0].tableData; |
| | | for(var i=0;i<details.length;i++){ |
| | | details[i].sort=i+1; |
| | | if(details[i].tolerance!=null&&details[i].tolerance!=''&&details[i].tolerance!=undefined){ |
| | | var inf = details[i].tolerance.split('/'); |
| | | var distance = inf[1]; |
| | | var upper = inf[0]; |
| | | details[i].distance = parseFloat(distance); |
| | | details[i].upper = parseFloat(upper); |
| | | details[i].lower = 0; |
| | | } |
| | | } |
| | | return { |
| | | ...main, // å±å¼ |
| | | precisionParametersTemplateDetailList: details, |
| | | } |
| | | }, |
| | | validateError(msg){ |
| | | this.$message.error(msg) |
| | | }, |
| | | precisionParametersDetailSelect() { |
| | | let ids = [] |
| | | let tableData = this.$refs.precisionParametersList.getTableData() |
| | | for (let i = 0; i < tableData.length; i++) { |
| | | ids.push(tableData[i].precisionParametersId) |
| | | } |
| | | this.$refs.JSelectPrecisionParametersModal.showModal(ids) |
| | | this.$refs.JSelectPrecisionParametersModal.title = 'éæ©ç²¾åº¦åæ°' |
| | | this.$refs.JSelectPrecisionParametersModal.disableSubmit = false |
| | | }, |
| | | addSelected(data) { |
| | | let tableData = this.$refs.precisionParametersList.getTableData() |
| | | var tableStr = JSON.stringify(tableData) |
| | | const addRows = [] |
| | | console.log(data) |
| | | console.log(tableStr) |
| | | |
| | | for (let i = 0; i < data.length; i++) { |
| | | var precisionParameters = {} |
| | | if (tableStr.indexOf(data[i].id) == -1) { |
| | | precisionParameters = { |
| | | precisionParametersId:data[i].id, |
| | | precisionParametersName: data[i].name, |
| | | precisionParametersUda1:data[i].precisionParametersUda1, |
| | | precisionParametersTemplateId:this.model.id, |
| | | } |
| | | } |
| | | addRows.push(precisionParameters) |
| | | } |
| | | this.$refs.precisionParametersList.pushRows(addRows) |
| | | }, |
| | | selectionRows(data) { |
| | | // å¢å éä¸ç设å¤å°åè¡¨ä¸ |
| | | |
| | | this.addSelected(data) |
| | | }, |
| | | onSearchNums(searchText){ |
| | | getAction(this.url.getNums,{searchText:searchText}).then(res=>{ |
| | | if(res.success){ |
| | | this.numList = res.result |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | validateNum(rule, value, callback) { |
| | | var params = { |
| | | tableName: 'mom_eam_precision_parameters_template', |
| | | fieldName: 'num', |
| | | fieldVal: value, |
| | | dataId: this.model.id, |
| | | //æ°æ®åºä¸åå¨å段del_flag并使ç¨è¯¥å段ä½ä¸ºæªå é¤çç¥ï¼çå é¤ï¼false åå é¤ï¼true |
| | | delFlag: '0', |
| | | }; |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback(); |
| | | } else { |
| | | callback("ç¼å·å·²åå¨!"); |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="1198" |
| | | :height="600" |
| | | :visible="visible" |
| | | :maskClosable="true" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @cancel="handleCancel"> |
| | | <precision-parameters-template-edit-form |
| | | ref="realForm" |
| | | @ok="submitCallback" |
| | | :disabled="disableSubmit"/> |
| | | </j-modal> |
| | | </template> |
| | | <script> |
| | | import PrecisionParametersTemplateEditForm from './PrecisionParametersTemplateEditForm' |
| | | |
| | | export default { |
| | | name: 'WarrantyUpdateModel', |
| | | components: { |
| | | PrecisionParametersTemplateEditForm |
| | | }, |
| | | data() { |
| | | return { |
| | | title:'', |
| | | width:1500, |
| | | visible: false, |
| | | disableSubmit: false |
| | | } |
| | | }, |
| | | methods:{ |
| | | add () { |
| | | this.visible=true |
| | | this.$nextTick(()=>{ |
| | | this.$refs.realForm.addBefore(); |
| | | }) |
| | | }, |
| | | edit (record) { |
| | | this.visible=true |
| | | this.$nextTick(()=>{ |
| | | this.$refs.realForm.edit(record); |
| | | }) |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | handleOk () { |
| | | this.$refs.realForm.handleOk(); |
| | | }, |
| | | submitCallback(){ |
| | | this.$emit('ok'); |
| | | this.$bus.$emit('loadData') |
| | | this.visible = false; |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |