master
parent
d67ccfe548
commit
349166c8c9
@ -0,0 +1,94 @@
|
||||
<template>
|
||||
|
||||
|
||||
<el-dialog class="common-dialog" :fullscreen='isfullscreen' :title="title" :modal="false" top="2vh" :visible.sync="diaShow" @close="coloseDia"
|
||||
:width="width">
|
||||
<div slot="title">
|
||||
<span class="el-dialog__title">{{title}}</span>
|
||||
<slot name="searchtype"></slot>
|
||||
</div>
|
||||
|
||||
<div class="dialogConcent" :style="{height:wheight+'px'}">
|
||||
<iframe id="iframeWin" :src="baseUrl+url" frameborder="0" scrolling="auto" align="center" class="iframeWeb">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<div>
|
||||
<el-button size="small" @click="coloseDia">关闭</el-button>
|
||||
|
||||
</div>
|
||||
<slot name="footerbtn"></slot>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: "文件预览"
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: "60%"
|
||||
},
|
||||
isShow: {
|
||||
type: Boolean,
|
||||
default: () => {
|
||||
return false
|
||||
}
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: "showinfo"
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
diaShow: this.isShow,
|
||||
isfullscreen:false,
|
||||
url:'',
|
||||
baseUrl: `${process.env.VUE_APP_PREVIEW_API}?url=`,
|
||||
wheight: "",
|
||||
form:{
|
||||
show:''
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
isShow(val) {
|
||||
this.diaShow = this.isShow;
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
coloseDia() {
|
||||
// this.url = ""
|
||||
this.diaShow = false
|
||||
this.url = ''
|
||||
this.$emit('update:isShow', false)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/deep/ .show{
|
||||
flex-basis: 100%;
|
||||
}
|
||||
.dialogConcent {
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.iframeWeb {
|
||||
text-align: center;
|
||||
border: none;
|
||||
display: block;
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,149 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div>
|
||||
<div ref="lxHeader">
|
||||
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||
<div slot="content">
|
||||
<div class="searchwrap" style="display: flex;align-items: center;">
|
||||
<div>
|
||||
<el-input v-model="select.name" placeholder="请输入名称"></el-input>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" size="small" @click="select.page=1,getList()">查询</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" size="small" @click="editArea('add')">新增</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</lx-header>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange"
|
||||
:table-item="table_item">
|
||||
<template v-slot:btns>
|
||||
<el-table-column align='center' label="操作" width="240" header-align="center">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button type="primary" size="small" @click="editArea('child',scope.row.id,scope.row.name)">子目录</el-button> -->
|
||||
<el-button type="primary" size="small" @click="editArea('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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</xy-table>
|
||||
</div>
|
||||
|
||||
<add-area ref="addArea" @refresh="getList"></add-area>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import addArea from './components/addArea.vue';
|
||||
import {
|
||||
index,
|
||||
destroy
|
||||
} from "@/api/system/baseForm.js"
|
||||
export default {
|
||||
components: {
|
||||
addArea
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
select: {
|
||||
name: '',
|
||||
table_name: 'areas',
|
||||
page: 1,
|
||||
page_size: 10,
|
||||
},
|
||||
total:0,
|
||||
list: [],
|
||||
table_item: [{
|
||||
type:'index',
|
||||
width:50
|
||||
},{
|
||||
prop: 'name',
|
||||
label: '区域名称',
|
||||
align: 'left',
|
||||
},{
|
||||
prop: 'sort',
|
||||
label: '排序',
|
||||
align: 'left',
|
||||
}]
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
editArea(type, id,pName) {
|
||||
if (type == 'editor') {
|
||||
this.$refs.addArea.id = id
|
||||
}
|
||||
this.$refs.addArea.type = type
|
||||
this.$refs.addArea.isShow = true
|
||||
},
|
||||
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',
|
||||
filter: [{
|
||||
"key": "name",
|
||||
"op": "like",
|
||||
"value": this.select.name
|
||||
}],
|
||||
})
|
||||
this.list = res.data
|
||||
this.total = res.total
|
||||
},
|
||||
deleteList(id) {
|
||||
var that = this;
|
||||
destroy({
|
||||
id: id,
|
||||
table_name: this.select.table_name
|
||||
}).then(response => {
|
||||
this.$Message.success('操作成功');
|
||||
this.getList()
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
reject(error)
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.searchwrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&>div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 10px;
|
||||
|
||||
span {
|
||||
min-width: 70px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div>
|
||||
<div ref="lxHeader">
|
||||
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||
<div slot="content">
|
||||
<div class="searchwrap" style="display: flex;align-items: center;">
|
||||
<div>
|
||||
<el-input v-model="select.name" placeholder="请输入名称"></el-input>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" size="small" @click="select.page=1,getList()">查询</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" size="small" @click="editIndex('add')">新增</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</lx-header>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange"
|
||||
:table-item="table_item">
|
||||
<template v-slot:btns>
|
||||
<el-table-column align='center' 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="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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</xy-table>
|
||||
</div>
|
||||
|
||||
<add-tags ref="addTags" @refresh="getList"></add-tags>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import addTags from './components/addTags.vue';
|
||||
import {
|
||||
index,
|
||||
destroy
|
||||
} from "@/api/system/baseForm.js"
|
||||
export default {
|
||||
components: {
|
||||
addTags
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
select: {
|
||||
name: '',
|
||||
table_name: 'record_tags',
|
||||
page: 1,
|
||||
page_size: 10,
|
||||
},
|
||||
total:0,
|
||||
list: [],
|
||||
table_item: [{
|
||||
type:'index',
|
||||
width:50
|
||||
},{
|
||||
prop: 'name',
|
||||
label: '标签名称',
|
||||
align: 'left',
|
||||
width:240
|
||||
},{
|
||||
prop: 'user_ids',
|
||||
label: '授权人员',
|
||||
align: 'left',
|
||||
}]
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
editIndex(type, id,pName) {
|
||||
if (type == 'editor') {
|
||||
this.$refs.addTags.id = id
|
||||
}
|
||||
this.$refs.addTags.type = type
|
||||
this.$refs.addTags.isShow = true
|
||||
},
|
||||
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',
|
||||
filter: [{
|
||||
"key": "name",
|
||||
"op": "like",
|
||||
"value": this.select.name
|
||||
}],
|
||||
})
|
||||
this.list = res.data
|
||||
this.total = res.total
|
||||
},
|
||||
deleteList(id) {
|
||||
var that = this;
|
||||
destroy({
|
||||
id: id,
|
||||
table_name: this.select.table_name
|
||||
}).then(response => {
|
||||
this.$Message.success('操作成功');
|
||||
this.getList()
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
reject(error)
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.searchwrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&>div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 10px;
|
||||
|
||||
span {
|
||||
min-width: 70px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in new issue