Commit 71689157 authored by renjintao's avatar renjintao

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

parents a7030a13 06b2c711
......@@ -128,7 +128,7 @@ export default {
},
methods: {
listData(li, index) {
this.$emit("clickItem", this.downUrl + li.filePath);
this.$emit("clickItem", this.downUrl + li.filePath, li.filePath);
this.isactive = index;
},
......
......@@ -30,7 +30,7 @@ export default {
this.getCodes();
},
props: {
eid: Number,
eid: [Number,String],
value: [String, Number, Array],
placeholder: {
type: String,
......
......@@ -3,48 +3,57 @@
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="12">
<FormItem label="编码" prop="userUnit">
<Input v-model="entity.userUnit" placeholder="请输入"></Input>
<FormItem label="编码" prop="code">
<Input v-model="entity.code" placeholder="请输入" disabled></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem label="名称" prop="taskBased">
<Input v-model="entity.taskBased" placeholder="请输入"></Input>
<FormItem label="名称" prop="name">
<Input v-model="entity.name" placeholder="请输入"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem label="状态" prop="productName" placeholder="请选择">
<Select v-model="entity.productName">
<Option value="0">New York</Option>
<Option value="1" disabled>London</Option>
<Option value="2">Sydney</Option>
</Select>
<FormItem label="状态" prop="status" placeholder="请选择">
<Dictionary
code="materail.category.status"
v-model="entity.status"
type="select"
:value="entity.status"
:key="entity.status"
></Dictionary>
</FormItem>
</Col>
<Col :span="24">
<FormItem label="描述" prop="productName">
<Input v-model="entity.productName" type="textarea" placeholder="请输入..."></Input>
<FormItem label="描述" prop="description">
<Input v-model="entity.description" type="textarea" placeholder="请输入..."></Input>
</FormItem>
</Col>
<Col :span="24">
<h4>属性配置</h4>
</Col>
<Col :span="24" style="padding:20px 0 0px 10px;margin-bottom:10px;" class="table-solt">
<Table border :columns="columns" :data="checkList" class="tableCommon">
<template slot-scope="{ row, index }" slot="name">
<Input v-model="row.name" placeholder="请输入" @on-blur="setRow(row,index)" />
<Table border :columns="columns" :data="checkList" class="tableCommon" height="300">
<template slot-scope="{ row, index }" slot="note">
<Input v-model="row.note" placeholder="请输入" @on-blur="setRow(row,index)" />
</template>
<template slot-scope="{ row, index }" slot="require">
<Input v-model="row.require" placeholder="请输入" @on-blur="setRow(row,index)" />
<template slot-scope="{ row, index }" slot="datatype">
<!-- <Input v-model="row.datatype" placeholder="请输入" @on-blur="setRow(row,index)" /> -->
<Select v-model="row.datatype" style="width:200px" @on-change="setRow(row,index)">
<Option
v-for="item in cityList"
:value="item.value"
:key="item.value"
>{{ item.label }}</Option>
</Select>
</template>
<template slot-scope="{ row, index }" slot="result">
<!-- <template slot-scope="{ row, index }" slot="result">
<Input v-model="row.result" placeholder="请输入" @on-blur="setRow(row,index)" />
</template>-->
<template slot-scope="{ row, index }" slot="required">
<Checkbox v-model="row.required" @on-change="setRow(row,index)"></Checkbox>
</template>
<template slot-scope="{ row, index }" slot="pash">
<inputFile v-model="row.file" :files="true" :parms="getParams(row.fileId)" />
</template>
<template slot-scope="{ row, index }" slot="remark">
<Input v-model="row.remark" placeholder="请输入" @on-blur="setRow(row,index)" />
<template slot-scope="{ row, index }" slot="isunique">
<Checkbox v-model="row.isunique" @on-change="setRow(row,index)"></Checkbox>
</template>
</Table>
</Col>
......@@ -62,10 +71,36 @@
</div>
</template>
<script>
import Api from "./api";
export default {
data() {
return {
entity: {},
entity: {
upId: 0,
code: 0
},
cityList: [
{
value: "0",
label: "Number"
},
{
value: "1",
label: "string"
},
{
value: "2",
label: "Null"
},
{
value: "3",
label: "Boolean"
},
{
value: "4",
label: "Undefined"
}
],
disabled: false,
columns: [
{
......@@ -75,38 +110,87 @@ export default {
align: "center"
},
{
title: "检验项目",
key: "name",
title: "属性名称",
key: "title",
align: "center"
},
{
title: "备注",
key: "note",
align: "center",
slot: "name"
slot: "note"
},
{
title: "要求",
key: "require",
title: "属性类型",
key: "datatype",
align: "center",
slot: "require"
slot: "datatype"
},
// {
// title: "是否显示",
// key: "result",
// align: "center",
// slot: "result"
// },
{
title: "预测结果",
key: "result",
title: "是否必填",
key: "required",
align: "center",
slot: "result"
slot: "required"
},
{
title: "是否唯一属性",
key: "isunique",
align: "center",
slot: "isunique"
}
],
checkList: [],
rules: {
businessName: [{ required: true, message: "必填", trigger: "blur" }],
businessCode: [{ required: true, message: "必填", trigger: "blur" }]
name: [{ required: true, message: "必填", trigger: "blur" }]
}
};
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
this.tableData();
},
methods: {
setRow() {
tableData() {
let conditions = [];
Api.listTable({ conditions: conditions }).then(r => {
if (r.result) {
console.log(r);
this.checkList = r.result;
}
});
},
setRow() {
this.$set(this.checkList, index, row);
},
addNew() {},
handleSubmit() {
this.$refs.form.validate(v => {});
this.$refs.form.validate(v => {
if (v) {
let categoryDto = this.entity;
let pro = this.checkList;
Api.create({ categoryDto: categoryDto, pro: pro })
.then(r => {
if (r.result) {
this.$Message.success("保存成功");
} else {
this.$Message.error("保存失败");
}
})
.catch(err => {
this.disabled = false;
this.$Message.error("保存失败");
});
}
});
},
handleClose() {
this.$emit("on-close");
......
import Api from '@/plugins/request'
export default {
// index:`${systemUrl}/category/paged`,
// getleveltree(params){
// return Api.post(`${systemUrl}/category/paged`,params);
// },
listTable(params){
return Api.post(`${systemUrl}/custompropertydefinition/list`,params);
},
list(params){
return Api.post(`${systemUrl}/category/list`,params);
},
......
<template>
<div>55555555</div>
</template>
\ No newline at end of file
......@@ -85,7 +85,9 @@ export default {
}
};
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
},
created() {
this.loadTree();
},
......@@ -100,20 +102,22 @@ export default {
this.curId = 0;
},
addNew() {
this.nodeInfo.id = 0;
// this.nodeInfo.id = 0;
// let conditions = [];
// debugger
this.add();
},
add() {
this.curId = 0;
// this.curId = 0;
this.title = "新增";
this.detail = () => import("./add");
this.modal = true;
},
edit() {
// this.curId = this.nodeInfo.id;
// this.title = "编辑";
// this.detail = () => import("./edit");
// this.modal = true;
this.curId = this.nodeInfo.id;
this.title = "编辑";
this.detail = () => import("./edit");
this.modal = true;
},
remove() {
// console.log(this.nodeInfo);
......
......@@ -44,22 +44,6 @@
</Col>
</Row>
</div>
<!-- <Tag type="dot" slot-scope="{row}" :checkable="true" class="tag_card" size="large" :name="row.id" :key="row.index" :checked="row.checked"
color="primary" @on-change="changeCards" >
<Row :gutter="16">
<Col span="6">
<div class="file">
<Icon type="ios-paper" v-if="row.id%2==0"/>
<Icon type="md-film" v-else/>
</div>
</Col>
<Col span="18">
<p><b>{{row.title}}</b></p>
<p>{{row.creationTime}}</p>
<p>{{row.id}}{{row.creator}}</p>
</Col>
</Row>
</Tag>-->
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide>
......
......@@ -69,42 +69,6 @@ export default {
odermodel: -9,
orderId: null,
row:{},
oderList: [
{
value: -9,
label: "全部"
},
{
value: 12,
label: "未开工"
},
{
value: 14,
label: "执行中"
},
{
value: 0,
label: "已完成"
},
{
value: 5,
label: "暂停中"
},
{
value: 7,
label: "已终止"
},
{
value: -1,
label: "待派工"
}
// value: '交检中',
// label: '交检中'
// },{
// value: '交接中',
// label: '交接中'
// },{
],
condition: []
};
},
......
......@@ -53,6 +53,7 @@
:src="getUrl(row.productUrl)"
width="120"
height="120"
:title="row.productUrl"
style="border:#cacbd0 dashed 1px"
/>
</Col>
......@@ -297,6 +298,7 @@ export default {
// height: 100%;
// overflow: auto;
// padding: 15px 0 15px 15px;
height: calc(100vh - 110px);
.body {
background: white;
border-radius: 4px;
......
......@@ -132,8 +132,9 @@ export default {
// this.$refs.refFile.intFiles();
},
methods: {
clickData(data) {
clickData(data, liUrl) {
this.img = data;
this.entity.productUrl = liUrl;
},
handleSelect1(data) {
if (data.length > 0) {
......@@ -151,8 +152,8 @@ export default {
this.disabled = true;
if (this.$refs.refFile.nameList.length > 0) {
this.entity.productUrlList = this.parms.eid;
this.entity.productUrl = this.img;
} else {
this.entity.productUrl = "";
this.entity.productUrlList = "";
}
......
......@@ -115,9 +115,9 @@ export default {
},
methods: {
clickData(data) {
clickData(data, liUrl) {
this.img = data;
this.entity.productUrl = data;
this.entity.productUrl = liUrl;
},
handleSelect1(data) {
if (data.length > 0) {
......
......@@ -13,6 +13,7 @@ window.systemUrl = `http://${address}:10000/system`; //System-api 系统管理
window.authUrl = `http://${address}:10010`; //Authentication-api //统一登陆认证
window.designUrl = `http://${address}:10000/process`; // 工艺规程
window.PlanUrl = `http://${address}:10000/plan`; //订单
// window.PlanUrl = `http://localhost:10050/api/services/app`; //Process-api
window.bugUrl = `http://${address}:10000/bug`; //bug
window.fileUrl = `http://${address}:10080/fileServer`; //文件上传url
window.fileUrlDown = `http://${address}`; //文件下载url
......
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