Commit 996f1223 by 张立顺

fix 样式修复

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