Commit 4dd7dc99 by 王志慧

Merge branch 'yc_v1.0.0' of http://192.168.3.233:8090/saas/scrm-micro-charge into yc_v1.0.0

2 parents 93a3599e 91d28bbd
......@@ -30,3 +30,7 @@ html {
// align-items: center;
}
.message-class{
z-index: 5000 !important;
}
......@@ -20,7 +20,8 @@ let instance = null
Vue.use(ElementUI)
Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState }) {
const { response, request, sign, secret, sign_common, request_common, request_gpt, request_merchant, messageModel } = await fetchConfig(common)
const { response, request, sign, secret, sign_common, request_common, request_gpt, request_merchant, messageModel, commonData } = await fetchConfig(common)
Vue.prototype.$commonData = commonData
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
......
......@@ -14,13 +14,13 @@
<!-- 表格区域 开始 -->
<GLTable ref="radarRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="deviceStatus" slot-scope="scope">
<span class="status-class" :style="{ 'background-color': deviceStatusEnum[scope.scope.deviceStatus] }"></span>
<span>{{ scope.scope.deviceStatusStr }}</span>
</div>
<div slot="bindingStatus" slot-scope="scope">
<span class="status-class" :style="{ 'background-color': bindingStatusEnum[scope.scope.bindingStatus] }"></span>
<span>{{ scope.scope.bindingStatusStr }}</span>
</div>
<span class="status-class" :style="{ 'background-color': deviceStatusEnum[scope.scope.deviceStatus] }"></span>
<span>{{ scope.scope.deviceStatusStr }}</span>
</div>
<div slot="bindingStatus" slot-scope="scope">
<span class="status-class" :style="{ 'background-color': bindingStatusEnum[scope.scope.bindingStatus] }"></span>
<span>{{ scope.scope.bindingStatusStr }}</span>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
......@@ -39,7 +39,7 @@
</el-button>
<input type="file" style="opacity: 0" ref="file" accept="*" @change="uploadFile" />
</div>
<a href="https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/导入设备.xlsx" target="_blank">下载模板</a>
<a :href="tempUrl" target="_blank">下载模板</a>
</div>
</el-form-item>
<div class="tip">支持扩展名:xlsx、xls、csv</div>
......@@ -73,6 +73,7 @@ export default {
data() {
return {
size: 'small',
tempUrl: this.$commonData.radarTmplUrl,
url: url,
batchForm: {
isUpload: false,
......@@ -163,12 +164,12 @@ export default {
{
label: '设备状态',
prop: 'deviceStatusStr',
addHtml: 'deviceStatus',
addHtml: 'deviceStatus'
},
{
label: '绑定关系',
prop: 'bindingStatusStr',
addHtml: 'bindingStatus',
addHtml: 'bindingStatus'
},
{
label: '入库时间',
......@@ -204,8 +205,8 @@ export default {
}
]
},
deviceStatusEnum:['#999999','#2CCA74','#EB4E4E'],
bindingStatusEnum:['#999999','#2CCA74']
deviceStatusEnum: ['#999999', '#2CCA74', '#EB4E4E'],
bindingStatusEnum: ['#999999', '#2CCA74']
}
},
......@@ -229,7 +230,8 @@ export default {
this.$apis[apiModule][apiName](apiParams).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
type: res.code == '0' ? 'success' : 'error',
customClass: 'message-class'
})
if (res.code == '0') {
fn && fn()
......@@ -248,7 +250,11 @@ export default {
this.handleImport()
return
} else if (!this.batchForm.exportUrl) {
this.$message.error('请上传文件')
this.$message({
message: '请上传图片',
type: 'error',
customClass: 'message-class'
})
return
}
let params = {
......@@ -260,7 +266,8 @@ export default {
.then(res => {
this.$message({
message: res.code == '0' ? '导入成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
type: res.code == '0' ? 'success' : 'error',
customClass: 'message-class'
})
if (res.code == 0) {
this.batchForm.isUpload = true
......@@ -270,7 +277,8 @@ export default {
} else {
this.$message({
message: res.message,
type: 'error'
type: 'error',
customClass: 'message-class'
})
}
})
......@@ -283,7 +291,11 @@ export default {
let AllImgExt = '.xls|.xlsx'
let extName = file.name.substring(file.name.lastIndexOf('.')).toLowerCase()
if (AllImgExt.indexOf(extName) === -1) {
this.$message.error('上传格式不正确')
this.$message({
message: '上传格式不正确',
type: 'error',
customClass: 'message-class'
})
return false
}
const size = file.size / 1024 / 1024
......@@ -314,7 +326,8 @@ export default {
} else {
this.$message({
message: '暂无错误数据',
type: 'error'
type: 'error',
customClass: 'message-class'
})
}
},
......@@ -513,12 +526,12 @@ export default {
}
}
.status-class {
display: inline-block;
margin-right: 8px;
width: 6px;
height: 6px;
background: #eb4e4e;
border-radius: 4px;
vertical-align: middle;
}
display: inline-block;
margin-right: 8px;
width: 6px;
height: 6px;
background: #eb4e4e;
border-radius: 4px;
vertical-align: middle;
}
</style>
......@@ -61,7 +61,7 @@
</el-button>
<input type="file" style="opacity: 0" ref="file" accept="*" @change="uploadFile" />
</div>
<a href="https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/红包链接.xlsx" target="_blank">下载模板</a>
<a :href="tempUrl" target="_blank">下载模板</a>
</div>
</el-form-item>
<div class="tip">支持扩展名:xlsx、xls</div>
......@@ -131,6 +131,7 @@ export default {
},
data() {
return {
tempUrl: this.$commonData.tmplUrl,
parkingPlaceVisible: false,
uploadVisible: false,
isBatch: false,
......@@ -436,7 +437,11 @@ export default {
this.handleExportError()
return
} else if (!this.batchForm.exportUrl) {
return this.$message.error('请上传文件')
return this.$message({
message: '请上传文件',
type: 'error',
customClass: 'message-class'
})
}
let params = {
exportUrl: this.batchForm.exportUrl,
......@@ -448,7 +453,8 @@ export default {
console.log(res, 'exporres')
this.$message({
message: res.code == '0' ? '导入成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
type: res.code == '0' ? 'success' : 'error',
customClass: 'message-class'
})
if (res.code == 0) {
const data = res?.data || {}
......@@ -459,7 +465,8 @@ export default {
} else {
this.$message({
message: res.message,
type: 'error'
type: 'error',
customClass: 'message-class'
})
}
})
......@@ -472,7 +479,11 @@ export default {
let AllImgExt = '.xls|.xlsx'
let extName = file.name.substring(file.name.lastIndexOf('.')).toLowerCase()
if (AllImgExt.indexOf(extName) === -1) {
this.$message.error('上传格式不正确')
this.$message({
message: '上传格式不正确',
type: 'error',
customClass: 'message-class'
})
return false
}
const size = file.size / 1024 / 1024
......@@ -504,7 +515,8 @@ export default {
} else {
this.$message({
message: '暂无错误数据',
type: 'error'
type: 'error',
customClass: 'message-class'
})
}
},
......@@ -526,11 +538,11 @@ export default {
this.isBatch = true
},
//车位标记
sign(row){
this.$router.push({
path:'/parkingPlace/sign',
query:row
})
sign(row) {
this.$router.push({
path: '/parkingPlace/sign',
query: row
})
},
openUploadDialog(row) {
this.curId = row.id
......@@ -560,7 +572,13 @@ export default {
picList.push(obj)
}
})
if (!picList?.length) return this.$message.error('请上传图片')
if (!picList?.length) {
return this.$message({
message: '请上传图片',
type: 'error',
customClass: 'message-class'
})
}
const params = {
id: this.curId,
chargeParkingSpaceImgDTOList: picList
......@@ -568,6 +586,7 @@ export default {
this.$apis.parkingSpace.saveParkingSpacePicApi(params).then(res => {
if (res) {
this.$message.success('操作成功')
this.searchTable()
this.uploadCancel()
}
})
......@@ -578,7 +597,7 @@ export default {
this.uploadList = JSON.parse(JSON.stringify(UPLOAD_LIST))
},
getMerchantList() {
this.$apis.parkingSpace.getMerchantListApi({ merchantId: '44209875' }).then(res => {
this.$apis.parkingSpace.getMerchantListApi({ merchantId: this.$commonData.merchantId }).then(res => {
if (res?.length) {
const target = this.searchFormList.find(item => item.name == 'merchantId')
target.optionList = [{ merchantName: '全部', merchantNo: '' }, ...res]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!