Commit bf803ed1 by 前端

Merge branch 'zq_dev_v2.5.0' into 'v2.5.0'

zq_dev_v2.5.0 定向礼包 --》v2.5.0

See merge request !212
2 parents 9e004246 859b14dc
...@@ -588,3 +588,13 @@ html { ...@@ -588,3 +588,13 @@ html {
.myMessage { .myMessage {
z-index: 4000 !important; z-index: 4000 !important;
} }
.loadingClass{
.el-icon-loading{
font-size: 22px;
}
.el-icon-loading,
.el-loading-text{
color: #5850ff!important;
}
}
\ No newline at end of file \ No newline at end of file
...@@ -609,7 +609,7 @@ export default { ...@@ -609,7 +609,7 @@ export default {
}) })
if (this.editForm.receiveRule == 1) { if (this.editForm.receiveRule == 1) {
params.receiveDetailList = this.phoneList.map(item => item.tel) params.receiveDetailList = this.phoneList.map(item => item.tel)
let maxLength = 250 let maxLength = 500
if(params.receiveDetailList && params.receiveDetailList.length > maxLength){ if(params.receiveDetailList && params.receiveDetailList.length > maxLength){
return this.$message.error(`领取${this.receiveWay == 1 ? '手机号' : '车架号'}不能超过${maxLength}个`) return this.$message.error(`领取${this.receiveWay == 1 ? '手机号' : '车架号'}不能超过${maxLength}个`)
} }
...@@ -651,9 +651,17 @@ export default { ...@@ -651,9 +651,17 @@ export default {
// 创建-更新接口 // 创建-更新接口
insertHttp(params) { insertHttp(params) {
// this.loading = true // this.loading = true
const loadingMoadl = this.$loading({
lock: true,
text: '正在Loading···',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)',
customClass:'loadingClass'
})
this.$apis.giftBag this.$apis.giftBag
.insertGiftApi(params) .insertGiftApi(params)
.then(res => { .then(res => {
loadingMoadl.close()
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
......
...@@ -22,6 +22,7 @@ export default { ...@@ -22,6 +22,7 @@ export default {
// 表格组件 // 表格组件
userInfo: {}, userInfo: {},
staffList: [], staffList: [],
selectList:[],
fnCallBack: false, fnCallBack: false,
url: url, url: url,
loading: true, loading: true,
...@@ -72,6 +73,8 @@ export default { ...@@ -72,6 +73,8 @@ export default {
mounted() { mounted() {
this.userInfo = this.$globalState.session this.userInfo = this.$globalState.session
this.selectList = JSON.parse(JSON.stringify(this.selectedStaffList))
this.selectList.map(item => item.userOneId = item.staffUUID)
this.getList({}, true) this.getList({}, true)
}, },
...@@ -93,21 +96,34 @@ export default { ...@@ -93,21 +96,34 @@ export default {
this.loading = false this.loading = false
this.fnCallBack = true this.fnCallBack = true
this.$refs.mutiProRef.tableTotal = res.count this.$refs.mutiProRef.tableTotal = res.count
this.$nextTick(()=>{
this.recoverySelected() this.recoverySelected()
})
this.$refs.mutiProRef.tableHeightValues = '50vh' this.$refs.mutiProRef.tableHeightValues = '50vh'
}) })
}, },
recoverySelected() { recoverySelected() {
this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].clearSelection()
if (this.selectedStaffList && this.selectedStaffList.length) { if (this.selectedStaffList && this.selectedStaffList.length) {
this.selectedStaffList.forEach(row => { this.selectedStaffList.forEach(row => {
row.userOneId = row.staffUUID row.userOneId = row.staffUUID
this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(row) this.$nextTick(()=>{
let idx = this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].data.findIndex(item=>item.userOneId==row.staffUUID)
if(idx>-1){
try{
this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].data[idx],true)
let id = this.selectList.findIndex(item=>item.staffUUID==row.staffUUID)
if(id>-1) this.selectList.splice(id, 1)
}catch(err){
console.log(err)
}
}
})
}) })
} }
}, },
handleMutiSelectConfirm() { handleMutiSelectConfirm() {
var selectedData = this.$refs.mutiProRef.mutiSelectArr[this.tableParams.mutiSelectName] var selectedData = [...this.$refs.mutiProRef.mutiSelectArr[this.tableParams.mutiSelectName],...this.selectList]
this.$emit('handleMutiSelectConfirm', selectedData) this.$emit('handleMutiSelectConfirm', selectedData)
}, },
handleMutiSelectClose() { handleMutiSelectClose() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!