Commit 793d06df authored by 周远喜's avatar 周远喜

ok

parent 978a2b50
...@@ -30,43 +30,21 @@ ...@@ -30,43 +30,21 @@
</Col> </Col>
<Col :span="24"> <Col :span="24">
<h4>扩展属性</h4> <h4>扩展属性</h4>
<Table border :columns="columns" :data="checkList" height="450"> <Table border :columns="columns" :data="checkList">
<template slot-scope="{ row, index }" slot="title"> <template slot-scope="{ row, index }" slot="title">
<div v-if="row.fieldType==1||row.fieldType==2">{{row.title}}</div> <div v-if="row.fieldType==1||row.fieldType==2">{{row.title}}</div>
<Input <Input
v-if="row.fieldType==3" v-if="row.fieldType==3"
v-model="row.title" v-model="row.title"
placeholder="请输入" placeholder="请输入名称"
@on-blur="setRow(row,index)" @on-blur="setRow(row,index)"
/> />
</template> </template>
<template slot-scope="{ row, index }" slot="note"> <template slot-scope="{ row, index }" slot="note">
<div v-if="row.fieldType==1">{{row.note}}</div> <!-- <Input v-if="row.dataType==3" v-model="row.note" placeholder="请输入字典编码" @on-blur="setRow(row,index)" /> -->
<Input v-model="row.note" placeholder="请输入" @on-blur="setRow(row,index)" v-else />
</template>
<template slot-scope="{ row, index }" slot="dataType">
<Row>
<Col :span="12">
<state
v-if="row.fieldType==1"
code="materail.category.dataType"
:value="row.dataType"
type="text"
></state>
<Dictionary
v-else
@on-change="setRow(row,index)"
v-model="row.dataType"
code="materail.category.dataType"
type="select"
:value="row.dataType"
:key="row.dataType"
></Dictionary>
</Col>
<Col :span="12" v-if="row.dataType==3">
<div v-if="row.fieldType==1">'/'+{{row.dictionaryCode}}</div>
<Select <Select
v-model="row.dictionaryCode" v-if="row.dataType==3"
v-model="row.note"
clearable clearable
transfer transfer
v-else v-else
...@@ -78,22 +56,27 @@ ...@@ -78,22 +56,27 @@
:key="item.code" :key="item.code"
>{{ item.name }}</Option> >{{ item.name }}</Option>
</Select> </Select>
</Col> <span v-else>{{row.note}}</span>
</Row> </template>
<template slot-scope="{ row, index }" slot="dataType">
<Dictionary
@on-change="setRow(row,index)"
v-model="row.dataType"
code="materail.category.dataType"
type="select"
:value="row.dataType"
:key="row.dataType"
></Dictionary>
</template> </template>
<template slot-scope="{ row, index }" slot="unitName"> <template slot-scope="{ row, index }" slot="unitName">
<state
v-if="row.fieldType==1"
code="material.main.unitName"
:value="row.unitName"
type="text"
></state>
<Dictionary <Dictionary
v-else v-if="row.dataType==1||row.dataType==2"
@on-change="setRow(row,index)" @on-change="setRow(row,index)"
v-model="row.unitName" v-model="row.unitName"
code="material.main.unitName" code="material.main.unitName"
type="select" type="select"
placeholder="请选择单位"
:value="row.unitName" :value="row.unitName"
:key="row.unitName" :key="row.unitName"
></Dictionary> ></Dictionary>
...@@ -157,28 +140,13 @@ export default { ...@@ -157,28 +140,13 @@ export default {
key: "dataType", key: "dataType",
align: "center", align: "center",
slot: "dataType", slot: "dataType",
width:150 width:200
}, },
{ {
title: "备注", title: "设置",
key: "note", key: "note",
align: "center", align: "center",
slot: "note", slot: "note",
width: "150"
},
// {
// title: "是否显示",
// key: "result",
// align: "center",
// slot: "result"
// },
{
title: "属性类型",
key: "dataType",
align: "center",
slot: "dataType",
width: "200"
}, },
{ {
title: "单位", title: "单位",
...@@ -202,6 +170,7 @@ export default { ...@@ -202,6 +170,7 @@ export default {
width:80 width:80
}, },
{ {
width:80,
title: "操作", title: "操作",
slot: "action", slot: "action",
align: "center" align: "center"
...@@ -244,7 +213,7 @@ export default { ...@@ -244,7 +213,7 @@ export default {
this.checkList = arr.filter(function(item) { this.checkList = arr.filter(function(item) {
item.mid=item.id; item.mid=item.id;
delete item["id"]; //删除属性id delete item["id"]; //删除属性id
return item; return item.fieldType>1;
}); });
} }
}); });
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<MasterData ref="dataTable" @on-edit="editRow" :root="root" @on-ok="ok" /> <MasterData ref="dataTable" @on-edit="editRow" :root="root" @on-ok="ok" />
</Content> </Content>
</Layout> </Layout>
<Modal v-model="modal" :title="title" width="1200" footer-hide :mask-closable="false"> <Modal v-model="modal" :title="title" width="1500" footer-hide :mask-closable="false">
<component <component
:is="detail" :is="detail"
:eid="curId" :eid="curId"
......
...@@ -47,9 +47,9 @@ ...@@ -47,9 +47,9 @@
class="w100" class="w100"
></InputNumber> ></InputNumber>
<Dictionary v-if="li.dataType==3" v-model="entity[li.field]" :code="li.note"></Dictionary> <Dictionary v-if="li.dataType==3" v-model="entity[li.field]" :code="li.note"></Dictionary>
<Input v-if="li.dataType==4" v-model="entity[li.filed]"></Input> <Input v-if="li.dataType==5" type="textarea" v-model="entity[li.filed]"></Input>
<DatePicker <DatePicker
v-if="li.dataType==5" 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"
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
<!-- <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 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> <Input v-if="li.dataType==8" type="textarea" v-model="entity[li.field]"></Input>
<state v-if="li.unitName" :value="li.unitName" code="material.main.unitName" type="tag"></state>
</FormItem> </FormItem>
</Col> </Col>
<!-- <Col :span="24"> <!-- <Col :span="24">
......
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