Commit b5d59415 by crushh

Merge branch 'feature/2月迭代' into master

parents f6ad46c1 fb33cf55
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div> <div>
<div class="warp"> <div class="warp">
<h2>加好友配置</h2> <h2>加好友配置</h2>
<span class="echoData" v-show="friendSettingType && friendSettingType != 4">{{ echoFriendData }}</span> <span class="echoData" v-show="friendSettingType">{{ echoFriendData }}</span>
<el-button type="text" style="margin-left: 20px;" @click="openDialog">去配置</el-button> <el-button type="text" style="margin-left: 20px;" @click="openDialog">去配置</el-button>
</div> </div>
<div class="daily-set-wrap"> <div class="daily-set-wrap">
...@@ -54,12 +54,17 @@ ...@@ -54,12 +54,17 @@
<el-table-column prop="operatorName" label="操作人" width="120" show-overflow-tooltip> </el-table-column> <el-table-column prop="operatorName" label="操作人" width="120" show-overflow-tooltip> </el-table-column>
<el-table-column prop="suitDepartmentName" label="适用范围" width="300"> <el-table-column prop="suitDepartmentName" label="适用范围" width="300">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<div v-if="row.defaultWelcomeFlag">
<div>全体成员</div>
</div>
<div v-else>
<div class="wrapText" v-if="row.suitDepartmentName.join(',').length > 40"> <div class="wrapText" v-if="row.suitDepartmentName.join(',').length > 40">
{{ row.suitDepartmentName.join(',').slice(0, 40) + '...' }} {{ row.suitDepartmentName.join(',').slice(0, 40) + '...' }}
</div> </div>
<div class="wrapText" v-else> <div class="wrapText" v-else>
{{ row.suitDepartmentName.join(',') }} {{ row.suitDepartmentName.join(',') }}
</div> </div>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="180"> <el-table-column label="操作" width="180">
...@@ -102,7 +107,7 @@ export default { ...@@ -102,7 +107,7 @@ export default {
title: '', title: '',
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '',
friendSettingType: '', friendSettingType: '',
type: 2, type: 1,
friendSettingId: '', friendSettingId: '',
btnLoading: false, btnLoading: false,
dialogVisible: false, dialogVisible: false,
...@@ -156,7 +161,7 @@ export default { ...@@ -156,7 +161,7 @@ export default {
if (resData.code == 0 && resData.result) { if (resData.code == 0 && resData.result) {
const { friendSettingId, friendSettingType } = resData.result; const { friendSettingId, friendSettingType } = resData.result;
this.friendSettingId = friendSettingId; this.friendSettingId = friendSettingId;
this.type = friendSettingType ? friendSettingType : 2; this.type = friendSettingType ? friendSettingType : 1;
this.friendSettingType = friendSettingType; this.friendSettingType = friendSettingType;
} }
}); });
...@@ -186,7 +191,7 @@ export default { ...@@ -186,7 +191,7 @@ export default {
* 跳转 * 跳转
*/ */
changeRoute(row) { changeRoute(row) {
this.$router.push({ path: '/salutatorySet', query: { id: row.welcomeId, type: this.friendSettingType } }); this.$router.push({ path: '/salutatorySet', query: { id: row.welcomeId, type: this.friendSettingType, isDefalut: row.defaultWelcomeFlag } });
}, },
remove(row) { remove(row) {
this.$confirm(' 是否删除本条欢迎语?', '提示', { this.$confirm(' 是否删除本条欢迎语?', '提示', {
......
...@@ -60,6 +60,13 @@ ...@@ -60,6 +60,13 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="使用范围" required> <el-form-item label="使用范围" required>
<div v-if="isDefalut" class="scopeContainer">
<div class="wwTag">
<span class="font-14 color-2f54eb opacity80 iconfont-hb3 iconqiye-tianchong"></span>
全体成员
</div>
</div>
<div v-else>
<div v-show="form.suitDepartmentAddList.length" class="scopeContainer"> <div v-show="form.suitDepartmentAddList.length" class="scopeContainer">
<div class="wwTag" v-for="item in form.suitDepartmentAddList" :key="item.departmentId"> <div class="wwTag" v-for="item in form.suitDepartmentAddList" :key="item.departmentId">
<span class="font-14 color-2f54eb opacity80 iconfont-hb3 iconqiye-tianchong"></span> <span class="font-14 color-2f54eb opacity80 iconfont-hb3 iconqiye-tianchong"></span>
...@@ -68,6 +75,7 @@ ...@@ -68,6 +75,7 @@
</div> </div>
</div> </div>
<span @click="openScopeDialog" class="color-2f54eb cursor-pointer" style="margin-left:8px;"> {{ form.suitDepartmentAddList.length ? '修改使用范围' : '请选择使用范围' }}</span> <span @click="openScopeDialog" class="color-2f54eb cursor-pointer" style="margin-left:8px;"> {{ form.suitDepartmentAddList.length ? '修改使用范围' : '请选择使用范围' }}</span>
</div>
</el-form-item> </el-form-item>
<el-button type="primary" style="margin-left:117px;margin-bottom:20px" :loading="submitbtnLoading" @click="submit">保存</el-button> <el-button type="primary" style="margin-left:117px;margin-bottom:20px" :loading="submitbtnLoading" @click="submit">保存</el-button>
<el-button style="margin-bottom:20px" @click="$router.go(-1)">返回</el-button> <el-button style="margin-bottom:20px" @click="$router.go(-1)">返回</el-button>
...@@ -243,7 +251,8 @@ export default { ...@@ -243,7 +251,8 @@ export default {
submitbtnLoading: false, submitbtnLoading: false,
selectedTreeData: [], selectedTreeData: [],
friendSettingType: '', friendSettingType: '',
showTree: true showTree: true,
isDefalut: 0
}; };
}, },
watch: { watch: {
...@@ -270,7 +279,7 @@ export default { ...@@ -270,7 +279,7 @@ export default {
const that = this; const that = this;
that.$emit('showTab', 4); that.$emit('showTab', 4);
document.documentElement.style.backgroundColor = '#f0f2f5'; document.documentElement.style.backgroundColor = '#f0f2f5';
const { id, type } = this.$route.query; const { id, type, isDefalut } = this.$route.query;
if (id) { if (id) {
that.getData(); that.getData();
} }
...@@ -278,6 +287,7 @@ export default { ...@@ -278,6 +287,7 @@ export default {
this.friendSettingType = type; this.friendSettingType = type;
this.getAppData(); this.getAppData();
} }
this.isDefalut = isDefalut;
}, },
destroyed() { destroyed() {
document.documentElement.style.backgroundColor = '#fff'; document.documentElement.style.backgroundColor = '#fff';
...@@ -588,7 +598,7 @@ export default { ...@@ -588,7 +598,7 @@ export default {
}); });
}, },
submit() { submit() {
if (!this.form.suitDepartmentAddList.length) { if (!this.isDefalut && !this.form.suitDepartmentAddList.length) {
this.$message.error('请选择使用范围'); this.$message.error('请选择使用范围');
return; return;
} }
......
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