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

分类

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