master
lion 1 year ago
parent 349166c8c9
commit 5b804d5a2b

@ -16,6 +16,8 @@
"dependencies": {
"@smallwei/avue": "^2.9.15",
"@tinymce/tinymce-vue": "^3.0.1",
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^1.0.2",
"af-table-column": "^1.0.3",
"avue-plugin-map": "^1.0.1",
"axios": "0.18.1",
@ -24,6 +26,7 @@
"element-ui": "2.15.13",
"file-saver": "^2.0.5",
"js-cookie": "2.2.0",
"less": "^3.13.1",
"less-loader": "^5.0.0",
"moment": "^2.29.2",
"normalize.css": "7.0.0",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

@ -1,58 +1,66 @@
import request from "@/utils/request";
function customParamsSerializer(params) {
let result = '';
for (let key in params) {
if (params.hasOwnProperty(key)) {
if (Array.isArray(params[key])) {
params[key].forEach((item,index) => {
result += `${key}[${index}][key]=${item.key}&${key}[${index}][op]=${item.op}&${key}[${index}][value]=${item.value}&`;
});
} else {
result += `${key}=${params[key]}&`;
}
}
}
return result.slice(0, -1);
}
export function index(params,isLoading = false) {
return request({
method: "get",
url: "/api/admin/base-form/index",
params,
paramsSerializer: customParamsSerializer,
isLoading
})
}
export function show(params, isLoading = true) {
return request({
method: "get",
url: "/api/admin/base-form/show",
params,
isLoading
})
}
export function save(data) {
return request({
method: "post",
url: "/api/admin/base-form/save",
data
})
}
export function destroy(params) {
return request({
method: "get",
url: "/api/admin/base-form/destroy",
params
})
}
export function imports(data) {
return request({
method: "post",
url: "/api/admin/base-form/import",
data
})
import request from "@/utils/request";
function customParamsSerializer(params) {
let result = '';
for (let key in params) {
if (params.hasOwnProperty(key)) {
if (Array.isArray(params[key])) {
params[key].forEach((item, index) => {
if (item.key) {
result +=
`${key}[${index}][key]=${item.key}&${key}[${index}][op]=${item.op}&${key}[${index}][value]=${item.value}&`;
} else {
result += `${key}[${index}]=${item}&`
}
});
} else {
result += `${key}=${params[key]}&`;
}
}
}
return result.slice(0, -1);
}
export function index(params, isLoading = false) {
return request({
method: "get",
url: "/api/admin/base-form/index",
params,
paramsSerializer: customParamsSerializer,
isLoading
})
}
export function show(params, isLoading = true) {
return request({
method: "get",
url: "/api/admin/base-form/show",
params,
// paramsSerializer: customParamsSerializer,
isLoading
})
}
export function save(data) {
return request({
method: "post",
url: "/api/admin/base-form/save",
data
})
}
export function destroy(params) {
return request({
method: "get",
url: "/api/admin/base-form/destroy",
params
})
}
export function imports(data) {
return request({
method: "post",
url: "/api/admin/base-form/import",
data
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

@ -96,7 +96,8 @@
return false;
}
let formdate = new FormData();
formdate.append("file", blobInfo.blob()); //imageFile
formdate.append("file", blobInfo.blob()); //imageFile
console.log("formdate",formdate)
uploads(formdate).then(res => {
if (res) {
let url = res.url;

@ -0,0 +1,154 @@
<template>
<div class="editor-wrapper" v-if="isShow">
<toolbar :editor="editor" :default-config="toolbarConfig" :mode="mode" />
<editor v-model="html" :style="{height: height + 'px'}" :default-config="editorConfig" :mode="mode"
@onCreated="onCreated" @onChange="onChange" />
<div v-if="maxlength" class="useful-num">
{{ useLen }}/{{ maxlength }}
</div>
</div>
</template>
<script>
import {uploads} from '@/api/uploads.js';
import '@wangeditor/editor/dist/css/style.css';
import {
Editor,
Toolbar
} from '@wangeditor/editor-for-vue';
export default {
components: {
Editor,
Toolbar
},
model: {
prop: 'value',
event: 'change'
},
props: {
isShow:{
type:Boolean,
default:false
},
value: {
type: String,
default: ''
},
maxlength: {
type: Number,
default: 0
},
height: {
type: [String, Number],
default: 300
}
},
watch: {
value(val) {
this.html = val
}
},
data() {
return {
editor: null,
html: '',
toolbarConfig: {},
editorConfig: {
placeholder: '请输入内容',
MENU_CONF: {
uploadImage: {
//
customUpload: (resultFile, insertImgFn) => {
const formData = new FormData();
formData.append('file', resultFile);
// res.dataurl
uploads(formData).then(res => {
console.log("formData",res)
// url alt href
insertImgFn(res.url, '', res);
});
}
},
uploadVideo: {
//
customUpload: (resultFile, insertImgFn) => {
const formData = new FormData();
formData.append('file', resultFile);
// res.dataurl
uploads(formData).then(res => {
console.log("formData",res)
// url alt href
insertImgFn(res.url, '', res);
});
}
}
}
},
mode: 'default', // or 'simple'
useLen: 0
};
},
methods: {
onCreated(editor) {
this.editor = Object.seal(editor); // Object.seal()
},
onChange() {
const text = this.editor.getText();
//
this.useLen = (text || '').length;
// change
this.$emit('change', this.html);
},
},
beforeDestroy() {
// editor
const editor = this.editor;
if (editor == null) {
return;
}
editor.destroy();
},
};
</script>
<style lang="scss" scoped>
.editor-wrapper {
z-index: 3;
position: relative;
::v-deep .w-e-toolbar {
z-index: 2 !important;
border: solid 1px #E6E9EC !important;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
.w-e-bar-item {
padding: 1px;
}
}
::v-deep .w-e-text-container {
z-index: 1 !important;
border: solid 1px #E6E9EC !important;
border-top: none !important;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
}
}
.useful-num {
position: absolute;
right: 6px;
bottom: 10px;
z-index: 99999;
font-size: 12px;
color: #ddd;
background: #fff;
padding: 0 6px;
height: 28px;
line-height: 28px;
}
</style>

@ -36,8 +36,8 @@
transition: opacity 1.5s;
}
.sidebar-name-logo {
width: 120px;
height: 22px;
width: 75px;
// height: 22px;
}
.sidebarLogoFade-enter,

@ -16,6 +16,7 @@ const getDefaultState = () => {
return {
token: getToken(),
name: '',
login_id: '',
avatar: '',
roles: []
}
@ -38,7 +39,10 @@ const mutations = {
},
SET_ROLES: (state, roles) => {
state.roles = roles
}
},
SET_LOGINID: (state, login_id) => {
state.login_id = login_id
},
}
const actions = {
@ -80,18 +84,21 @@ const actions = {
if (!response) {
reject('身份验证失败请重新登录')
}
response["roles"] = ["admin"];
response["roles"] = ["admin"];
response["login_id"] = response['id'];
const {
roles,
name,
avatar
avatar,
login_id,
} = response
commit('SET_ROLES', roles)
commit('SET_NAME', name)
commit('SET_AVATAR', avatar)
commit('SET_AVATAR', avatar)
commit('SET_LOGINID', login_id)
resolve(response)
}).catch(error => {
reject(error)

@ -336,7 +336,6 @@ let base = {
flatData.forEach(item => {
idMap[item.id] = item;
});
// 创建根节点集合
const rootNodes = [];
@ -345,13 +344,18 @@ let base = {
if (parseInt(item.pid) === 0) {
rootNodes.push(item);
} else {
// 否则,将该项添加到父节点的 children 数组中
const parent = idMap[item.pid];
console.log("par",parent)
if (!parent.hasOwnProperty('children')) {
parent.children = [];
// 否则,将该项添加到父节点的 children 数组中
if(idMap[item.pid]){
const parent = idMap[item.pid];
// console.log("par",parent)
if (!parent.hasOwnProperty('children')) {
parent.children = [];
}
parent.children.push(item);
}else{
rootNodes.push(item);
}
parent.children.push(item);
}
});

@ -24,12 +24,32 @@
<div>
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange"
:table-item="table_item">
:table-item="table_item">
<template v-slot:originize_type_name>
<el-table-column align='left' label="组织类型" header-align="center">
<template slot-scope="scope">
<div v-if="scope.row.originize_type_id_details && scope.row.originize_type_id_details.length>0">
<span style="margin-right:5px;margin-bottom:5px" v-for="item in scope.row.originize_type_id_details">
{{item.name}}</span>
</div>
</template>
</el-table-column>
</template>
<template v-slot:area_name>
<el-table-column align='left' label="所属区域" header-align="center">
<template slot-scope="scope">
<div v-if="scope.row.area_id_details && scope.row.area_id_details.length>0">
<span style="margin-right:5px;margin-bottom:5px" v-for="item in scope.row.area_id_details">
{{item.name}}</span>
</div>
</template>
</el-table-column>
</template>
<template v-slot:btns>
<el-table-column align='center' label="操作" width="240" header-align="center">
<template slot-scope="scope">
<template slot-scope="scope">
<!-- <el-button type="primary" size="small" @click="editIndex('child',scope.row.id,scope.row.name)"></el-button> -->
<el-button type="primary" size="small" @click="editIndex('editor',scope.row.id)"></el-button>
<el-button type="primary" size="small" @click="editIndex('editor',scope.row.id)"></el-button>
<el-popconfirm style="margin:0 10px" @confirm="deleteList(scope.row.id)" title="确定删除吗?">
<el-button type="danger" size="small" slot="reference">删除</el-button>
</el-popconfirm>
@ -60,21 +80,21 @@
table_name: 'organizes',
page: 1,
page_size: 10,
},
total:0,
},
total: 0,
list: [],
table_item: [{
type:'index',
width:50
},{
table_item: [{
type: 'index',
width: 50
}, {
prop: 'name',
label: '组织名称',
align: 'left',
},{
}, {
prop: 'originize_type_name',
label: '组织类型',
align: 'left',
},{
}, {
prop: 'area_name',
label: '所属区域',
align: 'left',
@ -86,36 +106,38 @@
this.getList()
},
methods: {
editIndex(type, id,pName) {
editIndex(type, id, pName) {
if (type == 'editor') {
this.$refs.addIndex.id = id
}
this.$refs.addIndex.type = type
this.$refs.addIndex.isShow = true
},
pageIndexChange(e) {
this.select.page = e
this.getList()
},
pageSizeChange(e) {
this.select.page_size = e
this.select.page = 1
this.getList()
},
pageIndexChange(e) {
this.select.page = e
this.getList()
},
pageSizeChange(e) {
this.select.page_size = e
this.select.page = 1
this.getList()
},
async getList() {
const res = await index({
page_size: this.select.page_size,
page: this.select.page,
table_name: this.select.table_name,
sort_type:'ASC',
sort_name:'sort',
table_name: this.select.table_name,
sort_type: 'ASC',
sort_name: 'sort',
json_data_fields: ['originize_type_id','area_id'],
filter: [{
"key": "name",
"op": "like",
"value": this.select.name
}],
})
this.list = res.data
})
this.list = res.data
this.total = res.total
},
deleteList(id) {

@ -24,7 +24,17 @@
<div>
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange"
:table-item="table_item">
:table-item="table_item">
<template v-slot:catalog_names>
<el-table-column align='left' label="所属目录" width="360" header-align="center">
<template slot-scope="scope">
<div v-if="scope.row.catalog_ids_details && scope.row.catalog_ids_details.length>0">
<el-tag style="margin-right:5px;margin-bottom:5px" v-for="item in scope.row.catalog_ids_details"> {{item.name}}</el-tag>
</div>
</template>
</el-table-column>
</template>
<template v-slot:btns>
<el-table-column align='center' label="操作" width="280" header-align="center">
<template slot-scope="scope">
@ -116,6 +126,8 @@
page_size: this.select.page_size,
page: this.select.page,
table_name: this.select.table_name,
json_data_fields: ['catalog_ids'],
sort_type:'ASC',
sort_name:'sort',
filter: [{

@ -30,13 +30,9 @@
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>所属区域
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.area_ids" multiple placeholder="请选择">
<el-option
v-for="item in areaList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
<el-select style="width:100%" v-model="form.area_ids" multiple placeholder="请选择">
<el-option v-for="item in areaList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
@ -44,16 +40,12 @@
<template v-slot:tag_ids>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>标签
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>标签
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.tag_ids" multiple placeholder="请选择">
<el-option
v-for="item in tagList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
<el-select style="width:100%" v-model="form.tag_ids" multiple placeholder="请选择">
<el-option v-for="item in tagList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
@ -90,7 +82,8 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>内容
</div>
<div class="xy-table-item-content">
<my-tinymce v-if="showTinymce" @input="saveContent" :value="form.content"></my-tinymce>
<wangEditor :isShow="isShow" v-show="showTinymce" :value="form.content" @change="changeEditor"></wangEditor>
<!-- <my-tinymce v-if="showTinymce" @input="saveContent" :value="form.content"></my-tinymce> -->
</div>
</div>
</template>
@ -105,6 +98,8 @@
show,
index
} from "@/api/system/baseForm.js"
import wangEditor from '@/components/wangEditor';
import {
deepCopy,
isNull
@ -114,7 +109,7 @@
} from '@/utils/auth'
export default {
components: {
wangEditor
},
data() {
return {
@ -153,21 +148,24 @@
area_ids: [{
required: true,
message: '请选择所属区域'
}],
tag_ids: [{
required: true,
message: '请选择标签'
}],
// tag_ids: [{
// required: true,
// message: ''
// }],
}
}
},
created() {
this.uploadOther.token = getToken();
this.getCatalogList()
this.getAreaList()
this.getCatalogList()
this.getAreaList()
this.getTagList()
},
methods: {
methods: {
changeEditor(e){
this.form.content = e
},
async getCatalogList() {
const res = await index({
page_size: 999,
@ -175,6 +173,7 @@
sort_type: 'ASC',
sort_name: 'sort',
table_name: 'catalogs',
is_auth: 1
})
if (res.data.length > 0) {
this.catalogList = this.base.buildTree(res.data)
@ -198,6 +197,7 @@
sort_type: 'ASC',
sort_name: 'sort',
table_name: 'record_tags',
is_auth: 1
})
this.tagList = res.data
@ -256,7 +256,7 @@
}).then(res => {
this.$message({
type: 'success',
message: '授权成功'
message: '保存成功'
})
this.isShow = false
this.$emit('refresh')
@ -267,17 +267,20 @@
show({
id: this.id,
table_name: this.table_name,
}).then(res => {
console.log("res---",res)
this.form = this.base.requestToForm(res, this.form)
console.log("form---",this.form)
this.checkArr = res.catalog_id ? [res.catalog_id] : [],
this.form.area_ids = res.area_ids?res.area_ids:[]
this.form.tag_ids = res.tag_ids?res.tag_ids:[]
this.form.files = res.files?res.files:[]
if (res.files_upload_details && res.files_upload_details.length > 0) {
json_data_fields: ['files']
}).then(res => {
console.log("res---", res)
this.form = this.base.requestToForm(res, this.form)
console.log("form---", this.form)
this.checkArr = res.catalog_id ? [res.catalog_id] : [],
this.form.area_ids = res.area_ids ? res.area_ids : []
this.form.tag_ids = res.tag_ids ? res.tag_ids : []
this.form.files = res.files ? res.files : [],
this.form.content = res.content?res.content:''
if (res.files_details && res.files_details.length > 0) {
this.filesList = []
res.files_upload_details.map(item => {
res.files_details.map(item => {
this.filesList.push({
name: item.original_name,
id: item.id,

@ -9,19 +9,31 @@
</div>
<div class="article-time">
<div v-if="form.date">{{form.date}}</div>
<div v-if="form.catalog_name">{{form.catalog_name}}</div>
<div v-if="form.catalog_name">
<el-tag>{{form.catalog_name}}</el-tag>
</div>
<div v-if="form.area_ids">
<template v-if="form.area_ids_details && form.area_ids_details.length>0">
<template v-for="(item,index) in form.area_ids_details">
<el-tag style="margin-right:5px">{{item.name}}</el-tag>
</template>
</template>
</div>
<div v-if="form.tag_ids">
<template v-if="form.area_ids_details && form.tag_ids_details.length>0">
<template v-for="(item,index) in form.tag_ids_details">
<el-tag style="margin-right:5px">{{item.name}}</el-tag>
</template>
</template>
</div>
</div>
<div class="article-files" v-if="form.files_upload_details && form.files_upload_details.length>0">
<div v-for="(item,index) in form.files_upload_details">
<div class="article-files" v-if="form.files_details && form.files_details.length>0">
<div v-for="(item,index) in form.files_details">
附件{{index+1}}
<a :href="item.url" target="_blank">{{item.original_name}}</a>
<el-link target="_blank" style="margin:0 10px;" @click="toshowFile(item.url)" type="primary">
预览
</el-link>
</div>
</div>
<div class="article-html" v-if="form.content">
@ -62,12 +74,14 @@
show({
id: this.id,
table_name: this.table_name,
json_data_fields: ['files', 'area_ids','tag_ids']
}).then(res => {
this.form = this.base.deepCopy(res)
console.log("this.form",this.form)
this.form = this.base.deepCopy(res)
console.log("this.form", this.form)
})
},
toshowFile(url) {
toshowFile(url) {
console.log("url",url)
this.$refs.viewFile.url = url
this.$refs.viewFile.diaShow = true
},
@ -103,8 +117,9 @@
&-time {
display: flex;
justify-content: center;
font-size: 20px;
font-size: 16px;
color: rgba(0, 0, 0, 0.6);
align-items: center;
&>div {
margin: 0 10px;

@ -7,12 +7,12 @@
<div slot="content">
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
<el-input v-model="select.name" placeholder="请输入名称"></el-input>
<el-input v-model="select.title" placeholder="请输入名称"></el-input>
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()"></el-button>
</div>
<div>
<div v-if="catalogList.length>0">
<el-button type="primary" size="small" @click="editIndex('add')"></el-button>
</div>
</div>
@ -31,14 +31,35 @@
<div class="catalog_right">
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange"
:table-item="table_item">
<template v-slot:area_name>
<el-table-column align='left' label="所属区域" width="240" header-align="center">
<template slot-scope="scope">
<div v-if="scope.row.area_ids_details && scope.row.area_ids_details.length>0">
<el-tag style="margin-right:5px;margin-bottom:5px" v-for="item in scope.row.area_ids_details">
{{item.name}}</el-tag>
</div>
</template>
</el-table-column>
</template>
<template v-slot:tag_name>
<el-table-column align='left' label="标签" width="240" header-align="center">
<template slot-scope="scope">
<div v-if="scope.row.tag_ids_details && scope.row.tag_ids_details.length>0">
<el-tag style="margin-right:5px;margin-bottom:5px" v-for="item in scope.row.tag_ids_details">
{{item.name}}</el-tag>
</div>
</template>
</el-table-column>
</template>
<template v-slot:btns>
<el-table-column align='center' label="操作" width="240" header-align="center">
<el-table-column align='center' fixed="right" label="操作" width="240" header-align="center">
<template slot-scope="scope">
<!-- <el-button type="primary" size="small" @click="editIndex('child',scope.row.id,scope.row.name)"></el-button> -->
<el-button type="primary" size="small" @click="showIndex('show',scope.row.id)"></el-button>
<el-button type="primary" size="small" @click="editIndex('editor',scope.row.id)"></el-button>
<el-popconfirm style="margin:0 10px" @confirm="deleteList(scope.row.id)" title="确定删除吗?">
<el-button v-if="stateObj.login_id===scope.row.admin_id" type="primary" size="small" @click="editIndex('editor',scope.row.id)"></el-button>
<el-popconfirm v-if="stateObj.login_id===scope.row.admin_id" style="margin:0 10px" @confirm="deleteList(scope.row.id)" title="确定删除吗?">
<el-button type="danger" size="small" slot="reference">删除</el-button>
</el-popconfirm>
</template>
@ -61,9 +82,10 @@
index,
destroy
} from "@/api/system/baseForm.js"
import state from '@/store/modules/user.js'
export default {
components: {
addRecord,
addRecord,
showRecord
},
data() {
@ -74,7 +96,8 @@
page: 1,
page_size: 10,
catalog_id: ''
},
},
stateObj:{},
total: 0,
list: [],
defaultProps: {
@ -89,12 +112,26 @@
prop: 'title',
label: '标题',
align: 'left',
width: 360
},
// {
// prop: 'catalog_name',
// label: '',
// align: 'left',
// align: 'center',
// width: 120
// },
{
prop: 'area_name',
label: '区域',
align: 'center',
width: 240
},
{
prop: 'tag_name',
label: '标签',
align: 'center',
width: 240
},
{
prop: 'date',
label: '发布日期',
@ -106,7 +143,9 @@
}
},
created() {
//
//
this.stateObj = state.state
console.log("this.stateObj",this.stateObj)
this.getCatalogList()
this.getList()
},
@ -117,7 +156,8 @@
page: 1,
sort_type: 'ASC',
sort_name: 'sort',
table_name: 'catalogs'
table_name: 'catalogs',
is_auth: 1,
})
if (res.data.length > 0) {
this.catalogList = this.base.buildTree(res.data)
@ -135,9 +175,9 @@
editIndex(type, id) {
if (type == 'editor') {
this.$refs.addRecord.id = id
}
// if(this.select.catalog_id){
// this.$refs.addRecord.setCatalogId(this.select.catalog_id)
}
// if(this.select.catalog_id){
// this.$refs.addRecord.setCatalogId(this.select.catalog_id)
// }
this.$refs.addRecord.type = type
this.$refs.addRecord.isShow = true
@ -162,6 +202,8 @@
page_size: this.select.page_size,
page: this.select.page,
table_name: this.select.table_name,
json_data_fields: ['files', 'area_ids', 'tag_ids', 'catalog_id'],
is_auth: 1,
filter: [{
"key": "title",
"op": "like",
@ -169,7 +211,7 @@
}, {
key: 'catalog_id',
op: 'eq',
value: this.select.catalog_id
value: this.select.catalog_id ? this.select.catalog_id : ''
}]
})
this.list = res.data
@ -214,13 +256,13 @@
justify-content: space-between;
&_left {
width: 30%;
width: 20%;
background: #fff;
padding: 10px;
}
&_right {
width: 68%
width: 79%
}
}
</style>

@ -24,7 +24,17 @@
<div>
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange"
:table-item="table_item">
:table-item="table_item">
<template v-slot:user_ids>
<el-table-column align='left' label="授权人员" header-align="center">
<template slot-scope="scope">
<div v-if="scope.row.user_ids_details && scope.row.user_ids_details.length>0">
<el-tag style="margin-right:5px;margin-bottom:5px" v-for="item in scope.row.user_ids_details"> {{item.name}}</el-tag>
</div>
</template>
</el-table-column>
</template>
<template v-slot:btns>
<el-table-column align='center' label="操作" width="240" header-align="center">
<template slot-scope="scope">
@ -104,6 +114,8 @@
page_size: this.select.page_size,
page: this.select.page,
table_name: this.select.table_name,
json_data_fields: ['user_ids'],
sort_type:'ASC',
sort_name:'sort',
filter: [{

@ -112,6 +112,22 @@
style="width: 100%"
></el-input-number>
</el-form-item>
<el-form-item prop="width" label="关联表">
<el-select
v-model="selectedForm.link_table_name"
clearable
:popper-append-to-body="false"
placeholder="请选择关联表"
style="width: 100%"
>
<el-option
v-for="item in tableforms"
:label="item.table_name"
:value="item.table_name"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="saveField"></el-button>
<el-button
@ -188,6 +204,7 @@ export default {
selectItem: [], //
parameters: [], //
forms: [], //
tableforms:[]
};
},
methods: {
@ -212,6 +229,11 @@ export default {
return { name: i, table_name: i };
}),
];
this.tableforms = [
...resReal.map((i) => {
return { name: i, table_name: i };
})
]
},
saveField() {

@ -20,6 +20,9 @@
<el-table-column type="index" align="center">
</el-table-column>
<el-table-column prop="originze_name" label="组织" width="180">
<template slot-scope="scope">
{{scope.row.organize.name}}
</template>
</el-table-column>
<el-table-column prop="name" label="用户" width="180">
</el-table-column>

Loading…
Cancel
Save