Commit fd554451 by huaying

fix: 编辑活码

parent 6a9bfeea
...@@ -122,7 +122,7 @@ export default { ...@@ -122,7 +122,7 @@ export default {
clerkIdList: [], clerkIdList: [],
hmUserNum: null //多人活码人数 hmUserNum: null //多人活码人数
}; };
// this.$router.go(-1); this.$router.go(-1);
} else { } else {
return this.$message.error(res.data.message); return this.$message.error(res.data.message);
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<dm-memberTag-group :visiable.sync="tagsDialogVisible" projectName="haobao-3" @save="saveTagPop"></dm-memberTag-group> <dm-memberTag-group :visiable.sync="tagsDialogVisible" projectName="haobao-3" @save="saveTagPop"></dm-memberTag-group>
</el-form-item> </el-form-item>
<dm-sub-title text="欢迎语设置" type="line" class="mt40b20" /> <dm-sub-title text="欢迎语设置" type="line" class="mt40b20" />
<welcomeItem @getWelcomeId="getWelcomeId" :welcomeIdP="form.welcomeId"></welcomeItem> <welcomeItem @getWelcomeId="getWelcomeId" :welcomeIdP="form.welcomeId" ref="welcomeItem"></welcomeItem>
</el-form> </el-form>
</div> </div>
<div class="saveBtn"> <div class="saveBtn">
...@@ -132,6 +132,9 @@ export default { ...@@ -132,6 +132,9 @@ export default {
}, },
// 保存按钮 // 保存按钮
save() { save() {
if (!this.$refs.welcomeItem.submit()) {
return;
}
this.$refs.form.validate(async valid => { this.$refs.form.validate(async valid => {
if (valid) { if (valid) {
this.form.passFlag = this.form.passFlag ? 1 : 0; this.form.passFlag = this.form.passFlag ? 1 : 0;
......
...@@ -91,8 +91,7 @@ export default { ...@@ -91,8 +91,7 @@ export default {
}; };
}, },
activated() { activated() {
this.getWelcomeTable(); this.onSearch();
console.log(this.welcomeIdP, 'ppp');
}, },
methods: { methods: {
onSearch() { onSearch() {
...@@ -113,20 +112,22 @@ export default { ...@@ -113,20 +112,22 @@ export default {
if (this.isFlag) { if (this.isFlag) {
let flag = this.welcomeTableData.map(item => item.welcomeId).indexOf(this.currentWelcome.welcomeId); let flag = this.welcomeTableData.map(item => item.welcomeId).indexOf(this.currentWelcome.welcomeId);
let flag1 = this.welcomeTableData.map(item => item.welcomeId).includes(this.currentWelcome.welcomeId); let flag1 = this.welcomeTableData.map(item => item.welcomeId).includes(this.currentWelcome.welcomeId);
if (this.welcomePage.pageNum == 1) { // if (this.welcomePage.pageNum == 1) {
if (flag1) { if (flag1) {
this.welcome = flag; this.welcome = flag;
} else {
this.welcomeTableData.unshift(this.currentWelcome);
this.welcome = 0;
}
this.welcomeContent = this.currentWelcome.welcomeContent; this.welcomeContent = this.currentWelcome.welcomeContent;
} else if (this.welcomePage.pageNum != 1) { } else {
if (flag1) { // this.welcomeTableData.unshift(this.currentWelcome);
this.welcomeTableData.splice(flag, 1); // this.welcome = 0;
}
this.welcomeContent = ''; this.welcomeContent = '';
} }
// this.welcomeContent = this.currentWelcome.welcomeContent;
// } else if (this.welcomePage.pageNum != 1) {
// if (flag1) {
// this.welcomeTableData.splice(flag, 1);
// }
// this.welcomeContent = '';
// }
} }
}); });
}, },
...@@ -164,7 +165,7 @@ export default { ...@@ -164,7 +165,7 @@ export default {
welcomeIdP: { welcomeIdP: {
handler: async function(val) { handler: async function(val) {
if (val) { if (val) {
console.log(val, 'id'); this.welcomesType = 1;
this.welcomeId = val; this.welcomeId = val;
await getRequest('/haoban-manage3-web/welcome/get', { welcomeId: this.welcomeId, enterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).enterpriseId : '' }).then(res => { await getRequest('/haoban-manage3-web/welcome/get', { welcomeId: this.welcomeId, enterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).enterpriseId : '' }).then(res => {
if (res.data.code == 0) { if (res.data.code == 0) {
......
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