parent
7fb4946dfe
commit
206438c0ad
9 changed files with 643 additions and 679 deletions
@ -1,422 +1,422 @@ |
|||||||
<template> |
<!--<template>--> |
||||||
<a-card :bordered="false"> |
<!-- <a-card :bordered="false">--> |
||||||
<div class="table-operator"> |
<!-- <div class="table-operator">--> |
||||||
<a-button type="primary" icon="download" @click="handleExportXls('计划工序')">导出</a-button> |
<!-- <a-button type="primary" icon="download" @click="handleExportXls('计划工序')">导出</a-button>--> |
||||||
<a-button type="primary" @click="fanHui()">保存</a-button> |
<!-- <a-button type="primary" @click="fanHui()">保存</a-button>--> |
||||||
<a-button type="primary" @click="fanHui()">返回</a-button> |
<!-- <a-button type="primary" @click="fanHui()">返回</a-button>--> |
||||||
</div> |
<!-- </div>--> |
||||||
|
|
||||||
<!-- table区域-begin --> |
<!-- <!– table区域-begin –>--> |
||||||
<div> |
<!-- <div>--> |
||||||
<a-table |
<!-- <a-table--> |
||||||
ref="table" |
<!-- ref="table"--> |
||||||
size="middle" |
<!-- size="middle"--> |
||||||
:scroll="{x:true}" |
<!-- :scroll="{x:true}"--> |
||||||
bordered |
<!-- bordered--> |
||||||
rowKey="id" |
<!-- rowKey="id"--> |
||||||
:columns="columns" |
<!-- :columns="columns"--> |
||||||
:dataSource="dataSource" |
<!-- :dataSource="dataSource"--> |
||||||
:pagination="ipagination" |
<!-- :pagination="ipagination"--> |
||||||
:loading="loading" |
<!-- :loading="loading"--> |
||||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
<!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"--> |
||||||
class="j-table-force-nowrap" |
<!-- class="j-table-force-nowrap"--> |
||||||
@change="handleTableChange"> |
<!-- @change="handleTableChange">--> |
||||||
<span slot="stationList" slot-scope="stationList"> |
<!-- <span slot="stationList" slot-scope="stationList">--> |
||||||
<a-select @change="getToolAndMachine" style="width: 180px" placeholder="请选择"> |
<!-- <a-select @change="getToolAndMachine" style="width: 180px" placeholder="请选择">--> |
||||||
<a-select-option v-for="item in stationList" :value="item.id"> |
<!-- <a-select-option v-for="item in stationList" :value="item.id">--> |
||||||
{{ item.stationName }} |
<!-- {{ item.stationName }}--> |
||||||
</a-select-option> |
<!-- </a-select-option>--> |
||||||
</a-select> |
<!-- </a-select>--> |
||||||
</span> |
<!-- </span>--> |
||||||
|
|
||||||
<span slot="toolsList" slot-scope="toolsList"> |
<!-- <span slot="toolsList" slot-scope="toolsList">--> |
||||||
<a-select style="width: 180px" placeholder="请选择"> |
<!-- <a-select style="width: 180px" placeholder="请选择">--> |
||||||
<a-select-option v-for="item in toolsList" :value="item.id"> |
<!-- <a-select-option v-for="item in toolsList" :value="item.id">--> |
||||||
{{ item.name }} |
<!-- {{ item.name }}--> |
||||||
</a-select-option> |
<!-- </a-select-option>--> |
||||||
</a-select> |
<!-- </a-select>--> |
||||||
</span> |
<!-- </span>--> |
||||||
|
|
||||||
<span slot="machineList" slot-scope="machineList"> |
<!-- <span slot="machineList" slot-scope="machineList">--> |
||||||
<a-select style="width: 180px" placeholder="请选择"> |
<!-- <a-select style="width: 180px" placeholder="请选择">--> |
||||||
<a-select-option v-for="item in machineList" :value="item.id"> |
<!-- <a-select-option v-for="item in machineList" :value="item.id">--> |
||||||
{{ item.name }} |
<!-- {{ item.name }}--> |
||||||
</a-select-option> |
<!-- </a-select-option>--> |
||||||
</a-select> |
<!-- </a-select>--> |
||||||
</span> |
<!-- </span>--> |
||||||
|
|
||||||
<span slot="proProcess" slot-scope="proProcess"> |
<!-- <span slot="proProcess" slot-scope="proProcess">--> |
||||||
<j-search-select-tag type="list" dict="zy_process,process_name,id,id in(select process_id from zy_product_process where product_id='1')" pidField="pid" |
<!-- <j-search-select-tag type="list" dict="zy_process,process_name,id,id in(select process_id from zy_product_process where product_id='1')" pidField="pid"--> |
||||||
pidValue="" placeholder="前导工序"/> |
<!-- pidValue="" placeholder="前导工序"/>--> |
||||||
</span> |
<!-- </span>--> |
||||||
<span slot="postProcess" slot-scope="postProcess"> |
<!-- <span slot="postProcess" slot-scope="postProcess">--> |
||||||
<j-search-select-tag type="list" dict="zy_process,process_name,id,id in(select process_id from zy_product_process where product_id='1')" pidField="pid" |
<!-- <j-search-select-tag type="list" dict="zy_process,process_name,id,id in(select process_id from zy_product_process where product_id='1')" pidField="pid"--> |
||||||
pidValue="" placeholder="后导工序"/> |
<!-- pidValue="" placeholder="后导工序"/>--> |
||||||
</span> |
<!-- </span>--> |
||||||
|
|
||||||
<span slot="inputProduct" slot-scope="inputProduct"> |
<!-- <span slot="inputProduct" slot-scope="inputProduct">--> |
||||||
<a-input v-model="processIds" placeholder="请输入产品"></a-input> |
<!-- <a-input v-model="processIds" placeholder="请输入产品"></a-input>--> |
||||||
</span> |
<!-- </span>--> |
||||||
<span slot="semiProduct" slot-scope="semiProduct"> |
<!-- <span slot="semiProduct" slot-scope="semiProduct">--> |
||||||
<a-input v-model="semiProduct" placeholder="请输入成品/半成品"></a-input> |
<!-- <a-input v-model="semiProduct" placeholder="请输入成品/半成品"></a-input>--> |
||||||
</span> |
<!-- </span>--> |
||||||
|
|
||||||
<!-- <template |
<!-- <!– <template--> |
||||||
v-for="col in columns" |
<!-- v-for="col in columns"--> |
||||||
:slot="col" |
<!-- :slot="col"--> |
||||||
slot-scope="text, record, index" |
<!-- slot-scope="text, record, index"--> |
||||||
> |
<!-- >--> |
||||||
<div :key="col"> |
<!-- <div :key="col">--> |
||||||
<a-input |
<!-- <a-input--> |
||||||
v-if="record.editable" |
<!-- v-if="record.editable"--> |
||||||
style="margin: -5px 0" |
<!-- style="margin: -5px 0"--> |
||||||
:value="text" |
<!-- :value="text"--> |
||||||
@change="e => handleChange(e.target.value, record.key, col)" |
<!-- @change="e => handleChange(e.target.value, record.key, col)"--> |
||||||
/> |
<!-- />--> |
||||||
<template v-else> |
<!-- <template v-else>--> |
||||||
{{ text }} |
<!-- {{ text }}--> |
||||||
</template> |
<!-- </template>--> |
||||||
</div> |
<!-- </div>--> |
||||||
</template> |
<!-- </template>--> |
||||||
<template slot="operation" slot-scope="text, record, index"> |
<!-- <template slot="operation" slot-scope="text, record, index">--> |
||||||
<div class="editable-row-operations"> |
<!-- <div class="editable-row-operations">--> |
||||||
<span v-if="record.editable"> |
<!-- <span v-if="record.editable">--> |
||||||
<a @click="() => save(record)">Save</a> |
<!-- <a @click="() => save(record)">Save</a>--> |
||||||
<a-popconfirm title="Sure to cancel?" @confirm="() => cancel(record)"> |
<!-- <a-popconfirm title="Sure to cancel?" @confirm="() => cancel(record)">--> |
||||||
<a>Cancel</a> |
<!-- <a>Cancel</a>--> |
||||||
</a-popconfirm> |
<!-- </a-popconfirm>--> |
||||||
</span> |
<!-- </span>--> |
||||||
<span> |
<!-- <span>--> |
||||||
<a :disabled="editingKey !== ''" @click="() => edit(index)">Edit66</a> |
<!-- <a :disabled="editingKey !== ''" @click="() => edit(index)">Edit66</a>--> |
||||||
</span> b |
<!-- </span> b--> |
||||||
</div> |
<!-- </div>--> |
||||||
</template>--> |
<!-- </template>–>--> |
||||||
</a-table> |
<!-- </a-table>--> |
||||||
</div> |
<!-- </div>--> |
||||||
|
|
||||||
<div class="table-operator" style="text-align: right"> |
<!-- <div class="table-operator" style="text-align: right">--> |
||||||
<a-button type="primary" @click="fanHui()">提交</a-button> |
<!-- <a-button type="primary" @click="fanHui()">提交</a-button>--> |
||||||
</div> |
<!-- </div>--> |
||||||
|
|
||||||
<!-- <zy-plan-process-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>--> |
<!-- <!– <zy-plan-process-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>–>--> |
||||||
</a-card> |
<!-- </a-card>--> |
||||||
</template> |
<!--</template>--> |
||||||
|
|
||||||
<script> |
<!--<script>--> |
||||||
|
|
||||||
import '@/assets/less/TableExpand.less' |
<!--import '@/assets/less/TableExpand.less'--> |
||||||
import {mixinDevice} from '@/utils/mixin' |
<!--import {mixinDevice} from '@/utils/mixin'--> |
||||||
import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
<!--import {JeecgListMixin} from '@/mixins/JeecgListMixin'--> |
||||||
import ZyPlanProcessModal from './modules/ZyPlanProcessModal2' |
<!--import ZyPlanProcessModal from './modules/ZyPlanProcessModal2'--> |
||||||
import {getAction} from "@api/manage"; |
<!--import {getAction} from "@api/manage";--> |
||||||
import {filterObj} from "@/utils/util"; |
<!--import {filterObj} from "@/utils/util";--> |
||||||
|
|
||||||
export default { |
<!--export default {--> |
||||||
name: 'ZyPlanProcessList', |
<!-- name: 'ZyPlanProcessList',--> |
||||||
mixins: [JeecgListMixin, mixinDevice], |
<!-- mixins: [JeecgListMixin, mixinDevice],--> |
||||||
components: { |
<!-- components: {--> |
||||||
ZyPlanProcessModal |
<!-- ZyPlanProcessModal--> |
||||||
}, |
<!-- },--> |
||||||
data() { |
<!-- data() {--> |
||||||
// this.cacheData = this.dataSource.map(item => ({ ...item })); |
<!-- // this.cacheData = this.dataSource.map(item => ({ ...item }));--> |
||||||
this.cacheData = []; |
<!-- this.cacheData = [];--> |
||||||
return { |
<!-- return {--> |
||||||
description: '生产计划工序管理页面', |
<!-- description: '生产计划工序管理页面',--> |
||||||
// columns, |
<!-- // columns,--> |
||||||
// 表头 |
<!-- // 表头--> |
||||||
columns: [ |
<!-- columns: [--> |
||||||
{ |
<!-- {--> |
||||||
title: '#', |
<!-- title: '#',--> |
||||||
dataIndex: 'productProcessId', |
<!-- dataIndex: 'productProcessId',--> |
||||||
key: 'rowIndex', |
<!-- key: 'rowIndex',--> |
||||||
width: 60, |
<!-- width: 60,--> |
||||||
align: "center", |
<!-- align: "center",--> |
||||||
customRender: function (t, r, index) { |
<!-- customRender: function (t, r, index) {--> |
||||||
return parseInt(index) + 1; |
<!-- return parseInt(index) + 1;--> |
||||||
} |
<!-- }--> |
||||||
}, |
<!-- },--> |
||||||
/* { |
<!-- /* {--> |
||||||
title: '计划id', |
<!-- title: '计划id',--> |
||||||
align: "center", |
<!-- align: "center",--> |
||||||
dataIndex: 'planId' |
<!-- dataIndex: 'planId'--> |
||||||
},*/ |
<!-- },*/--> |
||||||
{ |
<!-- {--> |
||||||
title: '工单编号', |
<!-- title: '工单编号',--> |
||||||
align: "center", |
<!-- align: "center",--> |
||||||
dataIndex: 'workOrderId', |
<!-- dataIndex: 'workOrderId',--> |
||||||
scopedSlots: {customRender: 'workOrderId'} |
<!-- scopedSlots: {customRender: 'workOrderId'}--> |
||||||
}, |
<!-- },--> |
||||||
/*{ |
<!-- /*{--> |
||||||
title: '产品id', |
<!-- title: '产品id',--> |
||||||
align: "center", |
<!-- align: "center",--> |
||||||
dataIndex: 'productId' |
<!-- dataIndex: 'productId'--> |
||||||
}, |
<!-- },--> |
||||||
{ |
<!-- {--> |
||||||
title: '工序id', |
<!-- title: '工序id',--> |
||||||
align: "center", |
<!-- align: "center",--> |
||||||
dataIndex: 'productProcessId' |
<!-- dataIndex: 'productProcessId'--> |
||||||
},*/ |
<!-- },*/--> |
||||||
{ |
<!-- {--> |
||||||
title: '产品', |
<!-- title: '产品',--> |
||||||
align: "center", |
<!-- align: "center",--> |
||||||
dataIndex: 'productName' |
<!-- dataIndex: 'productName'--> |
||||||
}, |
<!-- },--> |
||||||
{ |
<!-- {--> |
||||||
title: '车间', |
<!-- title: '车间',--> |
||||||
align: "center", |
<!-- align: "center",--> |
||||||
dataIndex: 'departName' |
<!-- dataIndex: 'departName'--> |
||||||
}, |
<!-- },--> |
||||||
{ |
<!-- {--> |
||||||
title: '工序', |
<!-- title: '工序',--> |
||||||
align: "center", |
<!-- align: "center",--> |
||||||
dataIndex: 'processName' |
<!-- dataIndex: 'processName'--> |
||||||
}, |
<!-- },--> |
||||||
{ |
<!-- {--> |
||||||
title: '工位列表', |
<!-- title: '工位列表',--> |
||||||
align: "center", |
<!-- align: "center",--> |
||||||
dataIndex: 'stationList', |
<!-- dataIndex: 'stationList',--> |
||||||
width: 150, |
<!-- width: 150,--> |
||||||
scopedSlots: {customRender: 'stationList'} |
<!-- scopedSlots: {customRender: 'stationList'}--> |
||||||
}, |
<!-- },--> |
||||||
{ |
<!-- {--> |
||||||
title: '工位工具列表', |
<!-- title: '工位工具列表',--> |
||||||
align: "center", |
<!-- align: "center",--> |
||||||
dataIndex: 'toolsList', |
<!-- dataIndex: 'toolsList',--> |
||||||
width: 150, |
<!-- width: 150,--> |
||||||
// scopedSlots: {customRender: this.toolsList} |
<!-- // scopedSlots: {customRender: this.toolsList}--> |
||||||
scopedSlots: {customRender: 'toolsList'} |
<!-- scopedSlots: {customRender: 'toolsList'}--> |
||||||
}, |
<!-- },--> |
||||||
{ |
<!-- {--> |
||||||
title: '工具设备列表', |
<!-- title: '工具设备列表',--> |
||||||
align: "center", |
<!-- align: "center",--> |
||||||
dataIndex: 'machineList', |
<!-- dataIndex: 'machineList',--> |
||||||
width: 150, |
<!-- width: 150,--> |
||||||
scopedSlots: {customRender: 'machineList'} |
<!-- scopedSlots: {customRender: 'machineList'}--> |
||||||
}, |
<!-- },--> |
||||||
{ |
<!-- {--> |
||||||
title: '前导工序', |
<!-- title: '前导工序',--> |
||||||
align: "center", |
<!-- align: "center",--> |
||||||
dataIndex: 'proProcess', |
<!-- dataIndex: 'proProcess',--> |
||||||
width: 150, |
<!-- width: 150,--> |
||||||
scopedSlots: {customRender: 'proProcess'} |
<!-- scopedSlots: {customRender: 'proProcess'}--> |
||||||
}, |
<!-- },--> |
||||||
{ |
<!-- {--> |
||||||
title: '后导工序', |
<!-- title: '后导工序',--> |
||||||
align: "center", |
<!-- align: "center",--> |
||||||
dataIndex: 'proProcess', |
<!-- dataIndex: 'proProcess',--> |
||||||
width: 150, |
<!-- width: 150,--> |
||||||
scopedSlots: {customRender: 'postProcess'} |
<!-- scopedSlots: {customRender: 'postProcess'}--> |
||||||
}, |
<!-- },--> |
||||||
{ |
<!-- {--> |
||||||
title: '输入产品', |
<!-- title: '输入产品',--> |
||||||
align: "center", |
<!-- align: "center",--> |
||||||
dataIndex: 'inputProduct', |
<!-- dataIndex: 'inputProduct',--> |
||||||
width: 150, |
<!-- width: 150,--> |
||||||
scopedSlots: {customRender: 'inputProduct'} |
<!-- scopedSlots: {customRender: 'inputProduct'}--> |
||||||
}, |
<!-- },--> |
||||||
{ |
<!-- {--> |
||||||
title: '成品/半成品', |
<!-- title: '成品/半成品',--> |
||||||
align: "center", |
<!-- align: "center",--> |
||||||
dataIndex: 'semiProduct', |
<!-- dataIndex: 'semiProduct',--> |
||||||
width: 150, |
<!-- width: 150,--> |
||||||
scopedSlots: {customRender: 'semiProduct'} |
<!-- scopedSlots: {customRender: 'semiProduct'}--> |
||||||
}, |
<!-- },--> |
||||||
|
|
||||||
// { |
<!-- // {--> |
||||||
// title: 'operation', |
<!-- // title: 'operation',--> |
||||||
// dataIndex: 'operation', |
<!-- // dataIndex: 'operation',--> |
||||||
// scopedSlots: {customRender: 'operation'}, |
<!-- // scopedSlots: {customRender: 'operation'},--> |
||||||
// }, |
<!-- // },--> |
||||||
|
|
||||||
// { |
<!-- // {--> |
||||||
// title: '操作', |
<!-- // title: '操作',--> |
||||||
// dataIndex: 'action', |
<!-- // dataIndex: 'action',--> |
||||||
// align: "center", |
<!-- // align: "center",--> |
||||||
// fixed: "right", |
<!-- // fixed: "right",--> |
||||||
// width: 147, |
<!-- // width: 147,--> |
||||||
// scopedSlots: {customRender: 'action'} |
<!-- // scopedSlots: {customRender: 'action'}--> |
||||||
// } |
<!-- // }--> |
||||||
], |
<!-- ],--> |
||||||
editingKey: '', |
<!-- editingKey: '',--> |
||||||
url: { |
<!-- url: {--> |
||||||
list: "/org.jeecg.modules.productplan/zyPlanProcess/getProcessDatalist", |
<!-- list: "/org.jeecg.modules.productplan/zyPlanProcess/getProcessDatalist",--> |
||||||
stationToolslist: "/stationTool/list", |
<!-- stationToolslist: "/stationTool/list",--> |
||||||
stationMachinelist: "/stationMachine/list", |
<!-- stationMachinelist: "/stationMachine/list",--> |
||||||
// productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list", |
<!-- // productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list",--> |
||||||
delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete", |
<!-- delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete",--> |
||||||
// deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch", |
<!-- // deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch",--> |
||||||
// exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcess/exportXls", |
<!-- // exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcess/exportXls",--> |
||||||
// importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcess/importExcel", |
<!-- // importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcess/importExcel",--> |
||||||
}, |
<!-- },--> |
||||||
loadRouteType: false, |
<!-- loadRouteType: false,--> |
||||||
planId: "", |
<!-- planId: "",--> |
||||||
dictOptions: {}, |
<!-- dictOptions: {},--> |
||||||
// superFieldList: [], |
<!-- // superFieldList: [],--> |
||||||
toolsList: [], |
<!-- toolsList: [],--> |
||||||
machineList: [], |
<!-- machineList: [],--> |
||||||
} |
<!-- }--> |
||||||
}, |
<!-- },--> |
||||||
created() { |
<!-- created() {--> |
||||||
this.getSuperFieldList(); |
<!-- this.getSuperFieldList();--> |
||||||
}, |
<!-- },--> |
||||||
computed: { |
<!-- computed: {--> |
||||||
importExcelUrl: function () { |
<!-- importExcelUrl: function () {--> |
||||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
<!-- return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;--> |
||||||
}, |
<!-- },--> |
||||||
}, |
<!-- },--> |
||||||
methods: { |
<!-- methods: {--> |
||||||
fanHui() { |
<!-- fanHui() {--> |
||||||
this.$router.push({ |
<!-- this.$router.push({--> |
||||||
path: '/productplan/ZyPlanProcessList', |
<!-- path: '/productplan/ZyPlanProcessList',--> |
||||||
}); |
<!-- });--> |
||||||
}, |
<!-- },--> |
||||||
getToolAndMachine(stationId) { |
<!-- getToolAndMachine(stationId) {--> |
||||||
// alert("stationId=" + stationId); |
<!-- // alert("stationId=" + stationId);--> |
||||||
getAction(this.url.stationToolslist, {"stationId": stationId}).then((res) => { |
<!-- getAction(this.url.stationToolslist, {"stationId": stationId}).then((res) => {--> |
||||||
if (res.success) { |
<!-- if (res.success) {--> |
||||||
this.toolsList = res.result.records || res.result; |
<!-- this.toolsList = res.result.records || res.result;--> |
||||||
console.log("toolsList", JSON.stringify(this.toolsList)) |
<!-- console.log("toolsList", JSON.stringify(this.toolsList))--> |
||||||
} else { |
<!-- } else {--> |
||||||
this.$message.warning(res.message) |
<!-- this.$message.warning(res.message)--> |
||||||
} |
<!-- }--> |
||||||
}); |
<!-- });--> |
||||||
|
|
||||||
getAction(this.url.stationMachinelist, {"stationId": stationId}).then((res) => { |
<!-- getAction(this.url.stationMachinelist, {"stationId": stationId}).then((res) => {--> |
||||||
if (res.success) { |
<!-- if (res.success) {--> |
||||||
this.machineList = res.result.records || res.result; |
<!-- this.machineList = res.result.records || res.result;--> |
||||||
console.log("machineList", JSON.stringify(this.toolsList)) |
<!-- console.log("machineList", JSON.stringify(this.toolsList))--> |
||||||
} else { |
<!-- } else {--> |
||||||
this.$message.warning(res.message) |
<!-- this.$message.warning(res.message)--> |
||||||
} |
<!-- }--> |
||||||
}); |
<!-- });--> |
||||||
}, |
<!-- },--> |
||||||
//加载传递参数 |
<!-- //加载传递参数--> |
||||||
loadParameter() { |
<!-- loadParameter() {--> |
||||||
if (this.loadRouteType === false) { |
<!-- if (this.loadRouteType === false) {--> |
||||||
this.planId = this.$route.query.planId; |
<!-- this.planId = this.$route.query.planId;--> |
||||||
// this.biaoTi = this.$route.query.styleNames+"款式面料管理"; |
<!-- // this.biaoTi = this.$route.query.styleNames+"款式面料管理";--> |
||||||
console.log("*******传递的planId:" + this.planId) |
<!-- console.log("*******传递的planId:" + this.planId)--> |
||||||
this.loadRouteType = true; |
<!-- this.loadRouteType = true;--> |
||||||
} |
<!-- }--> |
||||||
}, |
<!-- },--> |
||||||
loadData(arg) { |
<!-- loadData(arg) {--> |
||||||
if (!this.url.list) { |
<!-- if (!this.url.list) {--> |
||||||
this.$message.error("请设置url.list属性!") |
<!-- this.$message.error("请设置url.list属性!")--> |
||||||
return |
<!-- return--> |
||||||
} |
<!-- }--> |
||||||
//加载数据 若传入参数1则加载第一页的内容 |
<!-- //加载数据 若传入参数1则加载第一页的内容--> |
||||||
if (arg === 1) { |
<!-- if (arg === 1) {--> |
||||||
this.ipagination.current = 1; |
<!-- this.ipagination.current = 1;--> |
||||||
} |
<!-- }--> |
||||||
this.loadParameter(); |
<!-- this.loadParameter();--> |
||||||
var params = this.getQueryParams();//查询条件 |
<!-- var params = this.getQueryParams();//查询条件--> |
||||||
this.loading = true; |
<!-- this.loading = true;--> |
||||||
console.log("----------------the params:", params); |
<!-- console.log("----------------the params:", params);--> |
||||||
getAction(this.url.list, params).then((res) => { |
<!-- getAction(this.url.list, params).then((res) => {--> |
||||||
if (res.success) { |
<!-- if (res.success) {--> |
||||||
this.dataSource = res.result.records || res.result; |
<!-- this.dataSource = res.result.records || res.result;--> |
||||||
if (res.result.total) { |
<!-- if (res.result.total) {--> |
||||||
this.ipagination.total = res.result.total; |
<!-- this.ipagination.total = res.result.total;--> |
||||||
} else { |
<!-- } else {--> |
||||||
this.ipagination.total = 0; |
<!-- this.ipagination.total = 0;--> |
||||||
} |
<!-- }--> |
||||||
} else { |
<!-- } else {--> |
||||||
this.$message.warning(res.message) |
<!-- this.$message.warning(res.message)--> |
||||||
} |
<!-- }--> |
||||||
}).finally(() => { |
<!-- }).finally(() => {--> |
||||||
// this.dataSource.forEach(item => { |
<!-- // this.dataSource.forEach(item => {--> |
||||||
// item['stationName'] = this.stationName; |
<!-- // item['stationName'] = this.stationName;--> |
||||||
// item['stationNum'] = this.stationNum; |
<!-- // item['stationNum'] = this.stationNum;--> |
||||||
// }) |
<!-- // })--> |
||||||
this.loading = false |
<!-- this.loading = false--> |
||||||
}) |
<!-- })--> |
||||||
}, |
<!-- },--> |
||||||
getQueryParams() { |
<!-- getQueryParams() {--> |
||||||
//获取查询条件 |
<!-- //获取查询条件--> |
||||||
let sqp = {} |
<!-- let sqp = {}--> |
||||||
if (this.superQueryParams) { |
<!-- if (this.superQueryParams) {--> |
||||||
sqp['superQueryParams'] = encodeURI(this.superQueryParams) |
<!-- sqp['superQueryParams'] = encodeURI(this.superQueryParams)--> |
||||||
sqp['superQueryMatchType'] = this.superQueryMatchType |
<!-- sqp['superQueryMatchType'] = this.superQueryMatchType--> |
||||||
} |
<!-- }--> |
||||||
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters); |
<!-- var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);--> |
||||||
param.field = this.getQueryField(); |
<!-- param.field = this.getQueryField();--> |
||||||
param.pageNo = this.ipagination.current; |
<!-- param.pageNo = this.ipagination.current;--> |
||||||
param.pageSize = this.ipagination.pageSize; |
<!-- param.pageSize = this.ipagination.pageSize;--> |
||||||
param.planId = this.planId; |
<!-- param.planId = this.planId;--> |
||||||
return filterObj(param); |
<!-- return filterObj(param);--> |
||||||
}, |
<!-- },--> |
||||||
// initDictConfig() { |
<!-- // initDictConfig() {--> |
||||||
// }, |
<!-- // },--> |
||||||
getSuperFieldList() { |
<!-- getSuperFieldList() {--> |
||||||
// let fieldList = []; |
<!-- // let fieldList = [];--> |
||||||
// fieldList.push({type: 'string', value: 'id', text: 'id', dictCode: ''}) |
<!-- // fieldList.push({type: 'string', value: 'id', text: 'id', dictCode: ''})--> |
||||||
// fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''}) |
<!-- // fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''})--> |
||||||
// fieldList.push({type: 'string', value: 'productName', text: '生产计划id', dictCode: ''}) |
<!-- // fieldList.push({type: 'string', value: 'productName', text: '生产计划id', dictCode: ''})--> |
||||||
// fieldList.push({type: 'string', value: 'stationId', text: '工位id', dictCode: ''}) |
<!-- // fieldList.push({type: 'string', value: 'stationId', text: '工位id', dictCode: ''})--> |
||||||
// fieldList.push({type: 'string', value: 'machineIds', text: '设备id列表', dictCode: ''}) |
<!-- // fieldList.push({type: 'string', value: 'machineIds', text: '设备id列表', dictCode: ''})--> |
||||||
// fieldList.push({type: 'string', value: 'toolsIds', text: '工具id列表', dictCode: ''}) |
<!-- // fieldList.push({type: 'string', value: 'toolsIds', text: '工具id列表', dictCode: ''})--> |
||||||
// fieldList.push({type: 'string', value: 'productProcessId', text: '工序id列表', dictCode: ''}) |
<!-- // fieldList.push({type: 'string', value: 'productProcessId', text: '工序id列表', dictCode: ''})--> |
||||||
// fieldList.push({type: 'string', value: 'productProcessId', text: '工序id列表', dictCode: ''}) |
<!-- // fieldList.push({type: 'string', value: 'productProcessId', text: '工序id列表', dictCode: ''})--> |
||||||
// fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''}) |
<!-- // fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''})--> |
||||||
// this.superFieldList = fieldList |
<!-- // this.superFieldList = fieldList--> |
||||||
}, |
<!-- },--> |
||||||
// handleChange(value, key, column) { |
<!-- // handleChange(value, key, column) {--> |
||||||
// const newData = [...this.data]; |
<!-- // const newData = [...this.data];--> |
||||||
// const target = newData.find(item => key === item.key); |
<!-- // const target = newData.find(item => key === item.key);--> |
||||||
// if (target) { |
<!-- // if (target) {--> |
||||||
// target[column] = value; |
<!-- // target[column] = value;--> |
||||||
// this.data = newData; |
<!-- // this.data = newData;--> |
||||||
// } |
<!-- // }--> |
||||||
// }, |
<!-- // },--> |
||||||
edit(key) { |
<!-- edit(key) {--> |
||||||
alert("the edit() record =" + JSON.stringify(key)) |
<!-- alert("the edit() record =" + JSON.stringify(key))--> |
||||||
// const newData = [...this.data]; |
<!-- // const newData = [...this.data];--> |
||||||
const newData = [...this.dataSource]; |
<!-- const newData = [...this.dataSource];--> |
||||||
// const newData = record; |
<!-- // const newData = record;--> |
||||||
console.log("the edit() newData =", JSON.stringify(newData)); |
<!-- console.log("the edit() newData =", JSON.stringify(newData));--> |
||||||
// this.editingKey = '0'; |
<!-- // this.editingKey = '0';--> |
||||||
// record.editable = true; |
<!-- // record.editable = true;--> |
||||||
// const target = newData.find(item => key === item.key); |
<!-- // const target = newData.find(item => key === item.key);--> |
||||||
const target = newData[0]; |
<!-- const target = newData[0];--> |
||||||
console.log("the edit() target =", JSON.stringify(target)); |
<!-- console.log("the edit() target =", JSON.stringify(target));--> |
||||||
this.editingKey = key; |
<!-- this.editingKey = key;--> |
||||||
console.log("the edit() editingKey =", this.editingKey); |
<!-- console.log("the edit() editingKey =", this.editingKey);--> |
||||||
if (target) { |
<!-- if (target) {--> |
||||||
// debugger; |
<!-- // debugger;--> |
||||||
target.editable = true; |
<!-- target.editable = true;--> |
||||||
this.dataSource = newData; |
<!-- this.dataSource = newData;--> |
||||||
} |
<!-- }--> |
||||||
}, |
<!-- },--> |
||||||
save(key) { |
<!-- save(key) {--> |
||||||
// const newData = [...this.data]; |
<!-- // const newData = [...this.data];--> |
||||||
const newData = this.dataSource; |
<!-- const newData = this.dataSource;--> |
||||||
console.log("save() newData=", JSON.stringify(newData)) |
<!-- console.log("save() newData=", JSON.stringify(newData))--> |
||||||
const newCacheData = [...this.cacheData]; |
<!-- const newCacheData = [...this.cacheData];--> |
||||||
const target = newData.find(item => key === item.key); |
<!-- const target = newData.find(item => key === item.key);--> |
||||||
const targetCache = newCacheData.find(item => key === item.key); |
<!-- const targetCache = newCacheData.find(item => key === item.key);--> |
||||||
if (target && targetCache) { |
<!-- if (target && targetCache) {--> |
||||||
delete target.editable; |
<!-- delete target.editable;--> |
||||||
this.dataSource = newData; |
<!-- this.dataSource = newData;--> |
||||||
Object.assign(targetCache, target); |
<!-- Object.assign(targetCache, target);--> |
||||||
this.cacheData = newCacheData; |
<!-- this.cacheData = newCacheData;--> |
||||||
} |
<!-- }--> |
||||||
this.editingKey = ''; |
<!-- this.editingKey = '';--> |
||||||
}, |
<!-- },--> |
||||||
cancel(key) { |
<!-- cancel(key) {--> |
||||||
const newData = this.dataSource; |
<!-- const newData = this.dataSource;--> |
||||||
const target = newData.find(item => key === item.key); |
<!-- const target = newData.find(item => key === item.key);--> |
||||||
this.editingKey = ''; |
<!-- this.editingKey = '';--> |
||||||
if (target) { |
<!-- if (target) {--> |
||||||
Object.assign(target, this.cacheData.find(item => key === item.key)); |
<!-- Object.assign(target, this.cacheData.find(item => key === item.key));--> |
||||||
delete target.editable; |
<!-- delete target.editable;--> |
||||||
this.dataSource = newData; |
<!-- this.dataSource = newData;--> |
||||||
} |
<!-- }--> |
||||||
}, |
<!-- },--> |
||||||
}, |
<!-- },--> |
||||||
}; |
<!--};--> |
||||||
</script> |
<!--</script>--> |
||||||
<style scoped> |
<!--<style scoped>--> |
||||||
.editable-row-operations a { |
<!--.editable-row-operations a {--> |
||||||
margin-right: 8px; |
<!-- margin-right: 8px;--> |
||||||
} |
<!--}--> |
||||||
</style> |
<!--</style>--> |
@ -0,0 +1,16 @@ |
|||||||
|
package org.jeecg.modules.team.vo; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import lombok.experimental.Accessors; |
||||||
|
|
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = false) |
||||||
|
@Accessors(chain = true) |
||||||
|
public class GroupxMemeberVo { |
||||||
|
|
||||||
|
private String id; |
||||||
|
private String value; |
||||||
|
private String text; |
||||||
|
private String title; |
||||||
|
} |
@ -0,0 +1,16 @@ |
|||||||
|
package org.jeecg.modules.team.vo; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import lombok.experimental.Accessors; |
||||||
|
|
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = false) |
||||||
|
@Accessors(chain = true) |
||||||
|
public class GroupxVo { |
||||||
|
|
||||||
|
private String id; |
||||||
|
private String value; |
||||||
|
private String text; |
||||||
|
private String title; |
||||||
|
} |
Loading…
Reference in new issue