所有区域

master
lion 10 months ago
parent ff8a9d48dd
commit 491e0eb305

@ -54,7 +54,10 @@
<div class="xy-table-item-label" style="font-weight: bold"> <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>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<div>
<el-checkbox @change="changeAllArea" v-model="allArea"></el-checkbox>
</div>
<el-select :disabled="stateObj.auth_type==1 || is_search" style="width:100%" v-model="form.area_ids" multiple <el-select :disabled="stateObj.auth_type==1 || is_search" style="width:100%" v-model="form.area_ids" multiple
placeholder="请选择"> placeholder="请选择">
<el-option v-for="item in areaList" :key="item.id" :label="item.name" :value="item.id"> <el-option v-for="item in areaList" :key="item.id" :label="item.name" :value="item.id">
@ -157,7 +160,8 @@
showTinymce: false, showTinymce: false,
is_next: false, // is_next: false, //
catalogList: [], catalogList: [],
is_search:false, // is_search:false, //
allArea:false,
statusList: [{ statusList: [{
id: 0, id: 0,
name: '正常' name: '正常'
@ -225,7 +229,20 @@
this.stateObj = state.state this.stateObj = state.state
this.uploadOther.token = getToken(); this.uploadOther.token = getToken();
}, },
methods: { methods: {
changeAllArea(e){
console.log(e)
if(e){
let arr = []
this.areaList.map(item=>{
arr.push(item.id)
})
this.form.area_ids = arr
}else{
this.form.area_ids = []
}
},
changeEditor(e) { changeEditor(e) {
this.form.content = e this.form.content = e
}, },
@ -344,11 +361,14 @@
console.log("res---", res) console.log("res---", res)
this.form = this.base.requestToForm(res, this.form) this.form = this.base.requestToForm(res, this.form)
console.log("form---", this.form) console.log("form---", this.form)
this.checkArr = res.catalog_id ? [res.catalog_id] : [], this.checkArr = res.catalog_id ? [res.catalog_id] : []
this.form.area_ids = res.area_ids ? res.area_ids : [] this.form.area_ids = res.area_ids ? res.area_ids : []
if(this.form.area_ids.length===this.areaList.length){
this.allArea = true
}
this.form.tag_ids = res.tag_ids ? res.tag_ids : [] this.form.tag_ids = res.tag_ids ? res.tag_ids : []
this.form.files = res.files ? res.files : [], this.form.files = res.files ? res.files : []
this.form.status = res.status ? res.status : 0 this.form.status = res.status ? res.status : 0
// //
if (this.form.status === 2) { if (this.form.status === 2) {
this.is_next = true this.is_next = true
@ -384,7 +404,8 @@
this.showTinymce = false this.showTinymce = false
this.checkArr = [] this.checkArr = []
this.filesList = [] this.filesList = []
this.is_next = false this.is_next = false
this.allArea = false
this.form = { this.form = {
title: '', title: '',
status: 0, status: 0,

@ -25,7 +25,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath * Detail: https://cli.vuejs.org/config/#publicpath
*/ */
publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin', 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', assetsDir: 'static',
css: { css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项 loaderOptions: { // 向 CSS 相关的 loader 传递选项

Loading…
Cancel
Save