|
@@ -1,13 +1,12 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <transition appear enter-active-class="animated fadeIn">
|
|
|
+ <div>
|
|
|
+ <transition appear enter-active-class="animated fadeIn">
|
|
|
<q-table
|
|
|
- class="my-sticky-header-table shadow-24"
|
|
|
+ class="my-sticky-header-column-table shadow-24"
|
|
|
:data="table_list"
|
|
|
row-key="id"
|
|
|
:separator="separator"
|
|
|
:loading="loading"
|
|
|
- :filter="filter"
|
|
|
:columns="columns"
|
|
|
hide-bottom
|
|
|
:pagination.sync="pagination"
|
|
@@ -17,116 +16,197 @@
|
|
|
flat
|
|
|
bordered
|
|
|
>
|
|
|
- <template v-slot:top>
|
|
|
- <q-btn-group push>
|
|
|
- <q-btn :label="$t('refresh')" icon="refresh" @click="reFresh()">
|
|
|
- <q-tooltip content-class="bg-amber text-black shadow-4" :offset="[10, 10]" content-style="font-size: 12px">
|
|
|
- {{ $t('refreshtip') }}
|
|
|
- </q-tooltip>
|
|
|
- </q-btn>
|
|
|
- </q-btn-group>
|
|
|
- <q-space />
|
|
|
- <q-input outlined rounded dense debounce="300" color="primary" v-model="filter" :placeholder="$t('search')" @input="getSearchList()" @keyup.enter="getSearchList()">
|
|
|
- <template v-slot:append>
|
|
|
- <q-icon name="search" @click="getSearchList()"/>
|
|
|
- </template>
|
|
|
- </q-input>
|
|
|
- </template>
|
|
|
- <template v-slot:body="props">
|
|
|
- <q-tr :props="props">
|
|
|
- <q-td key="asn_code" :props="props">
|
|
|
- {{ props.row.asn_code }}
|
|
|
- </q-td>
|
|
|
- <q-td key="goods_code" :props="props">
|
|
|
- {{ props.row.goods_code }}
|
|
|
- </q-td>
|
|
|
- <q-td key="goods_desc" :props="props">
|
|
|
- {{ props.row.goods_desc }}
|
|
|
- </q-td>
|
|
|
- <q-td key="goods_qty" :props="props">
|
|
|
- {{ props.row.goods_qty }}
|
|
|
- </q-td>
|
|
|
- <q-td key="goods_weight" :props="props">
|
|
|
- {{ props.row.goods_weight }}
|
|
|
- </q-td>
|
|
|
- <q-td key="goods_volume" :props="props">
|
|
|
- {{ props.row.goods_volume }}
|
|
|
- </q-td>
|
|
|
- <q-td key="supplier" :props="props">
|
|
|
- {{ props.row.supplier }}
|
|
|
- </q-td>
|
|
|
- <q-td key="creater" :props="props">
|
|
|
- {{ props.row.creater }}
|
|
|
- </q-td>
|
|
|
- <q-td key="create_time" :props="props">
|
|
|
- {{ props.row.create_time }}
|
|
|
- </q-td>
|
|
|
- <q-td key="update_time" :props="props">
|
|
|
- {{ props.row.update_time }}
|
|
|
- </q-td>
|
|
|
- </q-tr>
|
|
|
- </template>
|
|
|
+ <template v-slot:top>
|
|
|
+ <q-btn-group push>
|
|
|
+ <q-btn :label="$t('refresh')" icon="refresh" @click="reFresh()">
|
|
|
+ <q-tooltip
|
|
|
+ content-class="bg-amber text-black shadow-4"
|
|
|
+ :offset="[10, 10]"
|
|
|
+ content-style="font-size: 12px"
|
|
|
+ >{{ $t("refreshtip") }}</q-tooltip
|
|
|
+ >
|
|
|
+ </q-btn>
|
|
|
+ <!-- <q-btn :label="'日志'" icon="logout" @click="getlog()"> </q-btn> -->
|
|
|
+ </q-btn-group>
|
|
|
+
|
|
|
+ <q-space />
|
|
|
+
|
|
|
+ <div class="flex items-center">
|
|
|
+
|
|
|
+ <q-btn-group push class="q-ml-md"> </q-btn-group>
|
|
|
+ <q-input
|
|
|
+ outlined
|
|
|
+ rounded
|
|
|
+ dense
|
|
|
+ debounce="300"
|
|
|
+ color="primary"
|
|
|
+ v-model="filter"
|
|
|
+ :placeholder="$t('search')"
|
|
|
+ @input="getSearchList()"
|
|
|
+ @keyup.enter="getSearchList()"
|
|
|
+ >
|
|
|
+ <template v-slot:append>
|
|
|
+ <q-icon name="search" @click="getSearchList()" />
|
|
|
+ </template>
|
|
|
+ </q-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-slot:body="props">
|
|
|
+ <q-tr :props="props">
|
|
|
+ <q-td auto-width>
|
|
|
+ <q-btn
|
|
|
+ size="sm"
|
|
|
+ round
|
|
|
+ :icon="props.row.expand ? 'remove' : 'ballot'"
|
|
|
+ @click="handle_row_expand(props.row)"
|
|
|
+ />
|
|
|
+ </q-td>
|
|
|
+ <q-td
|
|
|
+ v-for="col in columns.filter((c) => c.name !== 'expand')"
|
|
|
+ :key="col.name"
|
|
|
+ :props="props"
|
|
|
+ >
|
|
|
+ {{ col.field ? props.row[col.field] : props.row[col.name] }}
|
|
|
+ </q-td>
|
|
|
+ </q-tr>
|
|
|
+
|
|
|
+ <!-- 第二级:时间轴 -->
|
|
|
+ <q-tr v-show="props.row.expand" :props="props" class="expanded-row">
|
|
|
+ <q-td colspan="100%">
|
|
|
+ <div class="q-pa-md timeline-wrapper">
|
|
|
+ <q-timeline
|
|
|
+ color="#e0e0e0"
|
|
|
+ v-if="props.row.batch_items?.length"
|
|
|
+ >
|
|
|
+ <q-timeline-entry
|
|
|
+ v-for="(batch_item, index) in props.row.batch_items"
|
|
|
+ :key="index"
|
|
|
+ class="custom-node"
|
|
|
+ >
|
|
|
+ <template v-slot:title>
|
|
|
+ <span>
|
|
|
+ <div>批次 {{ batch_item.batch_code }}</div>
|
|
|
+ <div class="row">
|
|
|
+ <div class="col">
|
|
|
+ <div class="custom-title">
|
|
|
+ {{ batch_item.goods_desc }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col">
|
|
|
+ <div class="custom-title">
|
|
|
+ 数量:{{ batch_item.goods_in_qty }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </q-timeline-entry>
|
|
|
+ </q-timeline>
|
|
|
+ <div v-else-if="props.row.loading" class="text-center q-pa-md">
|
|
|
+ <q-spinner color="primary" size="2em" />
|
|
|
+ <div class="q-mt-sm">正在加载信息...</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </q-td>
|
|
|
+ </q-tr>
|
|
|
+ </template>
|
|
|
</q-table>
|
|
|
- </transition>
|
|
|
- <template>
|
|
|
- <div v-show="max !== 0" class="q-pa-lg flex flex-center">
|
|
|
- <div>{{ total }} </div>
|
|
|
- <q-pagination
|
|
|
- v-model="current"
|
|
|
- color="black"
|
|
|
- :max="max"
|
|
|
- :max-pages="6"
|
|
|
- boundary-links
|
|
|
- @click="getList()"
|
|
|
+ </transition>
|
|
|
+ <template>
|
|
|
+ <div v-show="max !== 0" class="q-pa-lg flex flex-center">
|
|
|
+ <div>{{ total }}</div>
|
|
|
+ <q-pagination
|
|
|
+ v-model="current"
|
|
|
+ color="black"
|
|
|
+ :max="max"
|
|
|
+ :max-pages="6"
|
|
|
+ boundary-links
|
|
|
+ @click="
|
|
|
+ getSearchList(current);
|
|
|
+ paginationIpt = current;
|
|
|
+ "
|
|
|
+ />
|
|
|
+ <div>
|
|
|
+ <input
|
|
|
+ v-model="paginationIpt"
|
|
|
+ @blur="changePageEnter"
|
|
|
+ @keyup.enter="changePageEnter"
|
|
|
+ style="width: 60px; text-align: center"
|
|
|
/>
|
|
|
- <div>
|
|
|
- <input
|
|
|
- v-model="paginationIpt"
|
|
|
- @blur="changePageEnter"
|
|
|
- @keyup.enter="changePageEnter"
|
|
|
- style="width: 60px; text-align: center"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div v-show="max === 0" class="q-pa-lg flex flex-center">
|
|
|
- <q-btn flat push color="dark" :label="$t('no_data')"></q-btn>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
+ <div v-show="max === 0" class="q-pa-lg flex flex-center">
|
|
|
+ <q-btn flat push color="dark" :label="$t('no_data')"></q-btn>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
- <router-view />
|
|
|
+<router-view />
|
|
|
|
|
|
<script>
|
|
|
-import { getauth } from 'boot/axios_request'
|
|
|
+import { getauth, postauth, putauth, deleteauth } from 'boot/axios_request'
|
|
|
+import { date, LocalStorage } from 'quasar'
|
|
|
|
|
|
export default {
|
|
|
- name: 'Pageasndetail',
|
|
|
+ name: 'PageTask',
|
|
|
data () {
|
|
|
return {
|
|
|
+ createDate1: '',
|
|
|
+ createDate2: '',
|
|
|
+ date_range: '',
|
|
|
+ proxyDate: '',
|
|
|
+ date: '',
|
|
|
+ goods_code: '',
|
|
|
+ goods_desc: '',
|
|
|
openid: '',
|
|
|
login_name: '',
|
|
|
authin: '0',
|
|
|
- pathname: 'asn/detail/?asn_status=1',
|
|
|
+ searchUrl: '',
|
|
|
+ pathname: 'bound/batch/count/',
|
|
|
pathname_previous: '',
|
|
|
pathname_next: '',
|
|
|
separator: 'cell',
|
|
|
loading: false,
|
|
|
height: '',
|
|
|
+ viewForm: false,
|
|
|
+
|
|
|
table_list: [],
|
|
|
- bin_size_list: [],
|
|
|
- bin_property_list: [],
|
|
|
- warehouse_list: [],
|
|
|
columns: [
|
|
|
- { name: 'asn_code', required: true, label: this.$t('inbound.view_asn.asn_code'), align: 'left', field: 'asn_code' },
|
|
|
- { name: 'goods_code', label: this.$t('goods.view_goodslist.goods_code'), field: 'goods_code', align: 'center' },
|
|
|
- { name: 'goods_desc', label: this.$t('goods.view_goodslist.goods_desc'), field: 'goods_desc', align: 'center' },
|
|
|
- { name: 'goods_qty', label: this.$t('inbound.view_asn.goods_qty'), field: 'goods_qty', align: 'center' },
|
|
|
- { name: 'goods_weight', label: this.$t('inbound.view_asn.total_weight'), field: 'goods_weight', align: 'center' },
|
|
|
- { name: 'goods_volume', label: this.$t('inbound.view_asn.total_volume'), field: 'goods_volume', align: 'center' },
|
|
|
- { name: 'supplier', label: this.$t('baseinfo.view_supplier.supplier_name'), field: 'supplier', align: 'center' },
|
|
|
- { name: 'creater', label: this.$t('creater'), field: 'creater', align: 'center' },
|
|
|
- { name: 'create_time', label: this.$t('createtime'), field: 'create_time', align: 'center' },
|
|
|
- { name: 'update_time', label: this.$t('updatetime'), field: 'update_time', align: 'center' }
|
|
|
+ {
|
|
|
+ name: 'expand',
|
|
|
+ label: '',
|
|
|
+ align: 'left',
|
|
|
+ headerStyle: 'width: 50px'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ name: 'goods_code',
|
|
|
+ label: '存货编码',
|
|
|
+ field: 'goods_code',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'goods_desc',
|
|
|
+ label: '存货名称',
|
|
|
+ field: 'goods_desc',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ name: 'total_quantity',
|
|
|
+ label: '在库数目',
|
|
|
+ field: 'total_quantity',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'goods_unit',
|
|
|
+ label: '单位',
|
|
|
+ field: 'goods_unit',
|
|
|
+ align: 'center',
|
|
|
+ headerStyle: 'width: 20px'
|
|
|
+ }
|
|
|
],
|
|
|
filter: '',
|
|
|
pagination: {
|
|
@@ -136,135 +216,190 @@ export default {
|
|
|
current: 1,
|
|
|
max: 0,
|
|
|
total: 0,
|
|
|
- paginationIpt: 1
|
|
|
+ paginationIpt: 1,
|
|
|
+ containers: {},
|
|
|
+ timer: null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ interval () {
|
|
|
+ return (
|
|
|
+ this.$t('download_center.start') +
|
|
|
+ ' - ' +
|
|
|
+ this.$t('download_center.end')
|
|
|
+ )
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- getList () {
|
|
|
- var _this = this
|
|
|
- if (_this.$q.localStorage.has('auth')) {
|
|
|
- getauth(_this.pathname + '&page=' + '' + _this.current, {
|
|
|
- }).then(res => {
|
|
|
- _this.table_list = res.results
|
|
|
- _this.total = res.count
|
|
|
- if (res.count === 0) {
|
|
|
- _this.max = 0
|
|
|
- } else {
|
|
|
- if (Math.ceil(res.count / _this.pagination.rowsPerPage) === 1) {
|
|
|
- _this.max = 0
|
|
|
- } else {
|
|
|
- _this.max = Math.ceil(res.count / _this.pagination.rowsPerPage)
|
|
|
- }
|
|
|
- }
|
|
|
- _this.pathname_previous = res.previous
|
|
|
- _this.pathname_next = res.next
|
|
|
- }).catch(err => {
|
|
|
- _this.$q.notify({
|
|
|
- message: err.detail,
|
|
|
- icon: 'close',
|
|
|
- color: 'negative'
|
|
|
- })
|
|
|
- })
|
|
|
+ class_to_name (class_id) {
|
|
|
+ const class_map = {
|
|
|
+ 1: '整盘',
|
|
|
+ 2: '托盘组',
|
|
|
+ 3: '零盘'
|
|
|
}
|
|
|
+ return class_map[class_id]
|
|
|
},
|
|
|
- changePageEnter(e) {
|
|
|
- if (Number(this.paginationIpt) < 1) {
|
|
|
- this.current = 1;
|
|
|
- this.paginationIpt = 1;
|
|
|
- } else if (Number(this.paginationIpt) > this.max) {
|
|
|
- this.current = this.max;
|
|
|
- this.paginationIpt = this.max;
|
|
|
- } else {
|
|
|
- this.current = Number(this.paginationIpt);
|
|
|
+ handle_row_expand (row) {
|
|
|
+ const _this = this
|
|
|
+ row.expand = !row.expand
|
|
|
+ if (row.expand) {
|
|
|
+ // 添加行级 loading 状态
|
|
|
+ _this.$set(row, 'loading', true)
|
|
|
+ getauth('bound/batch/count/' + row.id + '/', {})
|
|
|
+ .then((res) => {
|
|
|
+ _this.$set(row, 'batch_items', res.batch_items)
|
|
|
+ console.log('当前的', row.batch_items)
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ _this.$q.notify({ message: err.detail, color: 'negative' })
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ row.loading = false // 关闭加载状态
|
|
|
+ })
|
|
|
}
|
|
|
- this.getList();
|
|
|
},
|
|
|
- getSearchList () {
|
|
|
+ getlog () {
|
|
|
+ // console.log(this.table_list)
|
|
|
+ console.log('当前loading状态:', this.loading)
|
|
|
+ },
|
|
|
+ getList (params = {}) {
|
|
|
var _this = this
|
|
|
- if (_this.$q.localStorage.has('auth')) {
|
|
|
- _this.current = 1
|
|
|
- _this.paginationIpt = 1
|
|
|
- getauth(_this.pathname + '&asn_code__icontains=' + _this.filter + '&page=' + '' + _this.current, {
|
|
|
- }).then(res => {
|
|
|
- _this.table_list = res.results
|
|
|
+ _this.loading = true
|
|
|
+ // 合并基础参数
|
|
|
+ const baseParams = {
|
|
|
+ page: _this.current,
|
|
|
+ page_size: _this.pagination.rowsPerPage
|
|
|
+ }
|
|
|
+
|
|
|
+ // 创建URLSearchParams处理参数
|
|
|
+ const queryParams = new URLSearchParams({
|
|
|
+ ...baseParams,
|
|
|
+ ...params
|
|
|
+ })
|
|
|
+ console.log(queryParams)
|
|
|
+ // 过滤空值参数
|
|
|
+ Array.from(queryParams.entries()).forEach(([key, value]) => {
|
|
|
+ if (value === '' || value === null || value === undefined) {
|
|
|
+ queryParams.delete(key)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ getauth(`${_this.pathname}?${queryParams}`)
|
|
|
+ .then((res) => {
|
|
|
+ _this.table_list = res.results.map((item) => ({
|
|
|
+ ...item,
|
|
|
+ expand: false,
|
|
|
+ batch_items: [
|
|
|
+
|
|
|
+ ],
|
|
|
+ loading: false
|
|
|
+ }))
|
|
|
_this.total = res.count
|
|
|
- if (res.count === 0) {
|
|
|
- _this.max = 0
|
|
|
- } else {
|
|
|
- if (Math.ceil(res.count / _this.pagination.rowsPerPage) === 1) {
|
|
|
- _this.max = 0
|
|
|
- } else {
|
|
|
- _this.max = Math.ceil(res.count / _this.pagination.rowsPerPage)
|
|
|
- }
|
|
|
- }
|
|
|
+ _this.max = Math.ceil(res.count / _this.pagination.rowsPerPage) || 0
|
|
|
_this.pathname_previous = res.previous
|
|
|
_this.pathname_next = res.next
|
|
|
- }).catch(err => {
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
_this.$q.notify({
|
|
|
message: err.detail,
|
|
|
icon: 'close',
|
|
|
color: 'negative'
|
|
|
})
|
|
|
})
|
|
|
+ .finally(() => {
|
|
|
+ _this.loading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ changePageEnter () {
|
|
|
+ if (Number(this.paginationIpt) < 1) {
|
|
|
+ this.current = 1
|
|
|
+ this.paginationIpt = 1
|
|
|
+ } else if (Number(this.paginationIpt) > this.max) {
|
|
|
+ this.current = this.max
|
|
|
+ this.paginationIpt = this.max
|
|
|
} else {
|
|
|
+ this.current = Number(this.paginationIpt)
|
|
|
}
|
|
|
+ this.getSearchList(this.current)
|
|
|
},
|
|
|
+
|
|
|
+ // 带搜索条件加载
|
|
|
+ getSearchList (page = 1) {
|
|
|
+ this.current = page
|
|
|
+ this.paginationIpt = page
|
|
|
+ this.getList({
|
|
|
+ goods_desc__icontains: this.filter,
|
|
|
+ create_time__range: this.date_range
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
getListPrevious () {
|
|
|
var _this = this
|
|
|
- if (_this.$q.localStorage.has('auth')) {
|
|
|
- getauth(_this.pathname_previous, {
|
|
|
- }).then(res => {
|
|
|
- _this.table_list = res.results
|
|
|
- _this.pathname_previous = res.previous
|
|
|
- _this.pathname_next = res.next
|
|
|
- }).catch(err => {
|
|
|
- _this.$q.notify({
|
|
|
- message: err.detail,
|
|
|
- icon: 'close',
|
|
|
- color: 'negative'
|
|
|
+ if (LocalStorage.has('auth')) {
|
|
|
+ getauth(_this.pathname_previous, {})
|
|
|
+ .then((res) => {
|
|
|
+ _this.table_list = res.results
|
|
|
+ _this.pathname_previous = res.previous
|
|
|
+ _this.pathname_next = res.next
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ _this.$q.notify({
|
|
|
+ message: err.detail,
|
|
|
+ icon: 'close',
|
|
|
+ color: 'negative'
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
} else {
|
|
|
}
|
|
|
},
|
|
|
getListNext () {
|
|
|
var _this = this
|
|
|
- if (_this.$q.localStorage.has('auth')) {
|
|
|
- getauth(_this.pathname_next, {
|
|
|
- }).then(res => {
|
|
|
- _this.table_list = res.results
|
|
|
- _this.pathname_previous = res.previous
|
|
|
- _this.pathname_next = res.next
|
|
|
- }).catch(err => {
|
|
|
- _this.$q.notify({
|
|
|
- message: err.detail,
|
|
|
- icon: 'close',
|
|
|
- color: 'negative'
|
|
|
+ if (LocalStorage.has('auth')) {
|
|
|
+ getauth(_this.pathname_next, {})
|
|
|
+ .then((res) => {
|
|
|
+ _this.table_list = res.results
|
|
|
+
|
|
|
+ _this.pathname_previous = res.previous
|
|
|
+ _this.pathname_next = res.next
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ _this.$q.notify({
|
|
|
+ message: err.detail,
|
|
|
+ icon: 'close',
|
|
|
+ color: 'negative'
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
- } else {
|
|
|
}
|
|
|
},
|
|
|
reFresh () {
|
|
|
var _this = this
|
|
|
- _this.getList()
|
|
|
+ _this.getSearchList()
|
|
|
+ },
|
|
|
+
|
|
|
+ updateProxy () {
|
|
|
+ var _this = this
|
|
|
+ _this.proxyDate = _this.date
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
var _this = this
|
|
|
- if (_this.$q.localStorage.has('openid')) {
|
|
|
- _this.openid = _this.$q.localStorage.getItem('openid')
|
|
|
+ if (LocalStorage.has('openid')) {
|
|
|
+ _this.openid = LocalStorage.getItem('openid')
|
|
|
} else {
|
|
|
_this.openid = ''
|
|
|
- _this.$q.localStorage.set('openid', '')
|
|
|
+ LocalStorage.set('openid', '')
|
|
|
}
|
|
|
- if (_this.$q.localStorage.has('login_name')) {
|
|
|
- _this.login_name = _this.$q.localStorage.getItem('login_name')
|
|
|
+ if (LocalStorage.has('login_name')) {
|
|
|
+ _this.login_name = LocalStorage.getItem('login_name')
|
|
|
} else {
|
|
|
_this.login_name = ''
|
|
|
- _this.$q.localStorage.set('login_name', '')
|
|
|
+ LocalStorage.set('login_name', '')
|
|
|
}
|
|
|
- if (_this.$q.localStorage.has('auth')) {
|
|
|
+ if (LocalStorage.has('auth')) {
|
|
|
+ const timeStamp = Date.now()
|
|
|
+ const formattedString = date.formatDate(timeStamp, 'YYYY/MM/DD')
|
|
|
+ _this.date = formattedString
|
|
|
+ console.log(_this.date)
|
|
|
_this.authin = '1'
|
|
|
_this.getList()
|
|
|
} else {
|
|
@@ -278,10 +413,76 @@ export default {
|
|
|
} else {
|
|
|
_this.height = _this.$q.screen.height - 290 + '' + 'px'
|
|
|
}
|
|
|
+ // _this.timer = setInterval(() => {
|
|
|
+ // _this.getlog()
|
|
|
+ // }, 1000)
|
|
|
},
|
|
|
- updated () {
|
|
|
- },
|
|
|
- destroyed () {
|
|
|
+ updated () {},
|
|
|
+ destroyed () {},
|
|
|
+ // 在 watch 或方法中添加调试代码
|
|
|
+ watch: {
|
|
|
+ createDate1 (val) {
|
|
|
+ if (val) {
|
|
|
+ if (val.to) {
|
|
|
+ this.createDate2 = `${val.from} - ${val.to}`
|
|
|
+ this.date_range = `${val.from},${val.to} `
|
|
|
+
|
|
|
+ // this.downloadhUrl = this.pathname + 'filelist/?' + 'document_date__range=' + this.date_range
|
|
|
+ } else {
|
|
|
+ this.createDate2 = `${val}`
|
|
|
+ this.dateArray = val.split('/')
|
|
|
+ this.searchUrl =
|
|
|
+ this.pathname +
|
|
|
+ '?' +
|
|
|
+ 'document_date__year=' +
|
|
|
+ this.dateArray[0] +
|
|
|
+ '&' +
|
|
|
+ 'document_date__month=' +
|
|
|
+ this.dateArray[1] +
|
|
|
+ '&' +
|
|
|
+ 'document_date__day=' +
|
|
|
+ this.dateArray[2]
|
|
|
+ // this.downloadhUrl = this.pathname + 'filelist/?' + 'document_date__year=' + this.dateArray[0] + '&' + 'document_date__month=' + this.dateArray[1] + '&' + 'document_date__day=' + this.dateArray[2]
|
|
|
+ }
|
|
|
+ this.date_range = this.date_range.replace(/\//g, '-')
|
|
|
+
|
|
|
+ this.getSearchList()
|
|
|
+ this.$refs.qDateProxy.hide()
|
|
|
+ } else {
|
|
|
+ this.createDate2 = ''
|
|
|
+ this.date_range = ''
|
|
|
+ this.getSearchList()
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
+<style scoped>
|
|
|
+/* 添加在 <style> 中 */
|
|
|
+.q-date__calendar-item--selected {
|
|
|
+ transition: all 0.3s ease;
|
|
|
+ background-color: #1976d2 !important;
|
|
|
+}
|
|
|
+
|
|
|
+.q-date__range {
|
|
|
+ background-color: rgba(25, 118, 210, 0.1);
|
|
|
+}
|
|
|
+
|
|
|
+.custom-title {
|
|
|
+ font-size: 0.9rem; /* 推荐使用相对单位 */
|
|
|
+ font-weight: 500;
|
|
|
+}
|
|
|
+/* 添加以下样式 */
|
|
|
+.custom-timeline {
|
|
|
+ --q-timeline-color: #e0e0e0; /* 覆盖时间轴线颜色变量 */
|
|
|
+}
|
|
|
+
|
|
|
+.custom-node .q-timeline__dot {
|
|
|
+ background: #485573 !important; /* 节点填充色 */
|
|
|
+ border: 2px solid #5c6b8c !important; /* 节点边框色 */
|
|
|
+}
|
|
|
+
|
|
|
+.custom-node .q-timeline__content {
|
|
|
+ color: #485573; /* 文字颜色 */
|
|
|
+}
|
|
|
+</style>
|