工作中心

yangwl
A0010407 1 year ago
parent d3c219c0e8
commit c7999233fb

@ -77,3 +77,12 @@ export function listBom(query) {
params: query params: query
}); });
} }
// 查询工作中心
export function listFactory(query) {
return request({
url: '/technology/pro/process/selectSysFactoryList',
method: 'get',
params: query
});
}

@ -188,11 +188,6 @@
<el-input-number :min="0" :step="1" v-model="form.workTime" placeholder="请输入工作时长" /> <el-input-number :min="0" :step="1" v-model="form.workTime" placeholder="请输入工作时长" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="工作中心" prop="workCenter">
<el-input v-model="form.workCenter" type="input" placeholder="请输入工作中心" />
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
@ -222,6 +217,20 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="8">
<el-form-item label="工作中心" prop="workCenter">
<el-cascader
:options="factoryOptions"
:props="workCenter"
v-model="form.workCenter"
placeholder="请选择工作中心"
clearable
style="width:430px"
></el-cascader>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row> <!-- <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="参数1温度" prop="param1"> <el-form-item label="参数1温度" prop="param1">
@ -273,10 +282,12 @@
</template> </template>
<script> <script>
import { listProcess, getProcess, delProcess, addProcess, updateProcess ,listEquipment,getEquipment} from "@/api/technology/process"; import { listProcess, getProcess, delProcess, addProcess, updateProcess ,listEquipment,getEquipment,listFactory} from "@/api/technology/process";
import Processcontent from "./content.vue"; import Processcontent from "./content.vue";
import ItemSelect from "./single.vue"; import ItemSelect from "./single.vue";
import { Message } from 'element-ui' import { Message } from 'element-ui'
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default { export default {
name: "Process", name: "Process",
@ -284,6 +295,7 @@ export default {
components: {Processcontent,ItemSelect}, components: {Processcontent,ItemSelect},
data() { data() {
return { return {
workCenter: { multiple: true,label:'factoryName',value:'factoryId',children:'children' },
checkEquipment:null, checkEquipment:null,
// //
autoGenFlag:false, autoGenFlag:false,
@ -305,6 +317,8 @@ export default {
// //
processList:[], processList:[],
equipmentList:[], equipmentList:[],
//
factoryOptions: [],
// //
title: "", title: "",
boundTitle:"", boundTitle:"",
@ -312,10 +326,6 @@ export default {
open: false, open: false,
boundeEuipmentOpen:false, boundeEuipmentOpen:false,
equipmentTypeName : undefined, equipmentTypeName : undefined,
defaultProps: {
children: "children",
label: "label"
},
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -361,6 +371,7 @@ export default {
created() { created() {
this.getList(); this.getList();
this.getEquipmentList(); this.getEquipmentList();
this.getTreeselect();
}, },
methods: { methods: {
activated(){ activated(){
@ -369,7 +380,15 @@ export default {
handleEquipmentSelectionChange (val) { handleEquipmentSelectionChange (val) {
this.equipmentList = val this.equipmentList = val
}, },
// A001
getTreeselect() {
listFactory().then(response => {
this.factoryOptions = [];
const data = { factoryId: 1, factoryName: '中山榄菊日化实业有限公司', children: [] };
data.children = this.handleTree(response.data, "factoryId", "parentId");
this.factoryOptions.push(data);
});
},
/** 查询物料信息列表 */ /** 查询物料信息列表 */
getEquipmentList() { getEquipmentList() {
this.loading = true; this.loading = true;

Loading…
Cancel
Save