¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false" :class="'cust-erp-sub-tab'"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator" v-if="mainId"> |
| | | <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" |
| | | bordered |
| | | rowKey="id" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @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-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | |
| | | export default { |
| | | name: "ABCAssessmentList", |
| | | mixins:[JeecgListMixin], |
| | | components: { }, |
| | | props:{ |
| | | mainId:{ |
| | | type:String, |
| | | default:'', |
| | | required:false |
| | | } |
| | | }, |
| | | watch:{ |
| | | mainId:{ |
| | | immediate: true, |
| | | handler(val) { |
| | | if(!this.mainId){ |
| | | this.clearList() |
| | | }else{ |
| | | this.queryParam['streamId'] = val |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | description: '设å¤ABCè¯ä»·ç®¡ç页é¢', |
| | | disableMixinCreated:true, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'ç»ä¸ç¼å·', |
| | | align:"center", |
| | | dataIndex: 'num', |
| | | width:200 |
| | | }, |
| | | { |
| | | title:'设å¤åç§°', |
| | | align:"center", |
| | | dataIndex: 'name', |
| | | width:200 |
| | | }, |
| | | { |
| | | title:'设å¤åå·', |
| | | align:"center", |
| | | dataIndex: 'model', |
| | | width:200 |
| | | }, |
| | | { |
| | | title:'å¹³å使ç¨ç', |
| | | align:"center", |
| | | dataIndex: 'standardA_dictText', |
| | | width:200 |
| | | }, |
| | | { |
| | | title:'坿¿æ¢æ§', |
| | | align:"center", |
| | | dataIndex: 'standardB_dictText', |
| | | width:200 |
| | | }, |
| | | { |
| | | title:'æ
éå½±å度', |
| | | align:"center", |
| | | dataIndex: 'standardC_dictText', |
| | | width:200 |
| | | }, |
| | | { |
| | | title:'ç产è¶
差度', |
| | | align:"center", |
| | | dataIndex: 'standardD_dictText', |
| | | width:200 |
| | | }, |
| | | { |
| | | title:'æ
éé¢ç', |
| | | align:"center", |
| | | dataIndex: 'standardE_dictText', |
| | | width:200 |
| | | }, |
| | | { |
| | | title:'设å¤ä»·å¼', |
| | | align:"center", |
| | | dataIndex: 'standardF_dictText', |
| | | width:200 |
| | | }, |
| | | { |
| | | title:'æ§æ è¯', |
| | | align:"center", |
| | | dataIndex: 'equipmentImportanceId_dictText', |
| | | width:200 |
| | | }, |
| | | { |
| | | title:'æ°æ è¯', |
| | | align:"center", |
| | | dataIndex: 'finalStandard_dictText', |
| | | width:200 |
| | | }, |
| | | ], |
| | | url: { |
| | | list: "/eam/stream/listABCAssessmentByMainId", |
| | | delete: "/eam/stream/deleteABCAssessment", |
| | | deleteBatch: "/eam/stream/deleteBatchABCAssessment", |
| | | exportXlsUrl: "/eam/stream/exportABCAssessment", |
| | | importUrl: "/eam/stream/importABCAssessment", |
| | | }, |
| | | dictOptions:{ |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | clearList(){ |
| | | this.dataSource=[] |
| | | this.selectedRowKeys=[] |
| | | this.ipagination.current = 1 |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less' |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <!-- <a-button type="primary" icon="download" @click="handleExportXls('设å¤ABCè¯ä»·')">导åº</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> --> |
| | | </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" |
| | | bordered |
| | | rowKey="id" |
| | | class="j-table-force-nowrap" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" |
| | | :customRow="clickThenSelect" |
| | | @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-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <a-tabs defaultActiveKey="1"> |
| | | <a-tab-pane tab="æä½è®°å½" key="1" > |
| | | <StreamOperationList :mainId="streamOperationMainId" /> |
| | | </a-tab-pane> |
| | | <a-tab-pane tab="ABCè¯å" key="2" forceRender> |
| | | <ABCAssessmentList :mainId="aBCAssessmentMainId" /> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | | <stream-modal ref="modalForm" @ok="modalFormOk"></stream-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import StreamModal from './modules/StreamModal' |
| | | import { getAction } from '@/api/manage' |
| | | import StreamOperationList from './StreamOperationList' |
| | | import ABCAssessmentList from './ABCAssessmentList' |
| | | import '@/assets/less/TableExpand.less' |
| | | |
| | | export default { |
| | | name: "StreamList", |
| | | mixins:[JeecgListMixin], |
| | | components: { |
| | | StreamOperationList, |
| | | ABCAssessmentList, |
| | | StreamModal |
| | | }, |
| | | data () { |
| | | return { |
| | | description: '设å¤ABCè¯ä»·ç®¡ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'åæ®å·', |
| | | align:"center", |
| | | dataIndex: 'num', |
| | | width:400 |
| | | }, |
| | | { |
| | | title:'å½åèç¹', |
| | | align:"center", |
| | | dataIndex: 'status', |
| | | width:300 |
| | | }, |
| | | { |
| | | title:'åæ®ç±»å', |
| | | align:"center", |
| | | dataIndex: 'type', |
| | | width:300 |
| | | }, |
| | | { |
| | | title:'åèµ·æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'createTime', |
| | | width:300 |
| | | }, |
| | | { |
| | | title:'å起人', |
| | | align:"center", |
| | | dataIndex: 'createBy_dictText' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:200, |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/stream/list", |
| | | delete: "/eam/stream/delete", |
| | | deleteBatch: "/eam/stream/deleteBatch", |
| | | exportXlsUrl: "/eam/stream/exportXls", |
| | | importExcelUrl: "eam/stream/importExcel", |
| | | }, |
| | | dictOptions:{ |
| | | }, |
| | | /* å页忰 */ |
| | | ipagination:{ |
| | | current: 1, |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '50'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | selectedMainId:'', |
| | | superFieldList:[], |
| | | streamOperationMainId: '', |
| | | aBCAssessmentMainId: '', |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | initDictConfig(){ |
| | | }, |
| | | clickThenSelect(record) { |
| | | return { |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | onClearSelected() { |
| | | this.selectedRowKeys = []; |
| | | this.selectionRows = []; |
| | | this.selectedMainId='' |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | if(selectedRowKeys.length===1){ |
| | | this.selectedMainId=selectedRowKeys[0] |
| | | this.streamOperationMainId = selectionRows[0]['id'] |
| | | this.aBCAssessmentMainId = selectionRows[0]['id'] |
| | | }else{ |
| | | this.selectedMainId='' |
| | | this.streamOperationMainId = '' |
| | | this.aBCAssessmentMainId = '' |
| | | } |
| | | |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | | |
| | | }, |
| | | loadData(arg) { |
| | | if(!this.url.list){ |
| | | this.$message.error("请设置url.list屿§!") |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | this.onClearSelected() |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records; |
| | | this.ipagination.total = res.result.total; |
| | | } |
| | | if(res.code===510){ |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | fieldList.push({type:'string',value:'num',text:'num',dictCode:''}) |
| | | fieldList.push({type:'string',value:'status',text:'status',dictCode:''}) |
| | | fieldList.push({type:'string',value:'type',text:'åæ®ç±»å',dictCode:''}) |
| | | this.superFieldList = fieldList |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less' |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false" :class="'cust-erp-sub-tab'"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator" v-if="mainId"> |
| | | <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" |
| | | bordered |
| | | rowKey="id" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @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-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | |
| | | export default { |
| | | name: "StreamOperationList", |
| | | mixins:[JeecgListMixin], |
| | | components: { }, |
| | | props:{ |
| | | mainId:{ |
| | | type:String, |
| | | default:'', |
| | | required:false |
| | | } |
| | | }, |
| | | watch:{ |
| | | mainId:{ |
| | | immediate: true, |
| | | handler(val) { |
| | | if(!this.mainId){ |
| | | this.clearList() |
| | | }else{ |
| | | this.queryParam['streamId'] = val |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | description: '设å¤ABCè¯ä»·ç®¡ç页é¢', |
| | | disableMixinCreated:true, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title:'æåº', |
| | | align:"center", |
| | | dataIndex: 'sort', |
| | | width:60 |
| | | }, |
| | | { |
| | | title:'æä½', |
| | | align:"center", |
| | | dataIndex: 'operation', |
| | | width:400 |
| | | }, |
| | | { |
| | | title:'æä½èç¹', |
| | | align:"center", |
| | | dataIndex: 'streamId', |
| | | width:400 |
| | | }, |
| | | |
| | | { |
| | | title:'æä½äºº', |
| | | align:"center", |
| | | dataIndex: 'userId_dictText', |
| | | width:400 |
| | | }, |
| | | { |
| | | title:'æä½äººæè§', |
| | | align:"center", |
| | | dataIndex: 'remark', |
| | | width:500 |
| | | }, |
| | | ], |
| | | url: { |
| | | list: "/eam/stream/listStreamOperationByMainId", |
| | | delete: "/eam/stream/deleteStreamOperation", |
| | | deleteBatch: "/eam/stream/deleteBatchStreamOperation", |
| | | exportXlsUrl: "/eam/stream/exportStreamOperation", |
| | | importUrl: "/eam/stream/importStreamOperation", |
| | | }, |
| | | dictOptions:{ |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | clearList(){ |
| | | this.dataSource=[] |
| | | this.selectedRowKeys=[] |
| | | this.ipagination.current = 1 |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less' |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!--æ¯æå
¨å±ç¼©æ¾--> |
| | | <a-modal |
| | | :visible="visible" |
| | | :title="title" |
| | | switchFullscreen |
| | | @ok="handleSubmit" |
| | | @cancel="close" |
| | | style="top:50px" |
| | | cancelText="å
³é" |
| | | :width="1400" |
| | | > |
| | | <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="6" |
| | | > |
| | | <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="设å¤åç§°" |
| | | v-model="queryParam.name" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="3"> |
| | | <span |
| | | style="float: left;overflow: hidden;" |
| | | class="table-page-search-submitButtons" |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | @click="searchReset" |
| | | icon="reload" |
| | | style="margin-left: 10px" |
| | | >éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <a-table |
| | | ref="table" |
| | | :scroll="scrollTrigger" |
| | | size="middle" |
| | | rowKey="id" |
| | | bordered |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :rowSelection="rowSelection" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | <template slot="equipmentPhoto" 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> |
| | | </a-table> |
| | | </a-card> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { filterObj } from '@/utils/util' |
| | | import { getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | |
| | | export default { |
| | | name: 'EquipmentSelectModel', |
| | | mixins: [JeecgListMixin], |
| | | components: {}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | queryParam: {}, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: 'id', |
| | | key: 'rowIndex', |
| | | width: 50, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'ç»ä¸ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'num', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: 'center', |
| | | dataIndex: 'name', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: '设å¤åå·', |
| | | align: 'center', |
| | | dataIndex: 'model', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: '设å¤è§æ ¼', |
| | | align: 'center', |
| | | dataIndex: 'specification', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'ABCæ è¯', |
| | | align: "center", |
| | | dataIndex: 'equipmentImportanceId', |
| | | width:100 |
| | | }, |
| | | { |
| | | title: 'å
³é®è®¾å¤æ è¯', |
| | | align: "center", |
| | | dataIndex: 'specificEquipment_dictText', |
| | | width:100 |
| | | }, |
| | | { |
| | | title: '设å¤ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'equipmentStatus_dictText', |
| | | width:100 |
| | | }, |
| | | { |
| | | title: 'ææ¯ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'technologyStatus_dictText', |
| | | width:100 |
| | | }, |
| | | ], |
| | | selectedRowKeys: [], |
| | | oldSelectRows: [], |
| | | scrollTrigger: {}, |
| | | dataSource: [], |
| | | selectionRows: [], |
| | | title: 'éæ©è®¾å¤', |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['5', '10', '30', '50', '100'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | isorter: { |
| | | column: 'num', |
| | | order: 'desc' |
| | | }, |
| | | visible: false, |
| | | loading: false, |
| | | url: { |
| | | list: '/eam/equipment/list' |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | rowSelection() { |
| | | return { |
| | | type: 'checkbox', |
| | | onChange: (selectedRowKeys, selectedRows) => { |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.onSelectChange(selectedRows) |
| | | }, |
| | | getCheckboxProps: record => ({ |
| | | props: { |
| | | disabled: record.distable |
| | | } |
| | | }), |
| | | selectedRowKeys: this.selectedRowKeys |
| | | } |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | async loadData(arg) { |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | let that = this |
| | | this.loading = true |
| | | let params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | // params.equipmentStatus = '1' |
| | | await getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | for (let i = 0; i < res.result.records.length; i++) { |
| | | if (that.oldSelectRows.indexOf(res.result.records[i].id) > -1) { |
| | | res.result.records[i].distable = true |
| | | } else { |
| | | res.result.records[i].distable = false |
| | | } |
| | | } |
| | | this.dataSource = res.result.records |
| | | this.ipagination.total = res.result.total |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | showModals(oldSelectRows) { |
| | | this.oldSelectRows = oldSelectRows |
| | | this.visible = true |
| | | this.loadData(1) |
| | | }, |
| | | getQueryParams() { |
| | | let param = Object.assign({}, this.queryParam, this.isorter) |
| | | param.field = this.getQueryField() |
| | | param.pageNo = this.ipagination.current |
| | | param.pageSize = this.ipagination.pageSize |
| | | return filterObj(param) |
| | | }, |
| | | //æ¥è¯¢æ¡ä»¶å¤ç |
| | | getQueryField() { |
| | | let str = 'id,' |
| | | for (let a = 0; a < this.columns.length; a++) { |
| | | str += ',' + this.columns[a].dataIndex |
| | | } |
| | | return str |
| | | }, |
| | | searchReset(num) { |
| | | let that = this |
| | | this.queryParam = [] |
| | | if (num !== 0) { |
| | | that.loadData(1) |
| | | } |
| | | that.selectborrowIds = [] |
| | | }, |
| | | close() { |
| | | this.searchReset(0) |
| | | this.selectedRowKeys = [] |
| | | this.visible = false |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | //TODO çé |
| | | |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter.column = sorter.field |
| | | this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc' |
| | | } |
| | | this.ipagination = pagination |
| | | this.loadData() |
| | | }, |
| | | handleSubmit() { |
| | | this.$emit('selectionRows', this.selectionRows) |
| | | this.searchReset(0) |
| | | this.close() |
| | | }, |
| | | onSelectChange(selectionRows) { |
| | | this.selectionRows = selectionRows |
| | | }, |
| | | searchQuery() { |
| | | this.loadData(1) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | } |
| | | |
| | | #components-layout-demo-custom-trigger .trigger { |
| | | font-size: 18px; |
| | | line-height: 64px; |
| | | padding: 0 24px; |
| | | cursor: pointer; |
| | | transition: color 0.3s; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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-input v-model="model.num" placeholder="ç³»ç»èªå¨çæ" :disabled="true" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item |
| | | label="æ°ABCæ è¯" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="finalStandard" |
| | | :disabled="true" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="true" |
| | | placeholder="è¯·éæ©ABCæ è¯" |
| | | :triggerChange="true" |
| | | dictCode="ABC-standard-result" |
| | | v-model="model.finalStandard" |
| | | /> |
| | | </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="standardA" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | placeholder="è¯·éæ©å¹³å使ç¨ç" |
| | | :disabled="formDisabled" |
| | | :triggerChange="true" |
| | | dictCode="ABC-standardA" |
| | | v-model="model.standardA" |
| | | @change="(e) =>standardResultCompute(e,'A')" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item |
| | | label="坿¿æ¢æ§" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="standardB" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | placeholder="è¯·éæ©å¯æ¿æ¢æ§" |
| | | :disabled="formDisabled" |
| | | :triggerChange="true" |
| | | dictCode="ABC-standardB" |
| | | v-model="model.standardB" |
| | | @change="(e) =>standardResultCompute(e,'B')" |
| | | /> |
| | | </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="standardC" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | placeholder="è¯·éæ©æ
éå½±å度" |
| | | :disabled="formDisabled" |
| | | :triggerChange="true" |
| | | dictCode="ABC-standardC" |
| | | v-model="model.standardC" |
| | | @change="(e) =>standardResultCompute(e,'C')" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item |
| | | label="ç产è¶
差度" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="standardD" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | placeholder="è¯·éæ©ç产è¶
差度" |
| | | :disabled="formDisabled" |
| | | :triggerChange="true" |
| | | dictCode="ABC-standardD" |
| | | v-model="model.standardD" |
| | | @change="(e) =>standardResultCompute(e,'D')" |
| | | /> |
| | | </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="standardE" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | placeholder="è¯·éæ©æ
éé¢ç" |
| | | :disabled="formDisabled" |
| | | :triggerChange="true" |
| | | dictCode="ABC-standardE" |
| | | v-model="model.standardE" |
| | | @change="(e) =>standardResultCompute(e,'E')" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item |
| | | label="设å¤ä»·å¼" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="standardF" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | placeholder="è¯·éæ©è®¾å¤ä»·å¼" |
| | | :disabled="formDisabled" |
| | | :triggerChange="true" |
| | | dictCode="ABC-standardF" |
| | | v-model="model.standardF" |
| | | @change="(e) =>standardResultCompute(e,'F')" |
| | | /> |
| | | </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="ABCè¯ä»·" :key="refKeys[0]" :forceRender="true"> |
| | | <j-vxe-table |
| | | keep-source |
| | | :ref="refKeys[0]" |
| | | :loading="aBCAssessmentTable.loading" |
| | | :columns="aBCAssessmentTable.columns" |
| | | :dataSource="aBCAssessmentTable.dataSource" |
| | | :maxHeight="300" |
| | | :disabled="formDisabled" |
| | | :rowNumber="true" |
| | | :rowSelection="true" |
| | | :toolbar="true" |
| | | :alwaysEdit="true" |
| | | @valueChange="changeDate" |
| | | :toolbarConfig="toolbarConfig" |
| | | > |
| | | <template slot="toolbarPrefix"> |
| | | <a-button type="primary" @click="selectEquipmentList" :disabled="formDisabled">éæ©è®¾å¤ |
| | | </a-button> |
| | | </template> |
| | | </j-vxe-table> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <equipment-select-model ref="EquipmentSelectModal" @selectionRows="addSelectedEquipments"></equipment-select-model> |
| | | </a-spin> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { getAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | 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 EquipmentSelectModel from './EquipmentSelectModel' |
| | | |
| | | export default { |
| | | name: 'StreamForm', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | JFormContainer, |
| | | EquipmentSelectModel |
| | | }, |
| | | 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: { |
| | | }, |
| | | refKeys: ['aBCAssessment' ], |
| | | tableKeys:[ 'aBCAssessment' ], |
| | | activeKey: 'streamOperation', |
| | | // ABCè¯ä»· |
| | | aBCAssessmentTable: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'ç»ä¸ç¼ç ', |
| | | key: 'num', |
| | | type: JVXETypes.normal, |
| | | width:"250px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | disabled:true, |
| | | align:'center', |
| | | defaultValue:'', |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | key: 'name', |
| | | type: JVXETypes.normal, |
| | | width:"250px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | disabled:true, |
| | | align:'center', |
| | | defaultValue:'', |
| | | }, |
| | | { |
| | | title: '设å¤åå·', |
| | | key: 'model', |
| | | type: JVXETypes.normal, |
| | | width:"250px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | disabled:true, |
| | | align:'center', |
| | | defaultValue:'', |
| | | }, |
| | | { |
| | | title: '设å¤ID', |
| | | key: 'equipmentId', |
| | | type: JVXETypes.hidden, |
| | | width:"250px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | align:'center', |
| | | }, |
| | | { |
| | | title: 'å¹³å使ç¨ç', |
| | | key: 'standardA', |
| | | type: JVXETypes.select, |
| | | width:"250px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | dictCode:'ABC-standardA', |
| | | options:[], |
| | | align:'center', |
| | | validateRules: [ |
| | | { |
| | | required: true, // å¿
å¡« |
| | | message: '请è¾å
¥${title}' // æ¾ç¤ºçææ¬ |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | title: '坿¿æ¢æ§', |
| | | key: 'standardB', |
| | | type: JVXETypes.select, |
| | | width:"250px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | dictCode:'ABC-standardB', |
| | | options:[], |
| | | align:'center', |
| | | validateRules: [ |
| | | { |
| | | required: true, // å¿
å¡« |
| | | message: '请è¾å
¥${title}' // æ¾ç¤ºçææ¬ |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | title: 'æ
éå½±å度', |
| | | key: 'standardC', |
| | | type: JVXETypes.select, |
| | | width:"250px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | dictCode:'ABC-standardC', |
| | | options:[], |
| | | align:'center', |
| | | validateRules: [ |
| | | { |
| | | required: true, // å¿
å¡« |
| | | message: '请è¾å
¥${title}' // æ¾ç¤ºçææ¬ |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | title: 'ç产è¶
差度', |
| | | key: 'standardD', |
| | | type: JVXETypes.select, |
| | | width:"250px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | dictCode:'ABC-standardD', |
| | | options:[], |
| | | align:'center', |
| | | validateRules: [ |
| | | { |
| | | required: true, // å¿
å¡« |
| | | message: '请è¾å
¥${title}' // æ¾ç¤ºçææ¬ |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | title: 'æ
éé¢ç', |
| | | key: 'standardE', |
| | | type: JVXETypes.select, |
| | | width:"250px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | dictCode:'ABC-standardE', |
| | | options:[], |
| | | align:'center', |
| | | validateRules: [ |
| | | { |
| | | required: true, // å¿
å¡« |
| | | message: '请è¾å
¥${title}' // æ¾ç¤ºçææ¬ |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | title: '设å¤ä»·å¼', |
| | | key: 'standardF', |
| | | type: JVXETypes.select, |
| | | width:"250px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | dictCode:'ABC-standardF', |
| | | options:[], |
| | | align:'center', |
| | | validateRules: [ |
| | | { |
| | | required: true, // å¿
å¡« |
| | | message: '请è¾å
¥${title}' // æ¾ç¤ºçææ¬ |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | title: 'æ§æ è¯', |
| | | key: 'equipmentImportanceId', |
| | | type: JVXETypes.select, |
| | | width:"250px", |
| | | disabled:true, |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | dictCode:'ABC-standard-result', |
| | | options:[], |
| | | align:'center', |
| | | }, |
| | | { |
| | | title: 'æ°æ è¯', |
| | | key: 'finalStandard', |
| | | type: JVXETypes.select, |
| | | width:"250px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | dictCode:'ABC-standard-result', |
| | | options:[], |
| | | align:'center', |
| | | validateRules: [ |
| | | { |
| | | required: true, // å¿
å¡« |
| | | message: '请è¾å
¥${title}' // æ¾ç¤ºçææ¬ |
| | | }, |
| | | ] |
| | | }, |
| | | ] |
| | | }, |
| | | url: { |
| | | add: "/eam/stream/add", |
| | | edit: "/eam/stream/edit", |
| | | queryById: "/eam/stream/queryById", |
| | | getNum:'/eam/sysIdentity/getNumNew', |
| | | aBCAssessment: { |
| | | list: '/eam/stream/queryABCAssessmentByMainId' |
| | | }, |
| | | } |
| | | } |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled(){ |
| | | return this.disabled |
| | | }, |
| | | }, |
| | | created () { |
| | | }, |
| | | methods: { |
| | | addBefore(){ |
| | | let that = this; |
| | | let param = { |
| | | type: 'ABCAssement', |
| | | length: 4 |
| | | }; |
| | | getAction(this.url.getNum,param).then(res=>{ |
| | | if(res.success){ |
| | | that.model.num = res.result; |
| | | } |
| | | }) |
| | | this.aBCAssessmentTable.dataSource=[] |
| | | }, |
| | | getAllTable() { |
| | | let values = this.tableKeys.map(key => getRefPromise(this, key)) |
| | | return Promise.all(values) |
| | | }, |
| | | /** è°ç¨å®edit()æ¹æ³ä¹åä¼èªå¨è°ç¨æ¤æ¹æ³ */ |
| | | editAfter() { |
| | | this.$nextTick(() => { |
| | | }) |
| | | // å è½½åè¡¨æ°æ® |
| | | if (this.model.id) { |
| | | let params = { id: this.model.id } |
| | | this.requestSubTableData(this.url.aBCAssessment.list, params, this.aBCAssessmentTable) |
| | | } |
| | | }, |
| | | //æ ¡éªææä¸å¯¹ä¸å表表å |
| | | 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) |
| | | return { |
| | | ...main, // å±å¼ |
| | | assessmentList: allValues.tablesValue[0].tableData |
| | | } |
| | | }, |
| | | validateError(msg){ |
| | | this.$message.error(msg) |
| | | }, |
| | | standardResultCompute(e,index) { |
| | | let keyIndex = 'standard'+index; |
| | | let tableData =this.$refs.aBCAssessment.getTableData(); |
| | | for(var i = 0;i<tableData.length;i++){ |
| | | let row = this.$refs.aBCAssessment.getRowById(tableData[i].equipmentId); |
| | | row[keyIndex]=e |
| | | this.changeDateByRow(row); |
| | | } |
| | | var standardA = this.model.standardA == null || this.model.standardA == undefined || this.model.standardA == '' ? 0 : parseInt(this.model.standardA); |
| | | var standardB = this.model.standardB == null || this.model.standardB == undefined || this.model.standardB == '' ? 0 : parseInt(this.model.standardB); |
| | | var standardC = this.model.standardA == null || this.model.standardC == undefined || this.model.standardC == '' ? 0 : parseInt(this.model.standardC); |
| | | var standardD = this.model.standardD == null || this.model.standardD == undefined || this.model.standardD == '' ? 0 : parseInt(this.model.standardD); |
| | | var standardE = this.model.standardE == null || this.model.standardE == undefined || this.model.standardE == '' ? 0 : parseInt(this.model.standardE); |
| | | var standardF = this.model.standardF == null || this.model.standardF == undefined || this.model.standardF == '' ? 0 : parseInt(this.model.standardF); |
| | | var sum = standardA + standardB + standardC + standardD + standardE + standardF; |
| | | console.log(sum) |
| | | if (sum >= 18) { |
| | | this.model.finalStandard = 'A' |
| | | } else if (sum >= 10 && sum <= 17) { |
| | | this.model.finalStandard = 'B' |
| | | } else { |
| | | this.model.finalStandard = 'C' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | //éæ©è®¾å¤ |
| | | selectEquipmentList() { |
| | | let ids = [] |
| | | let tableData = this.$refs.aBCAssessment.getTableData() |
| | | let deleteData = this.$refs.aBCAssessment.getDeleteData() |
| | | for (let i = 0; i < tableData.length; i++) { |
| | | ids.push(tableData[i].equipmentId) |
| | | } |
| | | this.$refs.EquipmentSelectModal.showModals(ids) |
| | | this.$refs.EquipmentSelectModal.title = 'éæ©è®¾å¤' |
| | | this.$refs.EquipmentSelectModal.disableSubmit = false |
| | | }, |
| | | addSelectedEquipments(data) { |
| | | let tableData = this.$refs.aBCAssessment.getTableData() |
| | | // const seletedEquipmentIds = tableData. |
| | | var tableStr = JSON.stringify(tableData) |
| | | const addRows = [] |
| | | for (let i = 0; i < data.length; i++) { |
| | | var equipment = {} |
| | | if (tableStr.indexOf(data[i].id)==-1) { |
| | | equipment = { |
| | | id:data[i].id, |
| | | equipmentId: data[i].id, |
| | | num: data[i].num, |
| | | name: data[i].name, |
| | | model:data[i].model, |
| | | equipmentImportanceId:data[i].equipmentImportanceId, |
| | | } |
| | | } |
| | | addRows.push(equipment) |
| | | } |
| | | this.$refs.aBCAssessment.pushRows(addRows) |
| | | }, |
| | | changeDate(target){ |
| | | var standardA = target.row.standardA == null || target.row.standardA == undefined || target.row.standardA == '' ? 0 : parseInt(target.row.standardA); |
| | | var standardB = target.row.standardB == null || target.row.standardB == undefined || target.row.standardB == '' ? 0 : parseInt(target.row.standardB); |
| | | var standardC = target.row.standardA == null || target.row.standardC == undefined || target.row.standardC == '' ? 0 : parseInt(target.row.standardC); |
| | | var standardD = target.row.standardD == null || target.row.standardD == undefined || target.row.standardD == '' ? 0 : parseInt(target.row.standardD); |
| | | var standardE = target.row.standardE == null || target.row.standardE == undefined || target.row.standardE == '' ? 0 : parseInt(target.row.standardE); |
| | | var standardF = target.row.standardF == null || target.row.standardF == undefined || target.row.standardF == '' ? 0 : parseInt(target.row.standardF); |
| | | var sum = standardA + standardB + standardC + standardD + standardE + standardF; |
| | | console.log(sum) |
| | | if (sum >= 18) { |
| | | target.row.finalStandard = 'A' |
| | | } else if (sum >= 10 && sum <= 17) { |
| | | target.row.finalStandard = 'B' |
| | | } else { |
| | | target.row.finalStandard = 'C' |
| | | } |
| | | }, |
| | | changeDateByRow(row){ |
| | | var standardA = row.standardA == null || row.standardA == undefined || row.standardA == '' ? 0 : parseInt(row.standardA); |
| | | var standardB = row.standardB == null || row.standardB == undefined || row.standardB == '' ? 0 : parseInt(row.standardB); |
| | | var standardC = row.standardA == null || row.standardC == undefined || row.standardC == '' ? 0 : parseInt(row.standardC); |
| | | var standardD = row.standardD == null || row.standardD == undefined || row.standardD == '' ? 0 : parseInt(row.standardD); |
| | | var standardE = row.standardE == null || row.standardE == undefined || row.standardE == '' ? 0 : parseInt(row.standardE); |
| | | var standardF = row.standardF == null || row.standardF == undefined || row.standardF == '' ? 0 : parseInt(row.standardF); |
| | | var sum = standardA + standardB + standardC + standardD + standardE + standardF; |
| | | if (sum >= 18) { |
| | | row.finalStandard = 'A' |
| | | } else if (sum >= 10 && sum <= 17) { |
| | | row.finalStandard = 'B' |
| | | } else { |
| | | row.finalStandard = 'C' |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="1200" |
| | | :visible="visible" |
| | | :maskClosable="false" |
| | | switchFullscreen |
| | | :fullscreen="true" |
| | | @ok="handleOk" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @cancel="handleCancel"> |
| | | <stream-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import StreamForm from './StreamForm' |
| | | |
| | | export default { |
| | | name: 'StreamModal', |
| | | components: { |
| | | StreamForm |
| | | }, |
| | | 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.handleOk(); |
| | | }, |
| | | submitCallback(){ |
| | | this.$emit('ok'); |
| | | this.visible = false; |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |