Commit 58e60025 by test

bug fixed

1 parent 2890412a
...@@ -168,11 +168,11 @@ ...@@ -168,11 +168,11 @@
// console.log(data, checked, indeterminate); // console.log(data, checked, indeterminate);
this.userList = this.unique(this.userList) this.userList = this.unique(this.userList)
}, },
unique(arr){ unique (arr) {
for(var i=0; i<arr.length; i++){ for (var i = 0; i < arr.length; i++) {
for(var j=i+1; j<arr.length; j++){ for (var j = i + 1; j < arr.length; j++) {
if(arr[i].userId.split('_')[0] == arr[j].userId.split('_')[0]){ if (arr[i].userId.split('_')[0] == arr[j].userId.split('_')[0]) {
arr.splice(j,1); arr.splice(j, 1);
j--; j--;
} }
} }
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12" :xs="24"> <el-col :span="12" :xs="24">
<div class="head-container"> <div class="head-container">
<el-tree node-key="userId" ref="tree" lazy accordion show-checkbox :check-on-click-node="false" :expand-on-click-node="true" :default-checked-keys="defaultCheckedKeys" :load="loadNode" :props="defaultProps" :check-strictly="!isOnlyLeaf" @check-change="handleCheckChange"></el-tree> <el-tree node-key="userId" ref="tree" lazy accordion show-checkbox :check-on-click-node="false" :expand-on-click-node="true" :default-checked-keys="defaultCheckedKeys" :load="loadNode" :props="defaultProps" :check-strictly="isOnlyLeaf" @check-change="handleCheckChange"></el-tree>
</div> </div>
</el-col> </el-col>
<el-col :span="12" :xs="24" class="user-list"> <el-col :span="12" :xs="24" class="user-list">
......
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
showMore () { showMore () {
let exit = true let exit = true
if (this.isSingle) { if (this.isSingle) {
if (this.form.materialMsgList.length === 3) { if (this.form.materialMsgList.length === 1) {
exit = false exit = false
} }
} }
...@@ -316,12 +316,12 @@ ...@@ -316,12 +316,12 @@
if (val) { if (val) {
const textIndex = $textarea.selectionStart const textIndex = $textarea.selectionStart
if (textIndex == 0 && document.activeElement != $textarea) { if (textIndex == 0 && document.activeElement != $textarea) {
this.form.welcomeMsg += '#客户昵称#' this.form.welcomeMsg += '%客户昵称%'
} else { } else {
this.form.welcomeMsg = msg.slice(0, textIndex) + '#客户昵称#' + msg.slice(textIndex) this.form.welcomeMsg = msg.slice(0, textIndex) + '%客户昵称%' + msg.slice(textIndex)
} }
} else { } else {
this.form.welcomeMsg = msg.replace(/\#客户昵称\#/, '') this.form.welcomeMsg = msg.replace(/\%客户昵称\%/, '')
} }
}, },
onChooseMaterial (materialType, rowIndex) { onChooseMaterial (materialType, rowIndex) {
......
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
</SelectTag> </SelectTag>
<!-- 选择使用员工弹窗 --> <!-- 选择使用员工弹窗 -->
<SelectUser :key="codeForm.qrType" :defaultValues="selectedUserList" :visible.sync="dialogVisibleSelectUser" title="选择使用员工" :isOnlyLeaf="codeForm.qrType !== 2" :isSigleSelect="codeForm.qrType == 1" @success="selectedUser"></SelectUser> <SelectUser :key="codeForm.qrType" :defaultValues="selectedUserList" :visible.sync="dialogVisibleSelectUser" title="选择使用员工" :isOnlyLeaf="true" :isSigleSelect="codeForm.qrType == 1" @success="selectedUser"></SelectUser>
</div> </div>
</template> </template>
......
...@@ -210,6 +210,9 @@ ...@@ -210,6 +210,9 @@
} }
}) })
this.$forceUpdate() this.$forceUpdate()
if (this.form.otherContent.length) {
this.form.contentType = 'text'
}
if (goto) { if (goto) {
gotoPublish(this.form).then(res => { gotoPublish(this.form).then(res => {
if (res.code === 200) { if (res.code === 200) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!