|
@@ -18,8 +18,9 @@
|
|
|
header-row-class-name="custom-table-header"
|
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
|
|
>
|
|
|
+ <el-table-column type="selection" width="60" align="center"></el-table-column>
|
|
|
<el-table-column prop="name" label="数据权限名称" align="" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="tenant" label="所属功能" align="center" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column prop="tenant" label="条件" align="center" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="remark" label="备注" align="center" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column label="操作" align="center" width="150">
|
|
|
<template slot-scope="scope">
|
|
@@ -49,42 +50,80 @@
|
|
|
</el-tooltip>
|
|
|
</el-form-item> -->
|
|
|
<el-form-item label="所属功能" prop="function">
|
|
|
- <el-cascader
|
|
|
+ <el-input v-model="ruleForm.function" size="small" placeholder="请输入所属功能"></el-input>
|
|
|
+ <!-- <el-cascader
|
|
|
v-model="ruleForm.function"
|
|
|
:options="functionList"
|
|
|
:props="{multiple:true, checkStrictly: false,value:'id',label:'name' }"
|
|
|
collapse-tags
|
|
|
placeholder="请选择所属功能"
|
|
|
clearable
|
|
|
- style="width:100%"></el-cascader>
|
|
|
+ style="width:100%"></el-cascader> -->
|
|
|
</el-form-item>
|
|
|
<el-form-item label="数据权限">
|
|
|
<template>
|
|
|
- <div> <el-button @click="addList()">+增加</el-button> </div>
|
|
|
- <div style="border:1px solid #C0C0C0;border-radius:4px;overflow:auto;min-height:200px;padding:20px">
|
|
|
- <el-row :gutter="24" v-for="(item,i) in list" :key="i">
|
|
|
- <el-col :span="3" style="padding:0"><input type="text" name="" id="" style="border:0;backgroud:white;" v-if="i==0" :disabled="true">
|
|
|
- <el-select v-else v-model="item.logicOpr" placeholder="请选择">
|
|
|
- <el-option
|
|
|
+
|
|
|
+ <div class="add"><el-button type="primary" @click="addList()">添加</el-button> </div>
|
|
|
+ <div style="border:1px solid #C0C0C0;border-radius:4px;overflow:auto;min-height:200px;padding: 10px 20px">
|
|
|
+ <!-- <el-row :gutter="24" v-for="(item,i) in dataList" :key="i" class="listItem">
|
|
|
+ <el-col :span="3" :class="item.logicOpr ? 'normal' : 'hidden'" style="background: rgba(0,0,0,0)"><span><el-input v-model="item.logicOpr"></el-input></span></el-col>
|
|
|
+ <el-col :span="7"><el-input v-model="item.field"></el-input></el-col>
|
|
|
+ <el-col :span="3"><el-input v-model="item.opr"></el-input></el-col>
|
|
|
+ <el-col :span="7"><el-input v-model="item.value"></el-input></el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ <el-button><i class="el-icon-delete"></i> </el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row> -->
|
|
|
+
|
|
|
+ <el-row :gutter="24" v-for="(item,i) in list" :key="i" class="listItem">
|
|
|
+ <el-col :span="3" style="padding:0">
|
|
|
+ <span>
|
|
|
+ <span v-if="i==0" style="opacity: 0;"> 内容 </span>
|
|
|
+ <el-select v-else v-model="item.logicOpr">
|
|
|
+ <el-option
|
|
|
+ v-for="item in options"
|
|
|
+ :key="item.label"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.label">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </span>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="7">
|
|
|
+ <el-select v-model="item.field">
|
|
|
+ <el-option
|
|
|
+ v-for="item in options"
|
|
|
+ :key="item.label"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.label">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3" style="padding:0">
|
|
|
+ <el-select v-model="item.opr">
|
|
|
+ <el-option
|
|
|
+ v-for="item in options"
|
|
|
+ :key="item.label"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.label">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="7">
|
|
|
+ <el-select v-model="item.value">
|
|
|
+ <el-option
|
|
|
v-for="item in options"
|
|
|
:key="item.label"
|
|
|
:label="item.label"
|
|
|
:value="item.label">
|
|
|
</el-option>
|
|
|
- </el-select>
|
|
|
- </el-col>
|
|
|
- <el-col :span="7"><el-input v-model="item.field"></el-input></el-col>
|
|
|
- <el-col :span="3"><el-input v-model="item.opr"></el-input></el-col>
|
|
|
- <el-col :span="7"><el-input v-model="item.value"></el-input></el-col>
|
|
|
- <el-col :span="4">
|
|
|
- <el-button><i class="el-icon-delete"></i> </el-button>
|
|
|
-
|
|
|
- <!-- <el-button circle icon="el-icon-plus" @click="addList()" v-if="i==list.length-1"></el-button> -->
|
|
|
- <!-- <el-button circle icon="el-icon-minus" @click="subList(i)"></el-button> -->
|
|
|
-
|
|
|
- </el-col>
|
|
|
- <!-- <el-col :span="2"><div style="border-radius:50%"><i class="el-icon-delete"></i></div></el-col> -->
|
|
|
- </el-row>
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ <el-button @click="deleteList(i)"><i class="el-icon-delete"></i> </el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-form-item>
|
|
@@ -121,7 +160,8 @@ export default {
|
|
|
show:false,
|
|
|
disabled:false,
|
|
|
lastName:'',
|
|
|
- functionLis:[],
|
|
|
+ functionLis: [],
|
|
|
+ multipleSelection: [],
|
|
|
queryParams: {
|
|
|
size: 10,
|
|
|
current: 1,
|
|
@@ -154,6 +194,7 @@ export default {
|
|
|
field:'爱好',
|
|
|
opr:'=',
|
|
|
value:'篮球'},],
|
|
|
+ list:[{}],
|
|
|
dataList:
|
|
|
{
|
|
|
"nodeType": "logic",
|
|
@@ -199,9 +240,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- addList(){
|
|
|
+ addList() {
|
|
|
this.list.push({})
|
|
|
},
|
|
|
+ deleteList(i) {
|
|
|
+ this.list.splice(i, 1)
|
|
|
+ },
|
|
|
ListToTree(){
|
|
|
console.log(this.dataList)
|
|
|
var a =[]
|
|
@@ -274,16 +318,14 @@ export default {
|
|
|
}
|
|
|
|
|
|
s(i)
|
|
|
- }
|
|
|
- }
|
|
|
- s(i)
|
|
|
-
|
|
|
- console.log(a)
|
|
|
- this.data=a
|
|
|
+ }
|
|
|
+ }
|
|
|
+ s(i)
|
|
|
+ console.log(a)
|
|
|
+ this.dataList = a
|
|
|
},
|
|
|
getNode(node){
|
|
|
console.log(node)
|
|
|
-
|
|
|
},
|
|
|
normalizer(node) {
|
|
|
return {
|
|
@@ -379,5 +421,18 @@ export default {
|
|
|
.admin-department {
|
|
|
|
|
|
}
|
|
|
+.add {
|
|
|
+ display: flex;
|
|
|
+ justify-content: right;
|
|
|
+ margin-bottom: 10px;
|
|
|
+}
|
|
|
+.listItem {
|
|
|
+ margin: 10px 0;
|
|
|
+}
|
|
|
+.normal {
|
|
|
|
|
|
+}
|
|
|
+.hidden {
|
|
|
+ opacity: 0;
|
|
|
+}
|
|
|
</style>
|