Commit 996f1223 by 张立顺

fix 样式修复

1 parent 08967633
...@@ -572,6 +572,11 @@ export default { ...@@ -572,6 +572,11 @@ export default {
} }
} }
} }
.tag-img {
display: inline-block;
width: 14px;
height: 14px;
}
</style> </style>
<style> <style>
......
...@@ -68,57 +68,52 @@ ...@@ -68,57 +68,52 @@
<span>员工设置</span> <span>员工设置</span>
</div> </div>
<div class="main-box"> <div class="main-box">
<div <div class="cell">
v-show=" <div class="label">员工对象:</div>
formData.customerDataList.length != 0 && <div
formData.customerDataList.some( v-show="
(item) => item.labelList.length !== 0 formData.customerDataList.length != 0 &&
) formData.customerDataList.some(
" (item) => item.labelList.length !== 0
> )
<div class="customer-box m-t-10"> "
<div class="el-input-tag input-tag-wrapper"> >
<div class="customer-title"> <div class="customer-box m-t-10">
发送员工:预估 <div class="el-input-tag input-tag-wrapper">
<el-button <div class="customer-title">
type="text" 发送员工:预估
:loading="customerLoading" <el-button
@click="handlePopStaff" type="text"
> :loading="customerLoading"
<span v-if="!customerLoading">{{ @click="handlePopStaff"
estimatedNumberOfPeople
}}</span>
</el-button>
人
</div>
<div>
<div
v-for="(subItem, subIdx) in formData.customerDataList"
:key="subIdx"
>
<el-tag
v-for="(k, n) in subItem.labelList"
:key="n"
class="customer-tag"
size="small"
type="info"
:disable-transitions="false"
@close="handleDeleteCustomer(n, subIdx)"
> >
<span>{{ subItem.labelGroup.name }}:{{ k.name }}</span> <span v-if="!customerLoading">{{
</el-tag> estimatedNumberOfPeople
}}</span>
</el-button>
人
</div>
<div>
<div
v-for="(subItem, subIdx) in formData.customerDataList"
:key="subIdx"
>
<el-tag
v-for="(k, n) in subItem.labelList"
:key="n"
class="customer-tag"
size="small"
type="info"
:disable-transitions="false"
@close="handleDeleteCustomer(n, subIdx)"
>
<span>{{ subItem.labelGroup.name }}:{{ k.name }}</span>
</el-tag>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- <div class="m-t-10 screeningCustomers">
<el-button type="text" @click="handleSelectCustomer()"
>编辑</el-button
>
<el-button type="text" @click="handleResetCustomer()"
>重置</el-button
>
</div> -->
</div> </div>
</div> </div>
</div> </div>
...@@ -335,7 +330,7 @@ export default { ...@@ -335,7 +330,7 @@ export default {
3: "pdf" 3: "pdf"
} }
const sendTypeNameMap = { const sendTypeNameMap = {
1: "即时推送", 1: "立即发送",
2: "定时推送" 2: "定时推送"
} }
res.contentTypeName = typeNameMap[res.contentType] res.contentTypeName = typeNameMap[res.contentType]
...@@ -363,16 +358,15 @@ export default { ...@@ -363,16 +358,15 @@ export default {
// res.detailInfos // res.detailInfos
} }
} else if (key == "sendTime") { } else if (key == "sendTime") {
// debugger if (res.sendType == "立即发送") {
this.formData.sendTime = Util.dateFormate( this.TimeListData.splice(1, 1)
res.sendTime, } else {
"YYYY-MM-DD HH:mm:ss" this.formData.sendTime = Util.dateFormate(
) res.sendTime,
"YYYY-MM-DD HH:mm:ss"
)
}
} else { } else {
// if (key == "content") {
// // this.currentDate = new Date(res[key])
// console.log(res[key])
// }
this.formData[key] = res[key] this.formData[key] = res[key]
} }
} }
......
...@@ -4,29 +4,21 @@ ...@@ -4,29 +4,21 @@
<!-- class="order-detail" --> <!-- class="order-detail" -->
<d2-container> <d2-container>
<!-- <div class="offline-account"> --> <!-- <div class="offline-account"> -->
<div class="header" <div class="header" slot="header" style="padding: 10px 20px">
slot="header"
style="padding: 10px 20px;">
<h3>{{ title }}</h3> <h3>{{ title }}</h3>
<d2-search ref="showSearch" <d2-search
class="show-search" ref="showSearch"
:search-form="searchForm" class="show-search"
:label-width="labelWidth" :search-form="searchForm"
:form-data="showFormData" /> :label-width="labelWidth"
:form-data="showFormData"
/>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" <el-button @click="handleSearch" size="small" type="primary">
size="small"
type="primary">
查询 查询
</el-button> </el-button>
<el-button size="small" <el-button size="small" @click="handleReset"> 重置 </el-button>
@click="handleReset"> <el-button size="small" @click="handleRecord"> 返回 </el-button>
重置
</el-button>
<el-button size="small"
@click="handleRecord">
返回
</el-button>
</div> </div>
</div> </div>
<!-- </d2-container> <!-- </d2-container>
...@@ -35,11 +27,13 @@ ...@@ -35,11 +27,13 @@
<d2-table-header> <d2-table-header>
<auth-button category="Button" /> <auth-button category="Button" />
</d2-table-header> </d2-table-header>
<d2-table ref="recordTable" <d2-table
:get-list-api="getListApi" ref="recordTable"
:search-form="searchFormSearch" :get-list-api="getListApi"
:table-params="tableParams" :search-form="searchFormSearch"
:before-search-fn="beforeSearchFn"> :table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
</d2-table> </d2-table>
</div> </div>
</d2-container> </d2-container>
...@@ -47,81 +41,93 @@ ...@@ -47,81 +41,93 @@
</template> </template>
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from "@/common/util"
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from "vuex"
import { import { getStatisticPage } from "@api/contentManager"
getStatisticPage
} from "@api/contentManager"
export default { export default {
name: 'StatisticPage', name: "StatisticPage",
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
labelWidth: '100px', labelWidth: "100px",
searchForm: { searchForm: {
staffName: '', staffName: "",
phoneNumber: '', phoneNumber: "",
lookDate: '' lookDate: ""
}, },
searchFormSearch: {}, searchFormSearch: {},
showFormData: [{ showFormData: [
label: '员工姓名', {
name: 'staffName', label: "员工姓名",
type: 'input', name: "staffName",
maxlength: '20', type: "input",
isClear: true maxlength: "20",
}, { isClear: true
label: '手机号', },
name: 'phoneNumber', {
type: 'input', label: "手机号",
inputType: "number", name: "phoneNumber",
maxlength: '11', type: "input",
isClear: true inputType: "number",
}, { maxlength: "11",
label: '查看时间', isClear: true
name: 'lookDate', },
type: 'datePicker', {
isClear: true, label: "查看时间",
pickerOptions: 'rangePickerOptions' name: "lookDate",
}], type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
}
],
getListApi: getStatisticPage, getListApi: getStatisticPage,
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: "list",
tableOption: false, tableOption: false,
tableColumns: [{ tableColumns: [
label: '员工姓名', {
prop: 'staffName' label: "员工姓名",
// width: '200px' prop: "staffName"
}, { // width: '200px'
label: '员工手机号', },
prop: 'phoneNumber', {
width: '150px' label: "员工手机号",
}, { prop: "phoneNumber"
label: '发送时间', // width: '150px'
prop: 'sendTime', },
width: '150px', {
formatter: (cellValue) => { label: "发送时间",
return cellValue.sendTime ? Util.dateFormate(cellValue.sendTime, 'YYYY-MM-DD HH:mm:ss') : '--' prop: "sendTime",
// width: '150px',
formatter: (cellValue) => {
return cellValue.sendTime
? Util.dateFormate(cellValue.sendTime, "YYYY-MM-DD HH:mm:ss")
: "--"
}
},
{
label: "首次查看时间",
prop: "firstViewTime",
// width: '150px',
formatter: (cellValue) => {
return cellValue.firstViewTime
? Util.dateFormate(
cellValue.firstViewTime,
"YYYY-MM-DD HH:mm:ss"
)
: "--"
}
},
{
label: "总浏览时长",
prop: "totalViewTime"
// width: '100px'
} }
}, {
label: '首次查看时间',
prop: 'firstViewTime',
width: '150px',
formatter: (cellValue) => {
return cellValue.firstViewTime ? Util.dateFormate(cellValue.firstViewTime, 'YYYY-MM-DD HH:mm:ss') : '--'
}
}, {
label: '总浏览时长',
prop: 'totalViewTime',
width: '100px'
}
] ]
}, },
baseData: { baseData: {},
title: ""
},
title: ''
} }
}, },
computed: { computed: {
...@@ -136,21 +142,27 @@ export default { ...@@ -136,21 +142,27 @@ export default {
methods: { methods: {
...mapActions({ ...mapActions({
get: 'd2admin/base/get', get: "d2admin/base/get",
close: 'd2admin/page/close' close: "d2admin/page/close"
}), }),
...mapActions('d2admin/user', ['actionSetDownloadList']), ...mapActions("d2admin/user", ["actionSetDownloadList"]),
async getBaseData() { async getBaseData() {
this.getOptionsList() this.getOptionsList()
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.lookDate) { if (this.searchFormSearch.lookDate) {
this.searchFormSearch.startDate = Util.dateFormate(this.searchFormSearch.lookDate[0], 'YYYY-MM-DD') this.searchFormSearch.startDate = Util.dateFormate(
this.searchFormSearch.endDate = Util.dateFormate(this.searchFormSearch.lookDate[1], 'YYYY-MM-DD') this.searchFormSearch.lookDate[0],
"YYYY-MM-DD"
)
this.searchFormSearch.endDate = Util.dateFormate(
this.searchFormSearch.lookDate[1],
"YYYY-MM-DD"
)
delete this.searchFormSearch.lookDate delete this.searchFormSearch.lookDate
} }
this.searchFormSearch.taskId = this.$route.query.id this.searchFormSearch.taskId = this.$route.query.id
...@@ -160,14 +172,23 @@ export default { ...@@ -160,14 +172,23 @@ export default {
getOptionsList() { getOptionsList() {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === 'select') { if (item.type === "select") {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') { if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
) {
const temp = {} const temp = {}
temp[this.showFormData[index].optionId] = '' temp[this.showFormData[index].optionId] = ""
temp[this.showFormData[index].optionLabel] = '全部' temp[this.showFormData[index].optionLabel] = "全部"
this.baseData[item.optionsName].unshift(temp) this.baseData[item.optionsName].unshift(temp)
} }
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName]) this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
} }
}) })
}, },
...@@ -177,9 +198,9 @@ export default { ...@@ -177,9 +198,9 @@ export default {
}, },
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
staffName: '', staffName: "",
phoneNumber: '', phoneNumber: "",
lookDate: '' lookDate: ""
} }
this.$refs.recordTable.refreshTable(false, true) this.$refs.recordTable.refreshTable(false, true)
}, },
...@@ -188,30 +209,34 @@ export default { ...@@ -188,30 +209,34 @@ export default {
var params = this.searchFormSearch var params = this.searchFormSearch
// 去除为null的值 // 去除为null的值
for (const key in params) { for (const key in params) {
if (params[key] === null || params[key] === '' || params[key].length == 0) { if (
params[key] === null ||
params[key] === "" ||
params[key].length == 0
) {
delete params[key] delete params[key]
} }
} }
// 内容管理统计信息导出 // 内容管理统计信息导出
params.method = 'dj.api.smartcarlife.contentManagerTask.statistic.export.async' params.method =
"dj.api.smartcarlife.contentManagerTask.statistic.export.async"
const list = [ const list = [
...this.dowloadList, ...this.dowloadList,
{ {
name: '统计信息', name: "统计信息",
exportParam: JSON.stringify(params), exportParam: JSON.stringify(params),
status: 'waiting', status: "waiting",
timeid: new Date().getTime() timeid: new Date().getTime()
} }
] ]
this.actionSetDownloadList({ list, type: 'dowloadList' }) this.actionSetDownloadList({ list, type: "dowloadList" })
}, },
handleRecord() { handleRecord() {
this.$router.push({ name: 'staffMassSending' }) this.$router.push({ name: "staffMassSending" })
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
.count-txt { .count-txt {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!