Commit 58e60025 by test

bug fixed

1 parent 2890412a
......@@ -168,14 +168,14 @@
// console.log(data, checked, indeterminate);
this.userList = this.unique(this.userList)
},
unique(arr){
for(var i=0; i<arr.length; i++){
for(var j=i+1; j<arr.length; j++){
if(arr[i].userId.split('_')[0] == arr[j].userId.split('_')[0]){
arr.splice(j,1);
j--;
}
unique (arr) {
for (var i = 0; i < arr.length; i++) {
for (var j = i + 1; j < arr.length; j++) {
if (arr[i].userId.split('_')[0] == arr[j].userId.split('_')[0]) {
arr.splice(j, 1);
j--;
}
}
}
return arr;
},
......@@ -200,7 +200,7 @@
<el-row :gutter="20">
<el-col :span="12" :xs="24">
<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>
</el-col>
<el-col :span="12" :xs="24" class="user-list">
......
......@@ -280,7 +280,7 @@
showMore () {
let exit = true
if (this.isSingle) {
if (this.form.materialMsgList.length === 3) {
if (this.form.materialMsgList.length === 1) {
exit = false
}
}
......@@ -316,12 +316,12 @@
if (val) {
const textIndex = $textarea.selectionStart
if (textIndex == 0 && document.activeElement != $textarea) {
this.form.welcomeMsg += '#客户昵称#'
this.form.welcomeMsg += '%客户昵称%'
} else {
this.form.welcomeMsg = msg.slice(0, textIndex) + '#客户昵称#' + msg.slice(textIndex)
this.form.welcomeMsg = msg.slice(0, textIndex) + '%客户昵称%' + msg.slice(textIndex)
}
} else {
this.form.welcomeMsg = msg.replace(/\#客户昵称\#/, '')
this.form.welcomeMsg = msg.replace(/\%客户昵称\%/, '')
}
},
onChooseMaterial (materialType, rowIndex) {
......
......@@ -138,7 +138,7 @@
</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>
</template>
......
......@@ -210,6 +210,9 @@
}
})
this.$forceUpdate()
if (this.form.otherContent.length) {
this.form.contentType = 'text'
}
if (goto) {
gotoPublish(this.form).then(res => {
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!