|
@@ -36,7 +36,7 @@
|
|
|
<div class="pagination">
|
|
|
<el-pagination :current-page.sync="queryParams.current" :page-size="queryParams.size" :total="total" @current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" background></el-pagination>
|
|
|
</div>
|
|
|
- <el-dialog :title="title" :visible.sync="visible" width="700px" :before-close="close">
|
|
|
+ <el-dialog :title="title" :visible.sync="visible" width="800px" :before-close="close">
|
|
|
<el-form v-if="visible" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px" label-position="left">
|
|
|
<!-- <el-form-item label="所属租户" prop="tenant">
|
|
|
<el-tooltip
|
|
@@ -50,7 +50,7 @@
|
|
|
</el-tooltip>
|
|
|
</el-form-item> -->
|
|
|
<el-form-item label="所属功能" prop="function">
|
|
|
- <el-input v-model="ruleForm.function" size="small" placeholder="请输入所属功能"></el-input>
|
|
|
+ <el-input v-model="ruleForm.function" size="small" :readonly="true" placeholder="请输入所属功能"></el-input>
|
|
|
<!-- <el-cascader
|
|
|
v-model="ruleForm.function"
|
|
|
:options="functionList"
|
|
@@ -76,15 +76,15 @@
|
|
|
</el-row> -->
|
|
|
|
|
|
<el-row :gutter="24" v-for="(item,i) in list" :key="i" class="listItem">
|
|
|
- <el-col :span="3" style="padding:0">
|
|
|
+ <el-col :span="4" 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">
|
|
|
+ v-for="item in dictionaries.LOGIC_OPERATOR"
|
|
|
+ :key="item.dictChildValue"
|
|
|
+ :label="item.dictChildLabel"
|
|
|
+ :value="item.dictChildValue">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</span>
|
|
@@ -93,34 +93,40 @@
|
|
|
<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">
|
|
|
+ v-for="item in dictionaries.dataDict"
|
|
|
+ :key="item.dataSourceField"
|
|
|
+ :label="item.dataSourceName"
|
|
|
+ :value="item.dataSourceField">
|
|
|
</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">
|
|
|
+ v-for="item in dictionaries.OPERATOR"
|
|
|
+ :key="item.dictChildValue"
|
|
|
+ :label="item.dictChildLabel"
|
|
|
+ :value="item.dictChildValue">
|
|
|
</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 v-model="item.value"
|
|
|
+ filterable
|
|
|
+ allow-create
|
|
|
+ default-first-option
|
|
|
+ placeholder="请选择文章标签">
|
|
|
+ <el-option
|
|
|
+ :value="userinfo.tenantName"
|
|
|
+ >
|
|
|
+ <el-tooltip class="item" effect="dark" :content="userinfo.tenantName" placement="top">
|
|
|
+ <span style="float: left;width:100px;white-space:nowrap;overflow:hidden;text-overflow: ellipsis;">{{userinfo.tenantName}}</span>
|
|
|
+ </el-tooltip>
|
|
|
+ <span style="float: right; color: #8492a6; font-size: 13px;margin-left:30px">租户</span>
|
|
|
+ </el-option>
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
- <el-col :span="4">
|
|
|
+ <el-col :span="3">
|
|
|
<el-button @click="deleteList(i)"><i class="el-icon-delete"></i> </el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -228,13 +234,17 @@ export default {
|
|
|
created(){
|
|
|
|
|
|
},
|
|
|
+
|
|
|
mounted() {
|
|
|
this.getList()
|
|
|
this.getFunctionList()
|
|
|
this.ListToTree()
|
|
|
},
|
|
|
computed: {
|
|
|
-
|
|
|
+ dictionaries() {
|
|
|
+ console.log(this.$store.state.admin.dictionaries)
|
|
|
+ return this.$store.state.admin.dictionaries
|
|
|
+ },
|
|
|
userinfo() {
|
|
|
return this.$store.state.admin.userinfo
|
|
|
}
|
|
@@ -353,7 +363,7 @@ export default {
|
|
|
},
|
|
|
getList() {
|
|
|
this.loading = true
|
|
|
- this.$api.getDepartmentList(this.queryParams).then(response => {
|
|
|
+ this.$api.getDataList(this.queryParams).then(response => {
|
|
|
|
|
|
this.tableData = response.data
|
|
|
this.total=response.pageColumn.total
|
|
@@ -372,7 +382,7 @@ export default {
|
|
|
if (valid) {
|
|
|
this.btnLoading = true
|
|
|
if (this.ruleForm.id) {
|
|
|
- this.$api.editDepartment(this.ruleForm).then(response => {
|
|
|
+ this.$api.editData(this.ruleForm).then(response => {
|
|
|
this.$message.success('编辑成功')
|
|
|
this.btnLoading = false
|
|
|
this.getList()
|
|
@@ -382,7 +392,7 @@ export default {
|
|
|
})
|
|
|
} else {
|
|
|
this.ruleForm.tenant=this.userinfo.tenantId
|
|
|
- this.$api.addDepartment(this.ruleForm).then(response => {
|
|
|
+ this.$api.addData(this.ruleForm).then(response => {
|
|
|
this.$message.success('新增成功')
|
|
|
this.btnLoading = false
|
|
|
this.getList()
|
|
@@ -404,7 +414,7 @@ export default {
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
this.loading = true
|
|
|
- this.$api.deleteDepartment({ id: row.id }).then(response => {
|
|
|
+ this.$api.deleteData({ id: row.id }).then(response => {
|
|
|
this.$message.success('删除成功')
|
|
|
this.loading = false
|
|
|
this.getList()
|