Commit c9336584 authored by 周远喜's avatar 周远喜

ok

parent 2a93b79c
<template> <template>
<div> <div class="p10">
<Form ref="form" :model="entity" :rules="rules" :label-width="90"> <Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row> <Row>
<!-- <Col :span="12"> <!-- <Col :span="12">
...@@ -29,62 +29,58 @@ ...@@ -29,62 +29,58 @@
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24"> <Col :span="24">
<h4>属性配置</h4> <h4>扩展属性</h4>
</Col> <Table border :columns="columns" :data="checkList" height="300">
<Col :span="24" style="padding:20px 0 0px 10px;margin-bottom:10px;" class="table-solt"> <template slot-scope="{ row, index }" slot="title">
<Table border :columns="columns" :data="checkList" class="tableCommon" height="300"> <div v-if="row.fieldType==1||row.fieldType==2">{{row.title}}</div>
<template slot-scope="{ row, index }" slot="title"> <Input
<div v-if="row.fieldType==1||row.fieldType==2">{{row.title}}</div> v-if="row.fieldType==3"
<Input v-model="row.title"
v-if="row.fieldType==3" placeholder="请输入"
v-model="row.title" @on-blur="setRow(row,index)"
placeholder="请输入" />
@on-blur="setRow(row,index)" </template>
/> <template slot-scope="{ row, index }" slot="note">
</template> <div v-if="row.fieldType==1">{{row.note}}</div>
<template slot-scope="{ row, index }" slot="note"> <Input v-model="row.note" placeholder="请输入" @on-blur="setRow(row,index)" v-else />
<div v-if="row.fieldType==1">{{row.note}}</div> </template>
<Input v-model="row.note" placeholder="请输入" @on-blur="setRow(row,index)" v-else /> <template slot-scope="{ row, index }" slot="dataType">
</template> <state
<template slot-scope="{ row, index }" slot="dataType"> v-if="row.fieldType==1"
<state code="materail.category.dataType"
v-if="row.fieldType==1" :value="row.dataType"
code="materail.category.dataType" type="text"
:value="row.dataType" ></state>
type="text" <Dictionary
></state> v-else
<Dictionary @on-change="setRow(row,index)"
v-else v-model="row.dataType"
@on-change="setRow(row,index)" code="materail.category.dataType"
v-model="row.dataType" type="select"
code="materail.category.dataType" :value="row.dataType"
type="select" :key="row.dataType"
:value="row.dataType" ></Dictionary>
:key="row.dataType" </template>
></Dictionary> <!-- <template slot-scope="{ row, index }" slot="result">
</template>
<!-- <template slot-scope="{ row, index }" slot="result">
<Input v-model="row.result" placeholder="请输入" @on-blur="setRow(row,index)" /> <Input v-model="row.result" placeholder="请输入" @on-blur="setRow(row,index)" />
</template>--> </template>-->
<template slot-scope="{ row, index }" slot="required"> <template slot-scope="{ row, index }" slot="required">
<Checkbox v-model="row.required" @on-change="setRow(row,index)"></Checkbox> <Checkbox v-model="row.required" @on-change="setRow(row,index)"></Checkbox>
</template> </template>
<template slot-scope="{ row, index }" slot="isUnique"> <template slot-scope="{ row, index }" slot="isUnique">
<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-scope="{ row, index }"
slot="action" slot="action"
v-if="row.fieldType==2||row.fieldType==3" 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>
</Col> <Button type="dashed" long @click="addNew" class="mt10">新增属性</Button>
<Col :span="24" style="margin-bottom:20px;">
<Button type="primary" long @click="addNew" class="mt10">添加</Button>
</Col> </Col>
<Col :span="24" style="text-align: right;"> <Col :span="24" class="tr mt10">
<FormItem> <FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button> <Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button> <Button @click="handleClose" class="ml20">取消</Button>
...@@ -103,7 +99,7 @@ export default { ...@@ -103,7 +99,7 @@ export default {
entity: { entity: {
upId: 0, upId: 0,
code: 0, code: 0,
status:0, status: 0
}, },
disabled: false, disabled: false,
columns: [ columns: [
...@@ -183,7 +179,7 @@ export default { ...@@ -183,7 +179,7 @@ export default {
} }
]; ];
Api.listTable({ conditions: conditions }).then(r => { Api.listTable({ conditions: conditions ,sortBy:'id',isDesc:false}).then(r => {
if (r.result) { if (r.result) {
var arr = r.result; var arr = r.result;
this.checkList = arr.filter(function(item) { this.checkList = arr.filter(function(item) {
......
...@@ -90,6 +90,7 @@ export default { ...@@ -90,6 +90,7 @@ export default {
id: 0, id: 0,
ids: [] ids: []
}, },
model8:"",
cityList: [], cityList: [],
keys: "", keys: "",
expand: false, expand: false,
...@@ -143,7 +144,7 @@ export default { ...@@ -143,7 +144,7 @@ export default {
this.title = "新增"; this.title = "新增";
this.detail = () => import("./add"); this.detail = () => import("./add");
this.modal = true; this.modal = true;
this.$refs.chlidren.arr = []; //this.$refs.chlidren.arr = [];
}, },
add() { add() {
this.curId = 0; this.curId = 0;
......
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