Commit 83bc0e66 by crushh

Merge branch 'feature/act-code' of http://git.gicdev.com/office/haoban-3 into feature/act-code

parents e9bcfe76 8903d610
...@@ -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;
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<div> <div>
<el-row> <el-row>
<el-col :span="17"> <el-col :span="17">
<el-form-item label="活码类型" @change="radioChange"> <el-form-item label="活码类型">
<el-radio-group v-model="welcomesType"> <el-radio-group v-model="welcomesType" @change="radioChange">
<el-radio :label="1">活码欢迎语</el-radio> <el-radio :label="1">活码欢迎语</el-radio>
<el-radio :label="2">不发送欢迎语</el-radio> <el-radio :label="2">不发送欢迎语</el-radio>
</el-radio-group> </el-radio-group>
...@@ -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 = '';
// }
} }
}); });
}, },
...@@ -146,6 +147,7 @@ export default { ...@@ -146,6 +147,7 @@ export default {
// 单选框点击事件 // 单选框点击事件
radioChange(e) { radioChange(e) {
if (e == 1) { if (e == 1) {
this.getWelcomeTable();
this.welcomeId = ''; this.welcomeId = '';
this.$emit('getWelcomeId', this.welcomeId); this.$emit('getWelcomeId', this.welcomeId);
} }
...@@ -164,7 +166,7 @@ export default { ...@@ -164,7 +166,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