Commit dd8e557e authored by 吴春's avatar 吴春

1

parent b623b3e2
...@@ -2694,6 +2694,7 @@ export const op = { ...@@ -2694,6 +2694,7 @@ export const op = {
fgszjl: 'Branch General Manager', fgszjl: 'Branch General Manager',
opszje: 'OP set the amount', opszje: 'OP set the amount',
fgszjdb: 'New Japanese impression', fgszjdb: 'New Japanese impression',
IsSelfGuidedTour:'Is it a free trip',
} }
import invoicesManager from './EN/invoicesManager' import invoicesManager from './EN/invoicesManager'
......
...@@ -2646,6 +2646,7 @@ export const op={ ...@@ -2646,6 +2646,7 @@ export const op={
fgszjl:'支社長', fgszjl:'支社長',
opszje:'OP設定金額', opszje:'OP設定金額',
fgszjdb:'日本印象を新たにする', fgszjdb:'日本印象を新たにする',
IsSelfGuidedTour:'行を自由にするかどうか',
} }
import invoicesManager from './Japan/invoicesManager' import invoicesManager from './Japan/invoicesManager'
......
...@@ -2676,7 +2676,7 @@ export const op={ ...@@ -2676,7 +2676,7 @@ export const op={
fgszjl:'分公司總經理', fgszjl:'分公司總經理',
opszje:'OP設定金額', opszje:'OP設定金額',
fgszjdb:'新增日本印象', fgszjdb:'新增日本印象',
IsSelfGuidedTour:'是否自由行',
} }
import invoicesManager from './zhTW/invoicesManager' import invoicesManager from './zhTW/invoicesManager'
......
...@@ -2699,6 +2699,7 @@ export const op={ ...@@ -2699,6 +2699,7 @@ export const op={
opszje:'OP设置金额', opszje:'OP设置金额',
fgszjdb:'新增日本印象', fgszjdb:'新增日本印象',
yuankeyong: '元可用', yuankeyong: '元可用',
IsSelfGuidedTour:'是否自由行',
} }
import invoicesManager from './zhCN/invoicesManager' import invoicesManager from './zhCN/invoicesManager'
......
...@@ -6449,7 +6449,7 @@ export const obj = { ...@@ -6449,7 +6449,7 @@ export const obj = {
zongrenssyrs: '总人数(剩余人数)', zongrenssyrs: '总人数(剩余人数)',
qingshursjia: '请输入售价', qingshursjia: '请输入售价',
qingshurgjia: '请输入国家', qingshurgjia: '请输入国家',
shifouremen: '是否热门"', shifouremen: '是否热门',
guojiatub: '国家图标', guojiatub: '国家图标',
beijintup: '背景图片', beijintup: '背景图片',
qingshangcgjtup: '请上传国家图片!', qingshangcgjtup: '请上传国家图片!',
......
...@@ -2140,7 +2140,7 @@ ...@@ -2140,7 +2140,7 @@
this.queryMsg.PlaceID = 0; this.queryMsg.PlaceID = 0;
this.queryMsg.LineteamId = 0; this.queryMsg.LineteamId = 0;
let msg = { let msg = {
lineID: this.queryMsg.LineId lineIDs: this.addMsg.LineIds
}; };
this.apipost("team_post_GetLinePlace", msg, res => { this.apipost("team_post_GetLinePlace", msg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
......
...@@ -2,6 +2,11 @@ ...@@ -2,6 +2,11 @@
.icon { .icon {
height: 30px; height: 30px;
} }
.ApprovalProcessBg {
background: #f8f8f8;
max-height: 400px;
overflow-y: auto;
}
</style> </style>
<template> <template>
<div class="flexOne"> <div class="flexOne">
...@@ -30,11 +35,12 @@ ...@@ -30,11 +35,12 @@
</li> </li>
<li> <li>
<input type="button" class="hollowFixedBtn" name="" id="" :value="$t('pub.searchBtn')" @click="resetPageIndex(),getList()" /> <input type="button" class="hollowFixedBtn" name="" id="" :value="$t('pub.searchBtn')" @click="resetPageIndex(),getList()" />
<input type="button" @click="outerVisible = true,dialogTitle=$t('objFill.v101.xinzengfl'),clearMessage();" class="normalBtn" :value="$t('pub.addBtn')" /> <input type="button" @click="outerVisible = true,dialogTitle=$t('objFill.v101.xinzengfl'),clearMessage(),getLineList(),getAllAreaTreeList(0),getLineTeamList();" class="normalBtn" :value="$t('pub.addBtn')" />
</li> </li>
</ul> </ul>
</div> </div>
<el-table :data="DataList" style="width:100%" border v-loading='loading'>
<el-table :data="DataList" style="width:100%" v-loading='loading'>
<el-table-column fixed :label="$t('ground.fenleimc')"> <el-table-column fixed :label="$t('ground.fenleimc')">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
...@@ -59,6 +65,39 @@ ...@@ -59,6 +65,39 @@
{{scope.row.IsHot === 1 ? $t('pub.yes') : $t('pub.no')}}</div> {{scope.row.IsHot === 1 ? $t('pub.yes') : $t('pub.no')}}</div>
<div>{{scope.row.TotalInventory}}</div> <div>{{scope.row.TotalInventory}}</div>
</template> </template>
</el-table-column>
<el-table-column fixed :label="$t('op.IsSelfGuidedTour')">
<template slot-scope="scope">
<div>
{{scope.row.IsSelfGuidedTour === 1 ? $t('pub.yes') : $t('pub.no')}}</div>
</template>
</el-table-column>
<el-table-column fixed :label="$t('hotel.hotel_corrlelatition')">
<template slot-scope="scope">
<template v-if="scope.row.AreaList&&scope.row.AreaList.length>0">
<div >
<span v-for="(file,fIndex) in scope.row.AreaList">
{{file.Name}}{{(fIndex== (scope.row.AreaList.length-1)&&scope.row.AreaList.length>1)?"":","}}
</span>
</div>
</template>
<template v-if="scope.row.LineList&&scope.row.LineList.length>0">
<div >
<span v-for="(file,fIndex) in scope.row.LineList">
{{file.Name}}{{(fIndex== (scope.row.LineList.length-1)&&scope.row.LineList.length>1)?"":","}}
</span>
</div>
</template>
<template v-if="scope.row.SeriesList&&scope.row.SeriesList.length>0">
<div >
<span v-for="(file,fIndex) in scope.row.SeriesList">
{{file.Name}}{{(fIndex== (scope.row.SeriesList.length-1)&&scope.row.SeriesList.length>1)?"":","}}
</span>
</div>
</template>
</template>
</el-table-column> </el-table-column>
<el-table-column fixed :label="$t('objFill.v101.paixuma')"> <el-table-column fixed :label="$t('objFill.v101.paixuma')">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -68,12 +107,14 @@ ...@@ -68,12 +107,14 @@
</el-table-column> </el-table-column>
<el-table-column fixed :label="$t('objFill.v101.activity.col6.t8')"> <el-table-column fixed :label="$t('objFill.v101.activity.col6.t8')">
<template slot-scope="scope"> <template slot-scope="scope">
<img class="icon" @click="showImage(scope.row.Icon)" :src="scope.row.Icon"/> <!-- style="width: 100px; height: 100px" -->
<el-image class="icon" :src="scope.row.Icon" :preview-src-list="[scope.row.Icon]"> </el-image>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed :label="$t('objFill.v101.Rest.beijintup')"> <el-table-column fixed :label="$t('objFill.v101.Rest.beijintup')">
<template slot-scope="scope"> <template slot-scope="scope">
<img class="icon" @click="showImage(scope.row.BackgroundImage)" :src="scope.row.BackgroundImage"/> <el-image class="icon" :src="scope.row.BackgroundImage" :preview-src-list="[scope.row.BackgroundImage]"> </el-image>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed :label="$t('admin.admin_status')"> <el-table-column fixed :label="$t('admin.admin_status')">
...@@ -82,7 +123,7 @@ ...@@ -82,7 +123,7 @@
{{scope.row.Enable === 1 ? $t('fnc.qiyong') :$t('active.ld_jinyong')}}</div> {{scope.row.Enable === 1 ? $t('fnc.qiyong') :$t('active.ld_jinyong')}}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('system.table_operation')" header-align="center" align="center"> <el-table-column :label="$t('system.table_operation')" header-align="center" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip class="item" effect="dark" :content="$t('system.table_edit')" placement="top-start"> <el-tooltip class="item" effect="dark" :content="$t('system.table_edit')" placement="top-start">
<el-button type="primary" icon="el-icon-edit" circle @click="outerVisible = true,dialogTitle=$t('objFill.v101.bianjifenl'),updateData(scope.row)"> <el-button type="primary" icon="el-icon-edit" circle @click="outerVisible = true,dialogTitle=$t('objFill.v101.bianjifenl'),updateData(scope.row)">
...@@ -94,6 +135,7 @@ ...@@ -94,6 +135,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
background background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
...@@ -104,75 +146,112 @@ ...@@ -104,75 +146,112 @@
</el-pagination> </el-pagination>
<el-dialog :title="dialogTitle" :visible.sync="outerVisible" center width="1000px" :before-close="closeChangeMachie"> <el-dialog :title="dialogTitle" :visible.sync="outerVisible" center width="1000px" :before-close="closeChangeMachie">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="120px"> <el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="120px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('system.query_airName')" prop="CategoryName"> <el-form-item :label="$t('system.query_airName')" prop="CategoryName">
<el-input style="width:217px" type="text" :disabled="addMsg.IsLock === 1" v-model="addMsg.CategoryName" maxlength="50" :placeholder="$t('system.query_airName')"> <el-input style="width:217px" type="text" :disabled="addMsg.IsLock === 1" v-model="addMsg.CategoryName" maxlength="50" :placeholder="$t('system.query_airName')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('system.table_rank')" prop="Sort"> <el-form-item :label="$t('system.table_rank')" >
<el-input style="width:217px" type="number" v-model="addMsg.Sort" maxlength="10" :placeholder="$t('system.table_rank')"> <el-input style="width:217px" type="number" v-model="addMsg.Sort" maxlength="10" :placeholder="$t('system.table_rank')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('objFill.cengji')" prop="Level"> <el-form-item :label="$t('objFill.cengji')" prop="Level">
<el-select :disabled="addMsg.IsLock === 1" v-model="addMsg.Level" :placeholder="$t('pub.pleaseSel')" @change="handleLevelChange"> <el-select :disabled="addMsg.IsLock === 1" v-model="addMsg.Level" :placeholder="$t('pub.pleaseSel')" @change="handleLevelChange">
<el-option :label="$t('objFill.jibies')[0]" :value="1"></el-option> <el-option :label="$t('objFill.jibies')[0]" :value="1"></el-option>
<el-option :label="$t('objFill.jibies')[1]" :value="2"></el-option> <el-option :label="$t('objFill.jibies')[1]" :value="2"></el-option>
<el-option :label="$t('objFill.jibies')[2]" :value="3"></el-option> <el-option :label="$t('objFill.jibies')[2]" :value="3"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('objFill.v101.fujifenl')" prop="ParentId"> <el-form-item :label="$t('objFill.v101.fujifenl')" >
<!-- <el-tree show-checkbox ref="tree" node-key="Id" :data="cateGoryTree" :props="{label: 'CategoryName', children: 'SubList'}" <el-select :disabled="addMsg.IsLock === 1" filterable v-model="addMsg.ParentId" :placeholder="$t('pub.pleaseSel')" @change="handleParentIdChange">
check-strictly highlight-current @check-change="handleClick"></el-tree> --> <el-option v-for="item in cateGoryList" :key="item.Id" :label="item.CategoryName"
<el-select :disabled="addMsg.IsLock === 1" filterable v-model="addMsg.ParentId" :placeholder="$t('pub.pleaseSel')"> :value="item.Id">
<el-option v-for="item in cateGoryList" :key="item.Id" :label="item.CategoryName" </el-option>
:value="item.Id"> </el-select>
</el-option> </el-form-item>
</el-select> </el-col>
</el-form-item> </el-row>
</el-col> <el-row>
</el-row> <el-col :span="12">
<el-row> <el-form-item :label="$t('objFill.v101.Rest.shifouremen')" >
<el-col :span="12"> <el-switch v-model="addMsg.IsHot"></el-switch>
<el-form-item :label="$t('objFill.v101.Rest.shifouremen')" prop="IsHot"> </el-form-item>
<el-switch v-model="addMsg.IsHot"></el-switch> </el-col>
</el-form-item> <el-col :span="12"><el-form-item :label="$t('visa.v_shifouqiyong')" >
</el-col> <el-switch :disabled="addMsg.IsLock === 1" v-model="addMsg.Enable"></el-switch>
<el-col :span="12"><el-form-item :label="$t('visa.v_shifouqiyong')" prop="Enable"> </el-form-item></el-col>
<el-switch :disabled="addMsg.IsLock === 1" v-model="addMsg.Enable"></el-switch> </el-row>
</el-form-item></el-col> <el-row>
</el-row> <el-col :span="12">
<el-row> <el-form-item :label="$t('op.IsSelfGuidedTour')" >
<el-col :span="12"><el-form-item :label="$t('objFill.v101.activity.col6.t8')" prop="Icon"> <el-checkbox v-model="addMsg.IsSelfGuidedTour" @change="changeSelfGuidedTour()" :true-label="1" :false-label="0">{{$t('pub.yes')}}</el-checkbox>
<!-- <el-input :value="addMsg.Icon" style="dispaly: none;" /> --> </el-form-item>
<uploadImg :maxNum="1" ref="Icon"></uploadImg> </el-col>
</el-form-item> <el-col :span="12">
</el-col> <template v-if="addMsg.IsSelfGuidedTour==0">
<el-col :span="12"><el-form-item :label="$t('objFill.v101.Rest.beijintup')" prop="BackgroundImage"> <template v-if="addMsg.Level==1">
<!-- <el-input :value="addMsg.BackgroundImage" style="dispaly: none;"/> --> <el-form-item :label="$t('system.table_ssLine')">
<uploadImg :maxNum="1" ref="BackgroundImage"></uploadImg> <el-select :disabled="addMsg.IsLock === 1" v-model="addMsg.LineIdList" multiple collapse-tags :placeholder="$t('pub.pleaseSel')" >
</el-form-item></el-col> <el-option :label="$t('pub.unlimitedSel')" :value="queryCommonData.SelectDefaultValue"></el-option>
</el-row> <el-option v-for="item in queryCommonData.LineList" :label="item.LineName" :value="item.LineID"
</el-form> :key="item.LineID"></el-option>
<div slot="footer" class="dialog-footer"> </el-select>
<button class="normalBtn" type="primary" @click="submitForm('addMsg')">{{$t('pub.saveBtn')}}</button> &nbsp; </el-form-item>
<button class="hollowFixedBtn" @click="outerVisible = false">{{$t('pub.cancelBtn')}}</button> </template>
</div> <template v-else>
</el-dialog> <el-form-item :label="$t('active.ad_xlmc')">
<viewer :images="images" :options='imageOptions' @inited="inited" class="viewer" ref="viewer"> <el-select :disabled="addMsg.IsLock === 1" v-model="addMsg.SeriesIdList" multiple collapse-tags :placeholder="$t('pub.pleaseSel')" >
<template slot-scope="scope"> <el-option :label="$t('pub.unlimitedSel')" :value=queryCommonData.SelectDefaultValue></el-option>
<img v-for="src in scope.images" :src="src" :key="src"> <el-option v-for="item in queryCommonData.LineTeamList" :label="item.LtName" :value="item.LtID"
</template> :key="item.LtID"></el-option>
</viewer> </el-select>
</el-form-item>
</template>
</template>
<template v-else>
<el-form-item :label="$t('pub.area')">
<el-select v-model="showCategoryName" :placeholder="$t('pub.pleaseSel')" multiple clearable collapse-tags @change="selectChange">
<el-option :value="chooseCategroyArray" style="height: auto">
<el-tree :data="queryCommonData.AreaList" show-checkbox node-key="Id" ref="tree" highlight-current
:props="{label: 'Name', children: 'SubList'}"
:default-expanded-keys="addMsg.AreaIdList"
:default-checked-keys="addMsg.AreaIdList"
@check-change="handleNodeClick"></el-tree>
</el-option>
</el-select>
</el-form-item>
</template>
</el-col>
</el-row>
<el-row>
<el-col :span="12"><el-form-item :label="$t('objFill.v101.activity.col6.t8')" >
<uploadImg :maxNum="1" ref="Icon"></uploadImg>
</el-form-item>
</el-col>
<el-col :span="12"><el-form-item :label="$t('objFill.v101.Rest.beijintup')" >
<uploadImg :maxNum="1" ref="BackgroundImage"></uploadImg>
</el-form-item></el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<button class="normalBtn" type="primary" @click="submitForm('addMsg')">{{$t('pub.saveBtn')}}</button> &nbsp;
<button class="hollowFixedBtn" @click="outerVisible = false">{{$t('pub.cancelBtn')}}</button>
</div>
</el-dialog>
</div> </div>
</template> </template>
...@@ -186,6 +265,19 @@ import uploadImg from '../../pubComponents/uploadImg' ...@@ -186,6 +265,19 @@ import uploadImg from '../../pubComponents/uploadImg'
navbar: false, navbar: false,
title: false title: false
}, },
chooseCategroyArray:[],
showCategoryName: "",
queryCommonData:{
LineList:[],
LineTeamList:[],
AreaList:[],
AreaAllList:[],
SelectDefaultValue: ''
},
defaultProps: {
children: 'ChildList',
label: 'DepartmentName',
},
images: [], images: [],
dialogTitle: '', dialogTitle: '',
loading: false, loading: false,
...@@ -197,19 +289,26 @@ import uploadImg from '../../pubComponents/uploadImg' ...@@ -197,19 +289,26 @@ import uploadImg from '../../pubComponents/uploadImg'
currentPage: 1, currentPage: 1,
outerVisible: false, outerVisible: false,
msg: { //列表查询请求数据 msg: { //列表查询请求数据
"pageIndex": 1, pageIndex: 1,
'pageSize': 15, pageSize: 15,
Enable: '1' Enable: '1'
}, },
addMsg: { addMsg: {
'Level': '', Level: '',
'ParentId': '', ParentId: '',
'CategoryName': '', CategoryName: '',
'Icon': '', Icon: '',
'IsHot':false, IsHot:false,
'Sort':'', Sort:'',
'BackgroundImage': '', BackgroundImage: '',
'Enable': true, Enable: true,
AreaIds:"",
LineIds:"",
SeriesIds:"",
AreaIdList:[],
LineIdList:[],
SeriesIdList:[],
IsSelfGuidedTour:0,
}, },
rules:{ rules:{
CategoryName:[ CategoryName:[
...@@ -225,6 +324,78 @@ import uploadImg from '../../pubComponents/uploadImg' ...@@ -225,6 +324,78 @@ import uploadImg from '../../pubComponents/uploadImg'
this.getList(); this.getList();
}, },
methods: { methods: {
//商品分类下拉框改变
selectChange(e) {
var arrNew = [];
var dataLength = this.chooseCategroyArray.length;
var eleng = e.length;
for (let i = 0; i < dataLength; i++) {
for (let j = 0; j < eleng; j++) {
if (e[j] === this.chooseCategroyArray[i].Name) {
arrNew.push(this.chooseCategroyArray[i])
}
}
}
this.$refs.tree.setCheckedNodes(arrNew); //设置勾选的值
},
handleNodeClick() {
let res = this.$refs.tree.getCheckedNodes(true, true);
let arrLabel = [];
let arr = [];
console.log(res,'---------');
res.forEach(item => {
arrLabel.push(item.Name);
arr.push(item);
});
this.chooseCategroyArray = arr;
this.showCategoryName = arrLabel;
console.log("this.chooseCategroyArray ",this.chooseCategroyArray );
},
getLineList() {//获取线路列表
this.apipost(
"line_post_GetList", {
LineDirection: 2
},
res => {
if (res.data.resultCode == 1) {
this.queryCommonData.LineList = res.data.data;
}
}
);
},
getAllAreaTreeList(type) {//获取地区树形列表数据
this.apipost(
"ws_get_GetAllAreaTreeList", {},
res => {
if (res.data.resultCode == 1) {
this.queryCommonData.AreaList = res.data.data.list;
this.queryCommonData.AreaAllList=res.data.data.dataList;
if(type==1){
if(this.queryCommonData.AreaAllList!=null&&this.queryCommonData.AreaAllList.length>0){
let arrLabel = [];
this.queryCommonData.AreaAllList.forEach((item,index) => {
this.addMsg.AreaIdList.forEach((itemId,indexId) => {
if(item.Id==itemId){
arrLabel.push(item.AreaName);
}
});
});
this.showCategoryName = arrLabel;
this.$forceUpdate()
}
}
}
}
);
},
getLineTeamList(LineIds) { //获取系列列表
this.apipost("team_post_GetList", {LineIds: LineIds,lineID:0}, res => {
if (res.data.resultCode == 1) {
this.queryCommonData.LineTeamList = res.data.data;
}
});
},
showImage(src) { showImage(src) {
this.$set(this.images, 0, src); this.$set(this.images, 0, src);
setTimeout(() => { setTimeout(() => {
...@@ -253,9 +424,32 @@ import uploadImg from '../../pubComponents/uploadImg' ...@@ -253,9 +424,32 @@ import uploadImg from '../../pubComponents/uploadImg'
handleLevelChange() { handleLevelChange() {
this.addMsg.ParentId = '' this.addMsg.ParentId = ''
if(this.addMsg.Level <= 1) { if(this.addMsg.Level <= 1) {
this.cateGoryList = [] this.cateGoryList = [];
this.addMsg.LineIdList=[];
this.addMsg.SeriesIdList=[];
this.addMsg.AreaIdList=[];
} else { } else {
this.getCateGoryList() this.getCateGoryList();
}
},
changeSelfGuidedTour(){
this.addMsg.LineIdList=[];
this.addMsg.SeriesIdList=[];
this.addMsg.AreaIdList=[];
},
handleParentIdChange(){
if(this.addMsg.ParentId>0){
let lineIds='';
let index = this.cateGoryList.findIndex(item => item.Id ===this.addMsg.ParentId);
this.addMsg.LineIdList=[];
this.addMsg.SeriesIdList=[];
this.addMsg.AreaIdList=[];
if(index!=-1){
lineIds=this.cateGoryList[index].LineIds;
}
this.getLineTeamList(lineIds);
} }
}, },
getCateGoryList() { getCateGoryList() {
...@@ -274,17 +468,26 @@ import uploadImg from '../../pubComponents/uploadImg' ...@@ -274,17 +468,26 @@ import uploadImg from '../../pubComponents/uploadImg'
this.$message.error(this.$t('objFill.v101.qingxzfujifl')); this.$message.error(this.$t('objFill.v101.qingxzfujifl'));
return return
} }
// if(!icon) {
// this.$message.error('请上传图标!');
// return
// }
// if(!background) {
// this.$message.error('请上传背景图片!');
// return
// }
let params = {...this.addMsg} let params = {...this.addMsg}
params.IsHot = params.IsHot ? 1 : 2 params.IsHot = params.IsHot ? 1 : 2
params.Enable = params.Enable ? 1 : 2 params.Enable = params.Enable ? 1 : 2
if(params.LineIdList&&params.LineIdList.length>0){
params.LineIds=params.LineIdList.toString();
}
if(params.SeriesIdList&&params.SeriesIdList.length>0){
params.SeriesIds=params.SeriesIdList.toString();
}
var tempCategory = "";
if (this.chooseCategroyArray && this.chooseCategroyArray.length > 0) {
this.chooseCategroyArray.forEach(item => {
tempCategory += item.Id + ",";
})
}
params.AreaIds = tempCategory.substring(0, tempCategory.lastIndexOf(','));
// if(params.AreaList&&params.AreaList.length>0){
// params.AreaIds=params.AreaList.toString();
// }
this.apipost('ws_post_SetCategory', params, res => { this.apipost('ws_post_SetCategory', params, res => {
if(res.data.resultCode == 1){ if(res.data.resultCode == 1){
this.outerVisible=false; this.outerVisible=false;
...@@ -297,16 +500,25 @@ import uploadImg from '../../pubComponents/uploadImg' ...@@ -297,16 +500,25 @@ import uploadImg from '../../pubComponents/uploadImg'
}, },
updateData({Id}) { //修改 updateData({Id}) { //修改
this.getLineList();
this.apipost('ws_post_GetCategory',{Id},res=>{ this.apipost('ws_post_GetCategory',{Id},res=>{
let params = res.data.data let params = res.data.data
params.IsHot = params.IsHot === 1 params.IsHot = params.IsHot === 1
params.Enable = params.Enable === 1 params.Enable = params.Enable === 1
this.addMsg = params this.addMsg = params;
this.$refs.Icon.ImageList = params.Icon ? [params.Icon] : [] this.$refs.Icon.ImageList = params.Icon ? [params.Icon] : [];
this.$refs.BackgroundImage.ImageList = params.BackgroundImage ? [params.BackgroundImage] : [] this.$refs.BackgroundImage.ImageList = params.BackgroundImage ? [params.BackgroundImage] : [];
if(this.addMsg.Level > 1) { console.log(params,'-----');
if(this.addMsg.IsSelfGuidedTour==1){
this.getAllAreaTreeList(1);
}
else if(this.addMsg.IsSelfGuidedTour==0&&this.addMsg.Level > 1) {
this.getCateGoryList() this.getCateGoryList()
this.getLineTeamList(params.LineIds);
} }
else{ this.getLineTeamList(); }
},err=>{}) },err=>{})
}, },
//删除 //删除
...@@ -335,28 +547,35 @@ import uploadImg from '../../pubComponents/uploadImg' ...@@ -335,28 +547,35 @@ import uploadImg from '../../pubComponents/uploadImg'
}, },
clearMessage() { clearMessage() {
this.addMsg = { this.addMsg = {
'Level': '', Level: '',
'ParentId': '', ParentId: '',
'CategoryName': '', CategoryName: '',
'Icon': '', Icon: '',
'IsHot':false, IsHot:false,
'Sort':'', Sort:'',
'BackgroundImage': '', BackgroundImage: '',
'Enable': true, Enable: true,
AreaIds:"",
LineIds:"",
SeriesIds:"",
AreaIdList:[],
LineIdList:[],
SeriesIdList:[],
IsSelfGuidedTour:0,
}
if(this.$refs.Icon&&this.$refs.Icon.ImageList&&this.$refs.Icon.ImageList.length>0){
this.$refs.Icon.ImageList = []
}
if(this.$refs.BackgroundImage&&this.$refs.BackgroundImage.ImageList&&this.$refs.Icon.BackgroundImage.ImageList.length>0){
this.$refs.BackgroundImage.ImageList = []
} }
this.$refs.Icon.ImageList = [] //this.$refs.tree.setCheckedKeys([]);
this.$refs.BackgroundImage.ImageList = []
this.$refs.tree.setCheckedKeys([]);
}, },
resetPageIndex() { resetPageIndex() {
this.msg.pageIndex = 1 this.msg.pageIndex = 1
this.currentPage = 1 this.currentPage = 1
}, },
submitForm(addMsg) {//提交创建、修改表单 submitForm(addMsg) {//提交创建、修改表单
// const icon = this.$refs.Icon.ImageList[0]
// const background = this.$refs.BackgroundImage.ImageList[0]
// this.addMsg.Icon = icon
// this.addMsg.BackgroundImage = background
this.$refs[addMsg].validate((valid) => { this.$refs[addMsg].validate((valid) => {
if (valid) { if (valid) {
this.addData() this.addData()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment