master
lion 1 year ago
parent 18dd9cf562
commit 93c2240541

@ -3,7 +3,8 @@
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" :text="$route.meta.title+select.catalog_name" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<lx-header icon="md-apps" :text="$route.meta.title+select.catalog_name"
style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content" v-if="!hasMenu">
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
@ -66,9 +67,9 @@
</div>
<div>
<el-button type="primary" size="small" v-if="!is_search" @click="editIndex('add')"></el-button>
</div>
<div>
<el-button type="primary" size="small" v-if="!hasMenu && !is_search" @click="goBack()"></el-button>
</div>
<div>
<el-button type="primary" size="small" v-if="!hasMenu && !is_search" @click="goBack()"></el-button>
</div>
</div>
</div>
@ -86,19 +87,21 @@
<div v-if="hasMenu" class="catalog_list">
<div v-for="item in showData" class='catalog_item' @click="clickIn(item)">
<div>
<div class="catalog_count" v-if="!(item.children&&item.children.length>0)">{{item.records_total}}</div>
<i :class="item.children&&item.children.length>0?'el-icon-folder-opened':'el-icon-document-copy'"></i>
<div>{{item.name}}</div>
</div>
</div>
<div @click="clickOut" class="catalog_item">
<i v-if="historyList.length>0"
class="el-icon-arrow-left"></i>
<div>{{historyList.length>0?"返回上一级":""}}</div>
</div>
</div>
<div @click="clickOut" class="catalog_item">
<i v-if="historyList.length>0" class="el-icon-arrow-left"></i>
<div>{{historyList.length>0?"返回上一级":""}}</div>
</div>
</div>
<div class="catalog_right" v-else>
<xy-table @getHeight="initHeight" :defaultExpandAll='false' :isPage="false" rowKey="id" :list="list" :table-item="table_item">
<xy-table @getHeight="initHeight" :defaultExpandAll='false' :isPage="false" rowKey="id" :list="list"
:table-item="table_item">
<template v-slot:catalog_name>
<el-table-column align='center' label="所属目录" width="240" header-align="center">
<template slot-scope="scope">
@ -139,7 +142,7 @@
</template>
</el-table-column>
</template>
<!-- <template v-slot:link_id>
<!-- <template v-slot:link_id>
<el-table-column align='center' label="前续文档" width="120" header-align="center">
<template slot-scope="scope">
<div style="color:#b3241d;cursor: pointer;text-decoration: underline;" v-if="scope.row.link_id"
@ -315,9 +318,9 @@
label: 'name'
},
catalogList: [],
historyList: [],
menuName:[],
showData:[],
historyList: [],
menuName: [],
showData: [],
catalogChildren: [], //
areaList: [],
tagList: [],
@ -433,10 +436,10 @@
this.hasMenu = true
this.getCatalogList(path[1])
} else {
this.getCatalogList()
this.getCatalogList()
this.getList()
}
this.getAreaList()
}
this.getAreaList()
this.getTagList()
}
},
@ -484,34 +487,34 @@
},
clickIn(i) {
if (i.children && i.children.length > 0) {
this.historyList.push(this.showData);
this.historyList.push(this.showData);
this.showData = i.children;
this.menuName.push(i.name)
this.showData = i.children;
this.menuName.push(i.name)
this.select.catalog_name = ' / ' + this.menuName.join(" / ")
console.log(this.historyList);
}else{
this.select.catalog_id = i.id
this.menuName.push(i.name)
this.select.catalog_name = ' / ' + this.menuName.join(" / ")
this.hasMenu = false
this.getList()
} else {
this.select.catalog_id = i.id
this.menuName.push(i.name)
this.select.catalog_name = ' / ' + this.menuName.join(" / ")
this.hasMenu = false
this.getList()
}
},
clickOut() {
if (this.historyList && this.historyList.length > 0) {
this.showData = this.historyList[this.historyList.length - 1]
this.menuName.splice(this.menuName.length-1,1)
this.showData = this.historyList[this.historyList.length - 1]
this.menuName.splice(this.menuName.length - 1, 1)
this.select.catalog_name = ' / ' + this.menuName.join(" / ")
this.historyList.pop()
console.log(this.historyList);
}
},
goBack(){
this.select.catalog_id = ''
this.menuName.splice(this.menuName.length-1,1)
this.select.catalog_name = ' / ' + this.menuName.join(" / ")
this.hasMenu = true
},
goBack() {
this.select.catalog_id = ''
this.menuName.splice(this.menuName.length - 1, 1)
this.select.catalog_name = ' / ' + this.menuName.join(" / ")
this.hasMenu = true
},
async getCatalogList(pid) {
const res = await index({
@ -527,7 +530,7 @@
if (pid) {
let pList = this.base.findNodesById(this.catalogList, pid)
console.log("pList", pList)
this.catalogChildren = pList[0].children
this.catalogChildren = pList[0].children
this.showData = this.catalogChildren
}
}
@ -641,8 +644,8 @@
// this.list = res.data
if (res.data.length > 0) {
this.list = this.base.buildTree(res.data, 'link_id')
}else{
this.list = []
} else {
this.list = []
}
},
deleteList(id) {
@ -683,7 +686,7 @@
.catalog {
&_list {
display: flex;
align-items: center;
align-items: center;
flex-wrap: wrap;
}
@ -693,15 +696,27 @@
font-size: 18px;
margin: 20px;
cursor: pointer;
color: #b3241d;
width:150px;
height:130px;
color: #b3241d;
width: 150px;
height: 130px;
position: relative;
i {
font-size: 40px;
margin-bottom: 10px;
}
}
&_count {
position: absolute;
top: 0;
right: 0;
padding: 0px 10px;
background: #b3241d;
border-radius: 10px;
color: #fff;
font-size: 12px;
}
}
::v-deep .el-checkbox__input .el-checkbox__inner {

@ -18,7 +18,7 @@
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>填报区域
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" disabled v-model="form.area_id" placeholder="请选择">
<el-select style="width:100%" @change="changeArea" :disabled="(stateObj.is_admin && type==='add')?false:true" v-model="form.area_id" placeholder="请选择">
<el-option v-for="item in list_areas" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
@ -156,7 +156,15 @@
month: '',
id_fill_datas_fill_id_relation: []
},
rules: {
rules: {
business_id: [{
required: true,
message: '请选择业务'
}],
area_id: [{
required: true,
message: '请选择区域'
}],
year: [{
required: true,
message: '请选择年份'
@ -190,7 +198,6 @@
//
if(this.type==='add'){
this.form.area_id = this.stateObj.area_id ? this.stateObj.area_id : ''
let _arr = []
this.list_types.map(item=>{
@ -210,8 +217,27 @@
})
console.log("_arr",_arr)
this.fill_datas = _arr
}
}
},
changeArea(e){
this.form.area_id = e ? e : ''
let _arr = []
this.list_types.map(item=>{
this.list_datas.map(item1=>{
if(item.area_id===e){
_arr.push({
business_id: this.business_id,
year: this.$moment(new Date()).format("YYYY"),
month: this.$moment(new Date()).format("MM"),
area_id: e,
business_type_id: item.id,
business_data_id: item1.id,
value: 0
})
}
})
})
this.fill_datas = _arr
},

@ -55,7 +55,8 @@
import {
index,
destroy
} from "@/api/system/baseForm.js"
} from "@/api/system/baseForm.js"
import state from '@/store/modules/user.js'
export default {
components: {
addFill
@ -67,7 +68,8 @@
table_name: 'businesses',
page: 1,
page_size: 10,
},
},
stateObj:{},
total: 0,
list: [],
table_item: [{
@ -85,7 +87,8 @@
}
},
created() {
created() {
this.stateObj = state.state
this.getList()
},
methods: {
@ -114,7 +117,8 @@
page_size: this.select.page_size,
page: this.select.page,
table_name: this.select.table_name,
json_data_fields: ['area_ids'],
json_data_fields: ['area_ids'],
is_auth:this.stateObj.is_admin?'':1,
filter: [{
"key": "name",
"op": "like",

@ -72,7 +72,7 @@
<template
v-if="scope.row.id_fill_datas_fill_id_relation && scope.row.id_fill_datas_fill_id_relation.length>0">
<template v-for="item in scope.row.id_fill_datas_fill_id_relation">
<div class="product-item">{{item.business_type_id}}</div>
<div class="product-item">{{item.business_type.name}}</div>
</template>
</template>
</template>
@ -82,7 +82,7 @@
<template
v-if="scope.row.id_fill_datas_fill_id_relation && scope.row.id_fill_datas_fill_id_relation.length>0">
<template v-for="item in scope.row.id_fill_datas_fill_id_relation">
<div class="product-item">{{item.business_data_id}}</div>
<div class="product-item">{{item.business_data.name}}</div>
</template>
</template>
</template>
@ -103,9 +103,9 @@
<template v-slot:btns>
<el-table-column align='center' fixed="right" label="操作" width="240" header-align="center">
<template slot-scope="scope">
<el-button type="primary" size="small"
<el-button v-if="stateObj.login_id===scope.row.admin_id || stateObj.is_admin" type="primary" size="small"
@click="editIndex('editor',scope.row.id,scope.row.business_id)">编辑</el-button>
<el-popconfirm style="margin:0 10px" @confirm="deleteList(scope.row.id)" title="确定删除吗?">
<el-popconfirm v-if="stateObj.login_id===scope.row.admin_id || stateObj.is_admin" style="margin:0 10px" @confirm="deleteList(scope.row.id)" title="确定删除吗?">
<el-button type="danger" size="small" slot="reference">删除</el-button>
</el-popconfirm>
</template>
@ -123,7 +123,8 @@
import {
index,
destroy
} from "@/api/system/baseForm.js"
} from "@/api/system/baseForm.js"
import state from '@/store/modules/user.js'
export default {
components: {
addFill
@ -138,7 +139,8 @@
business_id: '',
year:'',
month:''
},
},
stateObj:{},
list_bus: [],
monthArr: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
total: 0,
@ -187,7 +189,8 @@
}
},
created() {
created() {
this.stateObj = state.state
if (this.$route.query.id) {
this.select.business_id = parseInt(this.$route.query.id)
}
@ -248,7 +251,8 @@
var that = this;
destroy({
id: id,
table_name: this.select.table_name
table_name: this.select.table_name,
destroy_relation:['id_fill_datas_fill_id_relation']
}).then(response => {
this.$Message.success('操作成功');
this.getList()

@ -25,7 +25,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath
*/
publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin',
outputDir: '/Users/mac/Documents/朗业/2024/s-四世同堂-档案/sstt_dangan/public/admin_test',
outputDir: '/Users/mac/Documents/朗业/2024/s-四世同堂-档案/sstt_dangan/public/admin',
assetsDir: 'static',
css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项

Loading…
Cancel
Save