|
|
|
@ -31,7 +31,8 @@ |
|
|
|
|
|
|
|
|
|
<!-- 操作按钮区域 --> |
|
|
|
|
<div class="table-operator"> |
|
|
|
|
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
|
|
|
|
<a-button @click="zyStyleFabricHandleAdd(stationId)" type="primary" icon="plus">新增</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">--> |
|
|
|
@ -49,7 +50,6 @@ |
|
|
|
|
</a-button> |
|
|
|
|
</a-dropdown> |
|
|
|
|
<a-button type="primary" @click="fanHui()">返回</a-button> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- table区域-begin --> |
|
|
|
@ -96,7 +96,7 @@ |
|
|
|
|
<!-- table区域-end --> |
|
|
|
|
|
|
|
|
|
<!-- 表单区域 --> |
|
|
|
|
<stationTool-modal ref="modalForm" @ok="modalFormOk"></stationTool-modal> |
|
|
|
|
<stationTool-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></stationTool-modal> |
|
|
|
|
</a-card> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -105,6 +105,8 @@ import '@/assets/less/TableExpand.less' |
|
|
|
|
import {mixinDevice} from '@/utils/mixin' |
|
|
|
|
import StationToolModal from './modules/StationToolModal' |
|
|
|
|
import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
|
|
|
|
import {getAction} from "@api/manage"; |
|
|
|
|
import {filterObj} from "@/utils/util"; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
name: "StationToolList", |
|
|
|
@ -132,6 +134,11 @@ export default { |
|
|
|
|
align: "center", |
|
|
|
|
dataIndex: 'stationId' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '工位名称', |
|
|
|
|
align: "center", |
|
|
|
|
dataIndex: 'stationName', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '工具ID', |
|
|
|
|
align: "center", |
|
|
|
@ -151,8 +158,17 @@ export default { |
|
|
|
|
exportXlsUrl: "/stationTool/exportXls", |
|
|
|
|
importExcelUrl: "/stationTool/importExcel", |
|
|
|
|
}, |
|
|
|
|
//参数 |
|
|
|
|
loadRouteType: false, |
|
|
|
|
stationId: "", |
|
|
|
|
stationName: "", |
|
|
|
|
dictOptions: {}, |
|
|
|
|
superFieldList: [], |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
this.loadParameter(); |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
importExcelUrl: function () { |
|
|
|
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
|
|
|
@ -161,14 +177,70 @@ export default { |
|
|
|
|
methods: { |
|
|
|
|
fanHui() { |
|
|
|
|
this.$router.push({ |
|
|
|
|
path: '/team/StationList', |
|
|
|
|
// query: { // 路由携带参数 |
|
|
|
|
// 'id': record.id, |
|
|
|
|
// 'typeId': record.typeId, |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
path: '/src/views/team/StationList', |
|
|
|
|
// path: '/src/views/zyclothsstyle/ZyClothsStyleList', |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// initDictConfig() { |
|
|
|
|
// }, |
|
|
|
|
valueChange(value) { |
|
|
|
|
if (value) this.loadData() |
|
|
|
|
}, |
|
|
|
|
//加载传递参数 |
|
|
|
|
loadParameter() { |
|
|
|
|
if (this.loadRouteType === false) { |
|
|
|
|
this.stationId = this.$route.query.stationId; |
|
|
|
|
this.stationName = this.$route.query.stationName; |
|
|
|
|
// this.biaoTi = this.$route.query.styleNames+"款式面料管理"; |
|
|
|
|
// console.log("*******传递的stationId:" + this.stationId) |
|
|
|
|
this.loadRouteType = true; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
loadData(arg) { |
|
|
|
|
if (!this.url.list) { |
|
|
|
|
this.$message.error("请设置url.list属性!") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
//加载数据 若传入参数1则加载第一页的内容 |
|
|
|
|
if (arg === 1) { |
|
|
|
|
this.ipagination.current = 1; |
|
|
|
|
} |
|
|
|
|
this.loadParameter(); |
|
|
|
|
var params = this.getQueryParams();//查询条件 |
|
|
|
|
this.loading = true; |
|
|
|
|
console.log("----------------the params:", params); |
|
|
|
|
getAction(this.url.list, params).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
this.dataSource = res.result.records || res.result; |
|
|
|
|
if (res.result.total) { |
|
|
|
|
this.ipagination.total = res.result.total; |
|
|
|
|
} else { |
|
|
|
|
this.ipagination.total = 0; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
this.$message.warning(res.message) |
|
|
|
|
} |
|
|
|
|
}).finally(() => { |
|
|
|
|
this.dataSource.forEach(item => { |
|
|
|
|
item['stationName'] = this.stationName; |
|
|
|
|
}) |
|
|
|
|
this.loading = false |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
getQueryParams() { |
|
|
|
|
//获取查询条件 |
|
|
|
|
let sqp = {} |
|
|
|
|
if (this.superQueryParams) { |
|
|
|
|
sqp['superQueryParams'] = encodeURI(this.superQueryParams) |
|
|
|
|
sqp['superQueryMatchType'] = this.superQueryMatchType |
|
|
|
|
} |
|
|
|
|
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters); |
|
|
|
|
param.field = this.getQueryField(); |
|
|
|
|
param.pageNo = this.ipagination.current; |
|
|
|
|
param.pageSize = this.ipagination.pageSize; |
|
|
|
|
param.stationId = this.stationId; |
|
|
|
|
return filterObj(param); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|