提交 380fd02f 作者: 毛细亚

更新代码

上级 51a18495
<template>
<div class="search-item">
<div class="date-picker-container">
<!-- 开始时间选择器 -->
<div class="date-picker-item rowFlex columnCenter">
<div class="picker-label">开始时间:</div>
<el-date-picker
v-model="startDate"
v-model="value1"
:disabled="disabled"
:style="{'width':width ||''}"
:type="type ? 'datetime' : 'date'"
:format="type ? 'yyyy-MM-dd HH:mm:ss' : 'yyyy-MM-dd'"
:value-format="type ? 'yyyy-MM-dd HH:mm:ss' : 'yyyy-MM-dd'"
:default-time="'00:00:00'"
placeholder="请选择开始时间"
:style="{'width': width || '100%'}"
type="datetimerange"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
:clearable="noClearable ? !noClearable : true"
@change="handleStartDateChange"
/>
</div>
<!-- 结束时间选择器 -->
<div class="date-picker-item rowFlex columnCenter">
<div class="picker-label">结束时间:</div>
<el-date-picker
v-model="endDate"
:style="{'width':width ||''}"
:disabled="disabled"
:type="type ? 'datetime' : 'date'"
:format="type ? 'yyyy-MM-dd HH:mm:ss' : 'yyyy-MM-dd'"
:value-format="type ? 'yyyy-MM-dd HH:mm:ss' : 'yyyy-MM-dd'"
:default-time="'23:59:59'"
placeholder="请选择结束时间"
:clearable="noClearable ? !noClearable : true"
@change="handleEndDateChange"
range-separator="~"
@change="handleDateChange"
/>
</div>
</div>
</div>
</template>
<script>
......@@ -44,8 +26,7 @@
props: [ 'width', 'defaultValue', 'type', 'noClearable', 'disabled'],
data() {
return {
startDate: '',
endDate: ''
value1: []
}
},
computed: {
......@@ -54,7 +35,9 @@
defaultValue: {
handler(newVal) {
console.log('defaultValue 变化:', newVal)
if (newVal && newVal.start_date !== undefined && newVal.end_date !== undefined) {
if (newVal && Array.isArray(newVal) && newVal.length === 2) {
this.setDateValues(newVal[0], newVal[1])
} else if (newVal && newVal.start_date !== undefined && newVal.end_date !== undefined) {
this.setDateValues(newVal.start_date, newVal.end_date)
} else {
this.setDateValues('', '')
......@@ -67,7 +50,9 @@
mounted() {
console.log('组件挂载,defaultValue:', this.defaultValue)
// 组件挂载时处理默认值
if (this.defaultValue && this.defaultValue.start_date !== undefined && this.defaultValue.end_date !== undefined) {
if (this.defaultValue && Array.isArray(this.defaultValue) && this.defaultValue.length === 2) {
this.setDateValues(this.defaultValue[0], this.defaultValue[1])
} else if (this.defaultValue && this.defaultValue.start_date !== undefined && this.defaultValue.end_date !== undefined) {
this.setDateValues(this.defaultValue.start_date, this.defaultValue.end_date)
}
},
......@@ -75,38 +60,38 @@
// 安全设置日期值的方法
setDateValues(startDate, endDate) {
this.$nextTick(() => {
this.startDate = startDate || ''
this.endDate = endDate || ''
if (startDate && endDate) {
this.value1 = [startDate, endDate]
} else {
this.value1 = []
}
// 强制更新组件
this.$forceUpdate()
})
},
// 处理开始时间变化
handleStartDateChange(value) {
console.log('开始时间变化:', value)
this.startDate = value
this.emitResult()
},
// 处理结束时间变化
handleEndDateChange(value) {
console.log('结束时间变化:', value)
this.endDate = value
// 处理日期范围变化
handleDateChange(value) {
console.log('日期范围变化:', value)
this.value1 = value || []
this.emitResult()
},
// 发出结果事件
emitResult() {
if(this.startDate === '' || this.endDate === ''){
if (!this.value1 || this.value1.length !== 2) {
this.$emit('result', [])
return
}
const [startDate, endDate] = this.value1
if (!startDate || !endDate) {
this.$message.warning('请选择开始时间和结束时间')
return false
}
console.log('发出结果:', { start_date: this.startDate, end_date: this.endDate })
this.$emit('result', {
start_date: this.startDate || '',
end_date: this.endDate || '',
})
console.log('发出结果:', [startDate, endDate])
this.$emit('result', [startDate, endDate])
},
// 保持原有的 selectChange 方法,用于兼容
......@@ -119,21 +104,6 @@
<style lang="scss" scoped>
.date-picker-container {
display: flex;
flex-direction: column;
gap: 12px;
width: 100%;
}
.date-picker-item {
width: 100%;
}
.picker-label {
font-size: 12px;
color: #666;
margin-bottom: 6px;
font-weight: 500;
min-width: 60px;
}
</style>
\ No newline at end of file
......@@ -21,7 +21,7 @@ import clickagain from './directive/clickagain'
import permission from '@/directive/permission/index.js' // 权限判断指令
Vue.use(globalComponent).use(permission).use(clickagain).use(loadmore)
if(isTest()){
new VConsole();
// new VConsole();
}
function isTest(){
return process.env.NODE_ENV !== 'production'
......
......@@ -598,10 +598,42 @@ li {
max-width: 300px;
z-index: 10000 !important;
}
/* ----------------- 修改日期选择框大小 --------------------*/
/* ----------------- 修复 Element UI 图标显示问题 --------------------*/
// 确保 Element UI 图标字体正确加载
.el-date-range-picker,.el-picker-panel__body,.el-date-range-picker__content{
width: 360px !important;
}
.el-picker-panel__body{
min-width: 320px !important;
}
.el-picker-panel__body{
display: flex;
flex-direction: column;
}
/* ----------------- 确定取消按钮 --------------------*/
.el-dialog {
.dialog-footer {
position: relative;
}
}
// 弹窗的按钮位置
.dialog-footer {
width: calc(100%);
position: absolute;
bottom: 0px;
right: 0;
padding-top: 20px;
padding-bottom: 20px;
padding-right: 20px;
border-top: 1px solid rgba(0, 0, 0, 0.06);
justify-content: flex-end;
overflow: hidden;
background: #fff;
z-index: 10;
.btn {
width: 84px;
height: 32px;
}
}
......@@ -40,7 +40,7 @@ export default {
padding-top: 10px;
background: #fff;
::v-deep .el-tabs{
height: calc(100% - 60px);
height: calc(100% - 40px);
}
::v-deep .el-tabs__content{
height: 100%;
......
......@@ -4,6 +4,7 @@
<span></span>
<el-button
type="primary"
size="small"
icon="el-icon-plus"
@click="showaddAreaTransfer = true,areaTransferItem = {}"
>新增转区申请</el-button>
......@@ -32,19 +33,12 @@
</el-select>
</el-form-item>
<el-form-item label="创建时间">
<BiDatePicker
v-model="create_time"
<selectDate
:default-value="dateValue"
:type="true"
:no-clearable="true"
style="width: 95%"
type="datetimerange"
format="yyyy-MM-dd HH:mm:ss"
:picker-option="pickerOptions"
value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']"
:clearable="false"
range-separator="~"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="createResult"
@result="createResult"
/>
</el-form-item>
</el-form>
......@@ -63,7 +57,7 @@
@click="terminaProcess(item, index)"
>
<div class="terminaItem rowFlex spaceBetween columnCenter">
<i :class=" item.showStep?'el-icon-down':'el-icon-right'"></i>
<!-- <i :class=" item.showStep?'el-icon-bottom':'el-icon-right'"></i> -->
<div class="terminaItemLeft">
<p><span class="label">新区角色:</span><span class="value">{{ item.role_name }}({{ item.server_name }})</span></p>
<p><span class="label">老区角色:</span><span class="value">{{ item.old_role_name }} ({{ item.old_server_name }}) </span></p>
......@@ -243,6 +237,7 @@ import { searchcondition, transfer_server_request_list, transfer_server_request_
import { mapState } from 'vuex'
import { removeDp, formatNumber, debounce } from '@/utils/index'
import AreaTransferDialog from './AreaTransferDialog.vue'
import selectDate from '@/components/selectDate.vue'
// 导入审批状态图标
import shenpi1 from '@/assets/icon/shenpi1.svg'
import shenpi2 from '@/assets/icon/shenpi2.svg'
......@@ -255,7 +250,8 @@ export default {
...mapState('user', ['userInfo'])
},
components: {
AreaTransferDialog
AreaTransferDialog,
selectDate
},
data() {
return {
......@@ -273,7 +269,7 @@ export default {
create_time_end: '',
approval_status: ''
},
create_time: [],
dateValue: [],
pageInfo: {
page: 1,
page_size: 20
......@@ -308,9 +304,12 @@ export default {
}
},
mounted() {
this.create_time = [this.$moment().subtract(6, 'days').format('YYYY-MM-DD HH:mm:ss'), this.$moment().format('YYYY-MM-DD HH:mm:ss')]
this.terminaForm.create_time_start = this.create_time[0]
this.terminaForm.create_time_end = this.create_time[1]
this.dateValue = [
this.$moment().subtract(6, 'days').format('YYYY-MM-DD HH:mm:ss'),
this.$moment().format('YYYY-MM-DD HH:mm:ss')
]
this.terminaForm.create_time_start = this.dateValue[0]
this.terminaForm.create_time_end = this.dateValue[1]
this.requstApprovalList()
this.filterChange()
},
......@@ -319,12 +318,14 @@ export default {
this.filterChange()
},
createResult: debounce(function (data) {
if (data) {
if (data && Array.isArray(data) && data.length === 2) {
this.terminaForm.create_time_start = data[0]
this.terminaForm.create_time_end = data[1]
this.dateValue = data
} else {
this.terminaForm.create_time_start = ''
this.terminaForm.create_time_end = ''
this.dateValue = []
}
this.filterChange()
}, 300),
......@@ -514,7 +515,7 @@ export default {
.mailListScroll {
width: 100%;
height: calc(100vh - 220px);
height: calc(100% - 190px);
overflow-y: auto;
overflow-x: hidden;
......
......@@ -2,7 +2,7 @@
<el-drawer
title="转区申请"
:visible.sync="dialogVisible"
size="520px"
size="320px"
:append-to-body="true"
@close="handleClose"
>
......@@ -205,10 +205,11 @@
</el-form>
<div class="dialog-footer rowFlex">
<el-button @click="handleClose">取 消</el-button>
<el-button @click="handleClose" size="small">取 消</el-button>
<el-button
type="primary"
:loading="loading"
size="small"
@click="handleSubmit"
>
提 交
......@@ -348,7 +349,7 @@ export default {
role_id: this.areaTransferItem.role_id,
old_role_id: this.areaTransferItem.old_role_id,
related_request_id: this.areaTransferItem.id,
transfer_type: this.areaTransferItem.transfer_type || 1,
transfer_type: Number(this.areaTransferItem.transfer_type || 1),
remark: this.areaTransferItem.remark || '',
main_game_id: Number(this.areaTransferItem.main_game_id),
weixin_blongs_id: Number(this.areaTransferItem.weixin_blongs_id)
......
......@@ -5,6 +5,7 @@
<el-button
type="primary"
icon="el-icon-plus"
size="small"
@click="(showaddAreaTransfer = true,areaTransferItem = {})"
>新增转端申请</el-button>
</div>
......@@ -32,19 +33,11 @@
</el-select>
</el-form-item>
<el-form-item label="创建时间">
<BiDatePicker
v-model="create_time"
<selectDate
:default-value="dateValue"
:type="true"
style="width: 95%"
type="datetimerange"
format="yyyy-MM-dd HH:mm:ss"
:picker-option="pickerOptions"
value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']"
:clearable="false"
range-separator="~"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="createResult"
@result="createResult"
/>
</el-form-item>
</el-form>
......@@ -251,6 +244,7 @@ import { searchcondition, member_trans_request_list, member_trans_request_proces
import { mapState } from 'vuex'
import { removeDp, formatNumber, debounce } from '@/utils/index'
import TerminalTransferDialog from './TerminalTransferDialog.vue'
import selectDate from '@/components/selectDate.vue'
// 导入审批状态图标
import shenpi1 from '@/assets/icon/shenpi1.svg'
import shenpi2 from '@/assets/icon/shenpi2.svg'
......@@ -265,7 +259,8 @@ export default {
},
components: {
TerminalTransferDialog,
noContent
noContent,
selectDate
},
data() {
return {
......@@ -283,7 +278,7 @@ export default {
create_time_end: '',
approval_status: ''
},
create_time: [],
dateValue: [],
pageInfo: {
page: 1,
page_size: 20
......@@ -318,9 +313,12 @@ export default {
}
},
mounted() {
this.create_time = [this.$moment().subtract(6, 'days').format('YYYY-MM-DD HH:mm:ss'), this.$moment().format('YYYY-MM-DD HH:mm:ss')]
this.terminaForm.create_time_start = this.create_time[0]
this.terminaForm.create_time_end = this.create_time[1]
this.dateValue = [
this.$moment().subtract(6, 'days').format('YYYY-MM-DD HH:mm:ss'),
this.$moment().format('YYYY-MM-DD HH:mm:ss')
]
this.terminaForm.create_time_start = this.dateValue[0]
this.terminaForm.create_time_end = this.dateValue[1]
this.requstApprovalList()
this.filterChange()
},
......@@ -333,12 +331,14 @@ export default {
this.areaTransferItem = item
},
createResult: debounce(function (data) {
if (data) {
if (data && Array.isArray(data) && data.length === 2) {
this.terminaForm.create_time_start = data[0]
this.terminaForm.create_time_end = data[1]
this.dateValue = data
} else {
this.terminaForm.create_time_start = ''
this.terminaForm.create_time_end = ''
this.dateValue = []
}
this.filterChange()
}, 300),
......@@ -528,7 +528,7 @@ export default {
.mailListScroll {
width: 100%;
height: calc(100vh - 240px);
height: calc(100% - 190px);
overflow-y: auto;
overflow-x: hidden;
......
......@@ -2,7 +2,7 @@
<el-drawer
title="转端申请"
:visible.sync="dialogVisible"
size="520px"
size="320px"
:append-to-body="true"
@close="handleClose"
>
......@@ -73,7 +73,7 @@
</el-select>
</el-form-item>
<!-- 机审规则 -->
<el-form-item label="机审规则">
<el-form-item label="机审规则" prop="rule_id">
<el-select
v-model="form.rule_id"
placeholder="请选择机审规则"
......@@ -121,10 +121,11 @@
</el-form>
<div class="dialog-footer rowFlex">
<el-button @click="handleClose">取 消</el-button>
<el-button @click="handleClose" size="small">取 消</el-button>
<el-button
type="primary"
:loading="loading"
size="small"
@click="handleSubmit"
>
提 交
......@@ -232,6 +233,8 @@ export default {
related_request_id: this.areaTransferItem.id,
rule_id: this.areaTransferItem.rule_id || ''
}
console.log(this.form,'this.form')
this.handleFlowChange()
} else {
// 新建模式
this.form = {
......
......@@ -27,7 +27,7 @@
<!-- 过滤条件 -->
<!-- 订单列表 -->
<div v-infinite-scroll="requestOrderList" :infinite-scroll-disabled="!isloadMore" class="orderDetailsScroll">
<div v-if="orderList.length>0">
<div v-if="orderList.length>0" class="orderDetailsScrollContent">
<div v-for="(item,index) in orderList" :key="index" class="orderDetails">
<div class="orderDetailsList">
<el-collapse v-model="collapseValue" @change="handleChange">
......@@ -453,6 +453,9 @@ export default {
height: calc(100% - 20px);
overflow: auto;
overflow-x: hidden;
.orderDetailsScrollContent{
margin-bottom: 50px;
}
}
.orderDetails{
width: 100%;
......
......@@ -202,7 +202,7 @@
order_time_start: '',
order_time_end: ''
},
searchDate: {},
searchDate: [],
gameUserInfo: {
recharge_total: 0,
today_amount: 0
......@@ -236,10 +236,10 @@
},
mounted() {
this.payTypeList()
this.searchDate = {
start_date: this.$moment().subtract(3, 'month').format('YYYY-MM-DD'),
end_date: this.$moment().format('YYYY-MM-DD')
}
this.searchDate = [
this.$moment().subtract(3, 'month').format('YYYY-MM-DD'),
this.$moment().format('YYYY-MM-DD')
]
this.timerData.order_time_start = this.$moment().subtract(3, 'month').format('YYYY-MM-DD')
this.timerData.order_time_end = this.$moment().format('YYYY-MM-DD')
},
......@@ -300,12 +300,14 @@
// this.gameMemberView()
},
dateResult(data) {
if (data) {
this.timerData.order_time_start = data.start_date
this.timerData.order_time_end = data.end_date
if (data && Array.isArray(data) && data.length === 2) {
this.timerData.order_time_start = data[0]
this.timerData.order_time_end = data[1]
this.searchDate = data
} else {
this.timerData.order_time_start = ''
this.timerData.order_time_end = ''
this.searchDate = []
}
this.pageInfo = {
page: 0,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论