|
|
@@ -2,6 +2,13 @@
|
|
|
<div>
|
|
|
<el-tabs type="card">
|
|
|
<el-tab-pane :label="this.$i18n.t('sysManagement.chineseInformation')">
|
|
|
+ <el-select v-model="shopId" placeholder="关联店铺" controls-position="right" @change="getInfo(shopId)">
|
|
|
+ <el-option v-for="item in shopList"
|
|
|
+ :key="item.shopId"
|
|
|
+ :label="item.shopName"
|
|
|
+ :value="item.shopId">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
<tiny-mce
|
|
|
v-model="contentCN.content"
|
|
|
ref="content"
|
|
|
@@ -9,6 +16,13 @@
|
|
|
></tiny-mce>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane :label="this.$i18n.t('sysManagement.englishInformation')">
|
|
|
+ <el-select v-model="shopId" placeholder="关联店铺" controls-position="right" @change="getInfo(shopId)">
|
|
|
+ <el-option v-for="item in shopList"
|
|
|
+ :key="item.shopId"
|
|
|
+ :label="item.shopName"
|
|
|
+ :value="item.shopId">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
<tiny-mce
|
|
|
v-model="contentEN.content"
|
|
|
ref="content"
|
|
|
@@ -47,15 +61,47 @@ export default {
|
|
|
// 英文配置信息
|
|
|
contentEN: {
|
|
|
content: ''
|
|
|
- }
|
|
|
+ },
|
|
|
+ shopId: null,
|
|
|
+ shopList: [],
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
- this.init()
|
|
|
+ this.getShopList()
|
|
|
+ // this.init()
|
|
|
},
|
|
|
methods: {
|
|
|
+ getShopList () {
|
|
|
+ this.$http({
|
|
|
+ url: this.$http.adornUrl('/shop/shopAuditing/list'),
|
|
|
+ method: 'get',
|
|
|
+ }).then(({ data }) => {
|
|
|
+ if (data) {
|
|
|
+ this.shopList = data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getInfo (shopId) {
|
|
|
+ this.$http({
|
|
|
+ url: this.$http.adornUrl('/sys/pconfig/info/' + this.params.keyCN + "_" + shopId),
|
|
|
+ method: 'get',
|
|
|
+ params: this.$http.adornParams()
|
|
|
+ }).then(({data}) => {
|
|
|
+ if (data) {
|
|
|
+ this.contentCN = data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$http({
|
|
|
+ url: this.$http.adornUrl('/sys/pconfig/info/' + this.params.keyEN + "_" + shopId),
|
|
|
+ method: 'get',
|
|
|
+ params: this.$http.adornParams()
|
|
|
+ }).then(({data}) => {
|
|
|
+ if (data) {
|
|
|
+ this.contentEN = data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
init () {
|
|
|
- console.log(this.params)
|
|
|
this.$nextTick(() => {
|
|
|
this.$http({
|
|
|
url: this.$http.adornUrl('/sys/pconfig/info/' + this.params.keyCN),
|
|
|
@@ -83,7 +129,7 @@ export default {
|
|
|
url: this.$http.adornUrl('/sys/pconfig/save'),
|
|
|
method: 'post',
|
|
|
data: this.$http.adornData({
|
|
|
- 'paramKey': this.params.keyCN,
|
|
|
+ 'paramKey': this.params.keyCN + "_" + this.shopId,
|
|
|
'paramValue': JSON.stringify(this.contentCN),
|
|
|
'remark': this.params.remarkCN
|
|
|
})
|
|
|
@@ -92,7 +138,7 @@ export default {
|
|
|
url: this.$http.adornUrl('/sys/pconfig/save'),
|
|
|
method: 'post',
|
|
|
data: this.$http.adornData({
|
|
|
- 'paramKey': this.params.keyEN,
|
|
|
+ 'paramKey': this.params.keyEN + "_" + this.shopId,
|
|
|
'paramValue': JSON.stringify(this.contentEN),
|
|
|
'remark': this.params.remarkEN
|
|
|
})
|