Commit fd554451 by huaying

fix: 编辑活码

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