Commit 40912b67 authored by renjintao's avatar renjintao

Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product-rjt

parents 08f4917b daabb5f2
...@@ -85,9 +85,7 @@ export default { ...@@ -85,9 +85,7 @@ export default {
// const openNames = getSiderSubmenu(path, menuSider); // const openNames = getSiderSubmenu(path, menuSider);
// this.$store.commit("admin/menu/setOpenNames", openNames); // this.$store.commit("admin/menu/setOpenNames", openNames);
} else { }
this.$Message.error("加载产品树失败!");
}
}); });
}, },
toMenu(list) { toMenu(list) {
......
...@@ -27,7 +27,11 @@ ...@@ -27,7 +27,11 @@
</Col> </Col>
<Col :span="24"> <Col :span="24">
<FormItem label="描述" prop="description"> <FormItem label="描述" prop="description">
<Input v-model="entity.description" type="textarea" placeholder="请输入..."></Input> <Input
v-model="entity.description"
type="textarea"
placeholder="请输入..."
></Input>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -37,26 +41,44 @@ ...@@ -37,26 +41,44 @@
<Row> <Row>
<Col v-for="li in fileds" :key="li.field" :span="li.span"> <Col v-for="li in fileds" :key="li.field" :span="li.span">
<FormItem :label="li.title" :prop="li.name"> <FormItem :label="li.title" :prop="li.name">
<Input v-if="li.dataType==0" v-model="entity[li.field]"></Input> <Input v-if="li.dataType == 0" v-model="entity[li.field]"></Input>
<InputNumber <InputNumber
v-if="li.dataType==1||li.dataType==2" v-if="li.dataType == 1 || li.dataType == 2"
v-model="entity[li.field]" v-model="entity[li.field]"
class="w100" class="w100"
></InputNumber> ></InputNumber>
<Dictionary v-if="li.dataType==3" v-model="entity[li.field]" :code="li.note"></Dictionary> <Dictionary
<Input v-if="li.dataType==5" type="textarea" v-model="entity[li.filed]"></Input> v-if="li.dataType == 3"
v-model="entity[li.field]"
:code="li.note"
></Dictionary>
<Input
v-if="li.dataType == 5"
type="textarea"
v-model="entity[li.filed]"
></Input>
<DatePicker <DatePicker
v-if="li.dataType==4" v-if="li.dataType == 4"
v-model="entity[li.field]" v-model="entity[li.field]"
type="date" type="date"
:placeholder="'选择'+li.title" :placeholder="'选择' + li.title"
></DatePicker> ></DatePicker>
<InputFile v-if="li.dataType==6" v-model="entity[li.field]"></InputFile> <InputFile
v-if="li.dataType == 6"
v-model="entity[li.field]"
></InputFile>
<!-- <files ref="refFile" :parms="parms" fileFormat :Photos="true" @clickItem="clickData" /> --> <!-- <files ref="refFile" :parms="parms" fileFormat :Photos="true" @clickItem="clickData" /> -->
<InputFile v-if="li.dataType==7" v-model="entity[li.field]"></InputFile> <InputFile
<Input v-if="li.dataType==8" type="textarea" v-model="entity[li.field]"></Input> v-if="li.dataType == 7"
v-model="entity[li.field]"
></InputFile>
<Input
v-if="li.dataType == 8"
type="textarea"
v-model="entity[li.field]"
></Input>
<state <state
v-if="li.unitName&&(li.dataType==1||li.dataType==2)" v-if="li.unitName && (li.dataType == 1 || li.dataType == 2)"
:value="li.unitName" :value="li.unitName"
code="material.main.unitName" code="material.main.unitName"
type="tag" type="tag"
...@@ -66,7 +88,7 @@ ...@@ -66,7 +88,7 @@
<!-- <Col :span="24"> <!-- <Col :span="24">
<div v-html="entity"></div> <div v-html="entity"></div>
</Col>--> </Col>-->
<Col :span="24" style="text-align: right;"> <Col :span="24" style="text-align: right">
<FormItem> <FormItem>
<Button type="primary" @click="handleSubmit" v-noClick>保存</Button> <Button type="primary" @click="handleSubmit" v-noClick>保存</Button>
<Button @click="handleClose" class="ml20">取消</Button> <Button @click="handleClose" class="ml20">取消</Button>
...@@ -106,9 +128,7 @@ export default { ...@@ -106,9 +128,7 @@ export default {
created() { created() {
this.initFiled(); this.initFiled();
}, },
mounted() { mounted() {},
this.get();
},
methods: { methods: {
initFiled() { initFiled() {
let conditions = [ let conditions = [
...@@ -141,6 +161,7 @@ export default { ...@@ -141,6 +161,7 @@ export default {
this.entity[u.field] = ""; this.entity[u.field] = "";
this.$set(this.entity, u.filed, v); this.$set(this.entity, u.filed, v);
}); });
this.get();
} }
}); });
}, },
...@@ -152,49 +173,9 @@ export default { ...@@ -152,49 +173,9 @@ export default {
} }
}); });
}, },
tableData() { // setRow(row, index) {
let conditions = [ // this.$set(this.checkList, index, row);
{ // },
conditionalType: "In",
fieldName: "fieldType",
fieldValue: "1,2",
},
{
conditionalType: "Equal",
fieldName: "categoryId",
fieldValue: "0",
},
];
Api.listTable({
conditions: conditions,
sortBy: "id",
isDesc: false,
}).then((r) => {
if (r.result) {
var arr = r.result;
this.checkList = arr.filter(function (item) {
item.mid = item.id;
delete item["id"]; //删除属性id
return item;
});
}
});
},
remove(index, row) {
// if (row.add == 0) {
// //新增的删除,直接删
// this.checkList.splice(index, 1);
// } else {
// row.action = 2; //返回的默认删除,删除后保存在arr数组中,添加标识action = 2,然后点击保存的时候,一起传给后台
// this.$set(this.checkList, index, row);
// this.arr.push(row);
// this.checkList.splice(index, 1);
// }
},
setRow(row, index) {
this.$set(this.checkList, index, row);
},
handleSubmit() { handleSubmit() {
this.$refs.form.validate((v) => { this.$refs.form.validate((v) => {
......
...@@ -64,18 +64,7 @@ ...@@ -64,18 +64,7 @@
</Col> </Col>
</Row> </Row>
</div> </div>
<!-- <DataGrid
v-else
:columns="cols"
ref="grid"
:conditions="easySearch"
:action="action"
:initsearch="sets"
:tool="false"
:page="false"
:height="300"
:format="formatFun"
/> -->
<DataGrid <DataGrid
v-else v-else
:height="300" :height="300"
...@@ -152,11 +141,11 @@ export default { ...@@ -152,11 +141,11 @@ export default {
operatorIdList: [], //操作员id operatorIdList: [], //操作员id
}, //确定后返回 }, //确定后返回
columns: [ columns: [
{ // {
type: "selection", // type: "selection",
width: 70, // width: 70,
align: "center", // align: "center",
}, // },
{ {
key: "id", key: "id",
title: this.$t("id"), title: this.$t("id"),
......
...@@ -88,10 +88,7 @@ ...@@ -88,10 +88,7 @@
>&nbsp; >&nbsp;
<a @click="view(row.id)"> <Icon type="md-document" />详情 </a> <a @click="view(row.id)"> <Icon type="md-document" />详情 </a>
&nbsp; &nbsp;
<a <a @click="sub(row.id)" v-if="row.status == 1 && row.schemaId">
@click="sub(row.id)"
v-if="row.status == 1 && row.schemaId"
>
<Icon type="md-color-wand" />送审 <Icon type="md-color-wand" />送审
</a> </a>
</div> </div>
...@@ -236,9 +233,9 @@ export default { ...@@ -236,9 +233,9 @@ export default {
}, },
}, },
], ],
typeInfo: "card", typeInfo: "table",
iconInfo: "md-apps", iconInfo: "md-list",
titleInfo: "卡片模式", titleInfo: "列表模式",
ModalIm: false, ModalIm: false,
temTitle: "文档管理", temTitle: "文档管理",
selectRows: [], selectRows: [],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment