Commit c549472c authored by 仇晓婷's avatar 仇晓婷

分类

parent 3fc95151
...@@ -42,34 +42,28 @@ ...@@ -42,34 +42,28 @@
</template> </template>
<template slot-scope="{ row, index }" slot="note"> <template slot-scope="{ row, index }" slot="note">
<!-- <Input v-if="row.dataType==3" v-model="row.note" placeholder="请输入字典编码" @on-blur="setRow(row,index)" /> --> <!-- <Input v-if="row.dataType==3" v-model="row.note" placeholder="请输入字典编码" @on-blur="setRow(row,index)" /> -->
<Select <Select
v-if="row.dataType==3" v-if="row.dataType==3"
v-model="row.note" v-model="row.note"
clearable clearable
transfer transfer
v-else @on-change="setRow(row,index)"
@on-change="setRow(row,index)" >
> <Option v-for="item in codeList" :value="item.code" :key="item.code">{{ item.name }}</Option>
<Option </Select>
v-for="item in codeList"
:value="item.code"
:key="item.code"
>{{ item.name }}</Option>
</Select>
<span v-else>{{row.note}}</span> <span v-else>{{row.note}}</span>
</template> </template>
<template slot-scope="{ row, index }" slot="dataType"> <template slot-scope="{ row, index }" slot="dataType">
<Dictionary <Dictionary
@on-change="setRow(row,index)" @on-change="setRow(row,index)"
v-model="row.dataType" v-model="row.dataType"
code="materail.category.dataType" code="materail.category.dataType"
type="select" type="select"
:value="row.dataType" :value="row.dataType"
:key="row.dataType" :key="row.dataType"
></Dictionary> ></Dictionary>
</template> </template>
<template slot-scope="{ row, index }" slot="unitName"> <template slot-scope="{ row, index }" slot="unitName">
<Dictionary <Dictionary
v-if="row.dataType==1||row.dataType==2" v-if="row.dataType==1||row.dataType==2"
@on-change="setRow(row,index)" @on-change="setRow(row,index)"
...@@ -88,11 +82,7 @@ ...@@ -88,11 +82,7 @@
<Checkbox v-model="row.isUnique" @on-change="setRow(row,index)"></Checkbox> <Checkbox v-model="row.isUnique" @on-change="setRow(row,index)"></Checkbox>
</template> </template>
<template <template slot-scope="{ row, index }" slot="action">
slot-scope="{ row, index }"
slot="action"
v-if="row.fieldType==2||row.fieldType==3"
>
<a @click="remove(index,row)" style="color:#FF7A8B">删除</a> <a @click="remove(index,row)" style="color:#FF7A8B">删除</a>
</template> </template>
</Table> </Table>
...@@ -140,13 +130,13 @@ export default { ...@@ -140,13 +130,13 @@ export default {
key: "dataType", key: "dataType",
align: "center", align: "center",
slot: "dataType", slot: "dataType",
width:200 width: 200
}, },
{ {
title: "设置", title: "设置",
key: "note", key: "note",
align: "center", align: "center",
slot: "note", slot: "note"
}, },
{ {
title: "单位", title: "单位",
...@@ -170,7 +160,7 @@ export default { ...@@ -170,7 +160,7 @@ export default {
width: 80 width: 80
}, },
{ {
width:80, width: 80,
title: "操作", title: "操作",
slot: "action", slot: "action",
align: "center" align: "center"
...@@ -213,7 +203,7 @@ export default { ...@@ -213,7 +203,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.fieldType>1; return item.fieldType > 1;
}); });
} }
}); });
......
...@@ -42,34 +42,29 @@ ...@@ -42,34 +42,29 @@
</template> </template>
<template slot-scope="{ row, index }" slot="note"> <template slot-scope="{ row, index }" slot="note">
<!-- <Input v-if="row.dataType==3" v-model="row.note" placeholder="请输入字典编码" @on-blur="setRow(row,index)" /> --> <!-- <Input v-if="row.dataType==3" v-model="row.note" placeholder="请输入字典编码" @on-blur="setRow(row,index)" /> -->
<Select <Select
v-if="row.dataType==3" v-if="row.dataType==3"
v-model="row.note" v-model="row.note"
clearable clearable
transfer transfer
v-else
@on-change="setRow(row,index)" @on-change="setRow(row,index)"
> >
<Option <Option v-for="item in codeList" :value="item.code" :key="item.code">{{ item.name }}</Option>
v-for="item in codeList" </Select>
:value="item.code"
:key="item.code"
>{{ item.name }}</Option>
</Select>
<span v-else>{{row.note}}</span> <span v-else>{{row.note}}</span>
</template> </template>
<template slot-scope="{ row, index }" slot="dataType"> <template slot-scope="{ row, index }" slot="dataType">
<Dictionary <Dictionary
@on-change="setRow(row,index)" @on-change="setRow(row,index)"
v-model="row.dataType" v-model="row.dataType"
code="materail.category.dataType" code="materail.category.dataType"
type="select" type="select"
:value="row.dataType" :value="row.dataType"
:key="row.dataType" :key="row.dataType"
></Dictionary> ></Dictionary>
</template> </template>
<template slot-scope="{ row, index }" slot="unitName"> <template slot-scope="{ row, index }" slot="unitName">
<Dictionary <Dictionary
v-if="row.dataType==1||row.dataType==2" v-if="row.dataType==1||row.dataType==2"
@on-change="setRow(row,index)" @on-change="setRow(row,index)"
...@@ -88,11 +83,7 @@ ...@@ -88,11 +83,7 @@
<Checkbox v-model="row.isUnique" @on-change="setRow(row,index)"></Checkbox> <Checkbox v-model="row.isUnique" @on-change="setRow(row,index)"></Checkbox>
</template> </template>
<template <template slot-scope="{ row, index }" slot="action">
slot-scope="{ row, index }"
slot="action"
v-if="row.fieldType==2||row.fieldType==3"
>
<a @click="remove(index,row)" style="color:#FF7A8B">删除</a> <a @click="remove(index,row)" style="color:#FF7A8B">删除</a>
</template> </template>
</Table> </Table>
...@@ -144,7 +135,7 @@ export default { ...@@ -144,7 +135,7 @@ export default {
title: "备注", title: "备注",
key: "note", key: "note",
slot: "note" slot: "note"
}, },
{ {
title: "单位", title: "单位",
key: "unitName", key: "unitName",
......
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