Commit 2123885e by 张立顺

fix bug修复

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