Commit 2123885e by 张立顺

fix bug修复

1 parent 996f1223
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
placeholder="选择日期时间" placeholder="选择日期时间"
:picker-options="pickerOptions" :picker-options="pickerOptions"
format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"
default-time="" default-time="00:00:00"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
> >
</el-date-picker> </el-date-picker>
...@@ -231,7 +231,11 @@ ...@@ -231,7 +231,11 @@
</div> </div>
</div> </div>
<div style="margin-top: 40px; text-align: center"> <div style="margin-top: 40px; text-align: center">
<el-button type="primary" class="width_100" @click="checkValidData(1)" <el-button
type="primary"
class="width_100"
@click="checkValidData(1)"
:loading="$store.state.d2admin.loading.value"
>保存并使用</el-button >保存并使用</el-button
> >
<el-button <el-button
...@@ -240,6 +244,7 @@ ...@@ -240,6 +244,7 @@
class="width_100" class="width_100"
@click="checkValidData(0)" @click="checkValidData(0)"
v-if="!routeInfo.status" v-if="!routeInfo.status"
:loading="$store.state.d2admin.loading.value"
>存草稿</el-button >存草稿</el-button
> >
<el-button class="width_100 cancel-btn" @click="handleCancel" <el-button class="width_100 cancel-btn" @click="handleCancel"
...@@ -323,12 +328,20 @@ export default { ...@@ -323,12 +328,20 @@ export default {
disabledDate: (time) => { disabledDate: (time) => {
return time.getTime() < Date.now() - 8.64e7 return time.getTime() < Date.now() - 8.64e7
}, },
selectableRange: // selectableRange: this.getSelectableRange
new Date().getHours() + // () => {
":" + // const currentDate = new Date()
(new Date().getMinutes() + 1) + // currentDate.setMinutes(currentDate.getMinutes() + 30)
":00" + // console.log(currentDate.getHours(), currentDate.getMinutes())
" - 23:59:59" // return `${currentDate.getHours()}:${currentDate.getMinutes()}:${currentDate.getSeconds()} - 23:59:59`
// // new Date().getHours() + 1 + ":00:00 - 23:59:59"
// }
selectableRange: this.getSelectableRange()
// new Date().getHours() +
// ":" +
// (new Date().getMinutes() + 1) +
// ":00" +
// " - 23:59:59"
}, },
getList: getListLabelStaffPage, getList: getListLabelStaffPage,
getAccountMerchantList, getAccountMerchantList,
...@@ -505,6 +518,7 @@ export default { ...@@ -505,6 +518,7 @@ export default {
// 当选择的日期就是当天的时候,这个时候就要限制时间应当大于此时此刻的时分秒 // 当选择的日期就是当天的时候,这个时候就要限制时间应当大于此时此刻的时分秒
const currentDate = new Date() const currentDate = new Date()
currentDate.setMinutes(currentDate.getMinutes() + 30) currentDate.setMinutes(currentDate.getMinutes() + 30)
console.log(currentDate.getHours(), currentDate.getMinutes())
this.pickerOptions.selectableRange = `${currentDate.getHours()}:${currentDate.getMinutes()}:${currentDate.getSeconds()} - 23:59:59` this.pickerOptions.selectableRange = `${currentDate.getHours()}:${currentDate.getMinutes()}:${currentDate.getSeconds()} - 23:59:59`
} else { } else {
// 当选择的日期大于当天的时候,这时需要把时分秒的限制放开,否则不能选择 // 当选择的日期大于当天的时候,这时需要把时分秒的限制放开,否则不能选择
...@@ -551,9 +565,21 @@ export default { ...@@ -551,9 +565,21 @@ export default {
const { id } = this.$route.query const { id } = this.$route.query
this.routeInfo = this.$route.query this.routeInfo = this.$route.query
if (id) this.getDetail() if (id) this.getDetail()
// console.log(this.pickerOptions)
// console.log(this.getSelectableRange())
}, },
methods: { methods: {
getSelectableRange() {
const currentDate = new Date()
currentDate.setMinutes(currentDate.getMinutes() + 30)
return `${currentDate.getHours()}:${currentDate.getMinutes()}:00 - 23:59:59`
},
handleDeleteCustomer(idx, pIdx) {
this.formData.customerDataList[pIdx].labelList.splice(idx, 1)
this.customerLoading = true
this.getCustomerByTagList("filtrate")
},
handlePopStaff() { handlePopStaff() {
this.relateStoreVisible = true this.relateStoreVisible = true
}, },
...@@ -656,16 +682,16 @@ export default { ...@@ -656,16 +682,16 @@ export default {
} }
if (res.contentType == 2) { if (res.contentType == 2) {
// type = 2 是pdf,pdf的imageList数据结构为['url','url'] // type = 2 是pdf,pdf的imageList数据结构为['url','url']
this.formData[key] = [JSON.parse(res.content)] this.formData["imageList"] = [JSON.parse(res.content)]
// res.detailInfos?.map((item) => item.image) // res.detailInfos?.map((item) => item.image)
} }
if (res.contentType == 3) { if (res.contentType == 3) {
// type = 2 是pdf,pdf的imageList数据结构为[image: '',imageName: ''] // type = 2 是pdf,pdf的imageList数据结构为[image: '',imageName: '']
// let urlObj = JSON.parse(res.content) // let urlObj = JSON.parse(res.content)
this.formData[key] = JSON.parse(res.content) this.formData["imageList"] = JSON.parse(res.content)
// res.detailInfos // res.detailInfos
} }
} else if (key == "sendTime") { } else if (key == "sendTime" && res.sendTime) {
this.formData.sendTime = Util.dateFormate( this.formData.sendTime = Util.dateFormate(
res.sendTime, res.sendTime,
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD HH:mm:ss"
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
:data="selectingData" :data="selectingData"
class="table" class="table"
border border
v-loading="$store.state.d2admin.loading.value"
> >
<!-- @select="handleChange" <!-- @select="handleChange"
@select-all="handleAll" --> @select-all="handleAll" -->
......
...@@ -6,14 +6,18 @@ ...@@ -6,14 +6,18 @@
size="small" size="small"
icon="el-icon-puls" icon="el-icon-puls"
key="btn-i" key="btn-i"
@click="selectFile()">上传文件</el-button> :disabled="imageUrlArr.length"
@click="selectFile()"
>上传文件</el-button
>
<input <input
type="file" type="file"
ref="uploadImgRef" ref="uploadImgRef"
class="upload-img" class="upload-img"
style="opacity: 0; z-index: -1" style="opacity: 0; z-index: -1"
accept=".pdf" accept=".pdf"
@change="(e) => handleImgChange(e)" /> @change="(e) => handleImgChange(e)"
/>
</div> </div>
<template v-if="imageUrlArr && imageUrlArr.length > 0"> <template v-if="imageUrlArr && imageUrlArr.length > 0">
<div class="file-wrap" v-for="(item, index) in imageUrlArr" :key="index"> <div class="file-wrap" v-for="(item, index) in imageUrlArr" :key="index">
...@@ -26,14 +30,16 @@ ...@@ -26,14 +30,16 @@
class="process" class="process"
:style="{ :style="{
width: item.image ? '432px' : (compress * 432) / 100 + 'px' width: item.image ? '432px' : (compress * 432) / 100 + 'px'
}"></div> }"
></div>
</div> </div>
<img <img
v-if="item.image" v-if="item.image"
class="del-btn" class="del-btn"
:src="require('@/assets/icon-delete.png')" :src="require('@/assets/icon-delete.png')"
alt="" alt=""
@click="delFile(index)" /> @click="delFile(index)"
/>
</div> </div>
</template> </template>
</div> </div>
......
...@@ -201,7 +201,7 @@ export default { ...@@ -201,7 +201,7 @@ export default {
{ {
label: "封面:", label: "封面:",
type: "img", type: "img",
prop: "cover" prop: "coverImgUrl"
}, },
{ {
label: "副标题:", label: "副标题:",
...@@ -488,6 +488,7 @@ export default { ...@@ -488,6 +488,7 @@ export default {
font-size: 14px; font-size: 14px;
color: #1d1d1d; color: #1d1d1d;
width: 750px; width: 750px;
word-wrap: break-word;
} }
.imgBox { .imgBox {
width: 88px; width: 88px;
......
...@@ -5,7 +5,12 @@ ...@@ -5,7 +5,12 @@
<d2-container> <d2-container>
<!-- <div class="offline-account"> --> <!-- <div class="offline-account"> -->
<div class="header" slot="header" style="padding: 10px 20px"> <div class="header" slot="header" style="padding: 10px 20px">
<h3>{{ title }}</h3> <div class="header-bar">
<h3>{{ title }}</h3>
<div class="btn">
<el-button size="small" @click="handleRecord"> 返回 </el-button>
</div>
</div>
<d2-search <d2-search
ref="showSearch" ref="showSearch"
class="show-search" class="show-search"
...@@ -18,7 +23,6 @@ ...@@ -18,7 +23,6 @@
查询 查询
</el-button> </el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button> <el-button size="small" @click="handleReset"> 重置 </el-button>
<el-button size="small" @click="handleRecord"> 返回 </el-button>
</div> </div>
</div> </div>
<!-- </d2-container> <!-- </d2-container>
...@@ -121,8 +125,10 @@ export default { ...@@ -121,8 +125,10 @@ export default {
}, },
{ {
label: "总浏览时长", label: "总浏览时长",
prop: "totalViewTime" prop: "totalViewTime",
// width: '100px' formatter: (cellValue) => {
return cellValue.totalViewTime + "s"
}
} }
] ]
}, },
...@@ -238,7 +244,7 @@ export default { ...@@ -238,7 +244,7 @@ export default {
} }
} }
</script> </script>
<style scoped> <style scoped lang="scss">
.count-txt { .count-txt {
font-weight: 700; font-weight: 700;
color: #2a58ad; color: #2a58ad;
...@@ -250,4 +256,11 @@ export default { ...@@ -250,4 +256,11 @@ export default {
box-sizing: border-box; box-sizing: border-box;
margin-right: 10px; margin-right: 10px;
} }
.header-bar {
display: flex;
align-items: center;
.btn {
margin-left: 15px;
}
}
</style> </style>
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
btn-ok-label="确定" btn-ok-label="确定"
@confirmDialog="handleRelateStoreConfirm" @confirmDialog="handleRelateStoreConfirm"
@closeDialog="handleRelateStoreClose" @closeDialog="handleRelateStoreClose"
class="relateStore"> class="relateStore"
>
<slot /> <slot />
<el-row class="tableCon"> <el-row class="tableCon">
<div class="tableBox"> <div class="tableBox">
...@@ -17,8 +18,10 @@ ...@@ -17,8 +18,10 @@
height="464px" height="464px"
class="table" class="table"
border border
v-loading="$store.state.d2admin.loading.value"
@select="handleChange" @select="handleChange"
@select-all="handleAll"> @select-all="handleAll"
>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column prop="merchantName" label="门店名称" align="center"> <el-table-column prop="merchantName" label="门店名称" align="center">
</el-table-column> </el-table-column>
...@@ -34,13 +37,16 @@ ...@@ -34,13 +37,16 @@
:current-page.sync="pageNum" :current-page.sync="pageNum"
:page-size="pageSize" :page-size="pageSize"
layout="total, prev, pager, next" layout="total, prev, pager, next"
:total="total" /> :total="total"
/>
</div> </div>
<el-table <el-table
class="tableBox table" class="tableBox table"
:data="selectedData" :data="selectedData"
v-loading="loading"
border border
height="464px"> height="464px"
>
<el-table-column prop="merchantName" label="门店名称" align="center"> <el-table-column prop="merchantName" label="门店名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.merchantName }}</span> <span>{{ scope.row.merchantName }}</span>
...@@ -61,7 +67,8 @@ ...@@ -61,7 +67,8 @@
<el-button <el-button
class="el-icon-delete" class="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
type="text" /> type="text"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -113,7 +120,7 @@ export default { ...@@ -113,7 +120,7 @@ export default {
mounted() { mounted() {
this.selectedData = this.storeSelected this.selectedData = this.storeSelected
this.getSelectingList() this.getSelectingList()
console.log(this.selectedData, '---------') console.log(this.selectedData, "---------")
}, },
methods: { methods: {
...@@ -161,8 +168,8 @@ export default { ...@@ -161,8 +168,8 @@ export default {
addOrDelete addOrDelete
? this.selectedData.push(row) ? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter( : (this.selectedData = this.selectedData.filter(
(item) => item.staffUuid !== row.staffUuid (item) => item.staffUuid !== row.staffUuid
)) ))
}, },
handleAll(selection) { handleAll(selection) {
this.selectingData.forEach((item) => { this.selectingData.forEach((item) => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!