From 09f0861e61e69e2d818eafc7b9edbd17cf0822d4 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期四, 06 十一月 2025 17:20:02 +0800
Subject: [PATCH] 页面优化以及扣分详情导出
---
src/views/system/point/index.vue | 110 ++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 97 insertions(+), 13 deletions(-)
diff --git a/src/views/system/point/index.vue b/src/views/system/point/index.vue
index 5f162cf..fd85d22 100644
--- a/src/views/system/point/index.vue
+++ b/src/views/system/point/index.vue
@@ -1,8 +1,23 @@
<template>
<div class="app-container">
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" @submit.native.prevent>
<el-form-item label="鐐逛綅鍚嶇О" prop="pointName">
- <el-input v-model="queryParams.pointName" placeholder="杈撳叆鐐逛綅鍚嶇О" clearable @keyup.enter.native="handleQuery" />
+ <el-input v-model="queryParams.pointName" placeholder="杈撳叆鐐逛綅鍚嶇О" clearable @clear="handleQuery" @keyup.enter.native="handleQuery" />
+ </el-form-item>
+ <el-form-item label="鍗曚綅" prop="unit">
+ <el-select
+ v-model="queryParams.unitId"
+ placeholder="璇烽�夋嫨鍗曚綅"
+ clearable
+ @change="handleQuery"
+ >
+ <el-option
+ v-for="unit in unitList"
+ :key="unit.id"
+ :label="unit.value"
+ :value="unit.id"
+ />
+ </el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">鎼滅储</el-button>
@@ -32,6 +47,7 @@
<el-button type="primary" plain icon="el-icon-top" v-loading="download" size="mini" @click="handleExport"
v-hasPermi="['point:export']">瀵煎嚭鐐逛綅</el-button>
</el-col>
+
<el-col :span="1.5">
<el-popover>
<div class="bottom_">
@@ -61,6 +77,7 @@
size="small"
v-model="ywTimes"
type="daterange"
+ value-format="yyyy-MM-dd"
range-separator="鑷�"
start-placeholder="鏇存崲杩愮淮鏃堕棿"
end-placeholder="鏇存崲杩愮淮鏃堕棿">
@@ -84,17 +101,17 @@
<el-button class="bottom_" type="primary" size="small" v-loading="upload" @click="handleImport"
v-hasPermi="['point:import']">瀵煎叆</el-button>
</div>
- <el-button type="primary" size="mini" plain icon="el-icon-bottom" slot="reference" v-hasPermi="['point:import']">瀵煎叆鐐逛綅</el-button>
+ <el-button type="primary" size="mini" plain icon="el-icon-bottom" slot="reference" v-hasPermi="['point:import']"></el-button>
</el-popover>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button type="danger" plain icon="el-icon-receiving" size="mini" @click="handleEditBatch"-->
<!-- v-hasPermi="['point:edit']">鎵归噺淇敼</el-button>-->
<!-- </el-col>-->
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+ <right-toolbar @refreshHeader= "getDyColumn" :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
- <el-table v-loading="loading" :data="pointList" @selection-change="handleSelectionChange">
+ <el-table :key = "refreshkey" v-loading="loading" :data="pointList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="鐐逛綅鍚嶇О" prop="pointName" width="200" show-overflow-tooltip/>
<el-table-column label="鏍囩" align="center" width="200" show-overflow-tooltip>
@@ -110,6 +127,11 @@
<el-table-column label="杩愮淮鍗曚綅" align="center" prop="unitName" />
<el-table-column label="鐩戠閮ㄩ棬" align="center" prop="deptName" />
<el-table-column label="澶囨敞" align="center" prop="remark" />
+ <el-table-column v-for="(column, index) in dynamicColumnList" :key="index" :label="column.labelValue" :prop="column.propName" align="center">
+ <template slot-scope="scope">
+ {{ getDynamicValue(scope.row, column.propName) }}
+ </template>
+ </el-table-column>
<el-table-column label="鎿嶄綔" align="center" fixed="right" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
@@ -137,7 +159,7 @@
</el-cascader>
</el-form-item>
<el-form-item label="杩愮淮鍗曚綅" prop="unitId">
- <el-select v-model="form.unitId" placeholder="杩愮淮鍗曚綅">
+ <el-select v-model="form.unitId" placeholder="杩愮淮鍗曚綅" clearable @clear = "clearTime">
<el-option v-for="item in unitList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
@@ -151,6 +173,12 @@
start-placeholder="杩愮淮寮�濮嬫椂闂�"
end-placeholder="杩愮淮缁撴潫鏃堕棿">
</el-date-picker>
+ </el-form-item>
+ <el-form-item label="鐢ㄦ埛鍚�" prop="remark">
+ <el-input v-model="form.username"/>
+ </el-form-item>
+ <el-form-item label="瀵嗙爜" prop="remark">
+ <el-input v-model="form.password"/>
</el-form-item>
<el-form-item label="鐐逛綅澶囨敞" prop="remark">
<el-input type="textarea" v-model="form.remark"/>
@@ -168,9 +196,27 @@
inactive-text="鏅�氱偣浣�">
</el-switch>
</el-form-item>
- <el-form-item label="鐪佸巺:" prop="provinceTag">
+ <el-form-item label="瑙嗛:" prop="provinceTagVideo">
<el-switch
- v-model="form.provinceTag"
+ v-model="form.provinceTagVideo"
+ active-color="#13ce66"
+ inactive-color="gray"
+ active-text="鐪佸巺鐐逛綅"
+ inactive-text="鏅�氱偣浣�">
+ </el-switch>
+ </el-form-item>
+ <el-form-item label="杞﹁締:" prop="provinceTagCar">
+ <el-switch
+ v-model="form.provinceTagCar"
+ active-color="#13ce66"
+ inactive-color="gray"
+ active-text="鐪佸巺鐐逛綅"
+ inactive-text="鏅�氱偣浣�">
+ </el-switch>
+ </el-form-item>
+ <el-form-item label="浜鸿劯:" prop="provinceTagFace">
+ <el-switch
+ v-model="form.provinceTagFace"
active-color="#13ce66"
inactive-color="gray"
active-text="鐪佸巺鐐逛綅"
@@ -235,22 +281,24 @@
</template>
<script>
+import { addDynamicColumn, deleteDynamicColumnById, editDynamicColumn, getDynamicColumnList } from '@/api/platform/dynamicColumn'
import { listPoint, getPoint, delPoint, addPoint, batchEdit, updatePoint, exportData, importData, timeRange } from "@/api/platform/point";
import { unitSelect } from "@/api/platform/unit";
import { getCascader } from '@/api/platform/region'
import { cascader } from '@/api/system/dept'
-
export default {
name: "Point",
dicts: ['point_tag', 'area_code'],
data() {
return {
+ refreshkey : 0,
+ dynamicColumnList: [],
needUpdateUnit: false,
importantTag: false,
provinceTag: false,
importantCommandImageTag: false,
timeList: [],
- timezone: [],
+ timezone: null,
ywTimes: [],
fileList: [],
importFile: null,
@@ -328,14 +376,36 @@
this.getUnitSelect();
// this.getCascader();
this.getDeptCascader();
+ this.getDyColumn();
},
methods: {
+ clearTime() {
+ console.log("鐢熸晥")
+ this.timezone = '';
+ },
+ getDyColumn() {
+ // 鏌ヨ鍔ㄦ�佸垪
+ let params = {
+ tableName: 't_yw_point'
+ }
+ getDynamicColumnList(params).then(res => {
+ this.dynamicColumnList = res.data
+ this.refreshkey+=1
+ console.log("鍔犺浇鍔ㄦ�佸垪"+this.refreshkey)
+ })
+ },
+ getDynamicValue(row, propName) {
+ let target = row.dynamicColumnList.filter(item => item.propName === propName)
+ return target && target.length > 0 ? target[0].columnValue : ''
+ },
getTagText(row) {
let text = '';
// 妫�鏌ユ瘡涓爣绛撅紝濡傛灉涓簍rue锛屽垯娣诲姞鍒皌ext涓�
if (row.importantTag) text += '閲嶇偣鐐逛綅銆�';
- if (row.provinceTag) text += '鐪佸巺鐐逛綅銆�';
+ if (row.provinceTagVideo) text += '鐪佸巺瑙嗛銆�';
+ if (row.provinceTagCar) text += '鐪佸巺杞﹁締銆�';
+ if (row.provinceTagFace) text += '鐪佸巺浜鸿劯銆�';
if (row.importantCommandImageTag) text += '閲嶇偣鎸囨尌鍥惧儚銆�';
if (row.deptTag) text += '閮ㄧ骇銆�';
text === '' ? '鏅�氱偣浣�' : text
@@ -416,7 +486,12 @@
handleEditBatch() {
this.batchOpen = true;
},
-
+ // 杩愮淮鍏徃涓嬫媺鏁版嵁
+ selectUnit() {
+ workList(this.queryParams).then(res => {
+ this.unitList = res.data;
+ })
+ },
// 鑾峰彇鍖哄幙绾ц仈
getCascader() {
getCascader().then(res => {
@@ -462,7 +537,9 @@
updateTime: null,
deleted: null,
importantTag: false,
- provinceTag: false,
+ provinceTagVideo: false,
+ provinceTagCar: false,
+ provinceTagFace: false,
deptTag: false,
};
this.resetForm("form");
@@ -507,6 +584,13 @@
submitForm() {
this.$refs['form'].validate(valid => {
if (valid) {
+ if (this.timezone && this.timezone.length > 0) {
+ this.form.startTime = this.timezone[0]
+ this.form.endTime = this.timezone[1]
+ } else {
+ this.form.startTime = null
+ this.form.endTime = null
+ }
if (this.form.deptId && this.form.deptId.length > 0) {
this.form.deptId = this.form.deptId[this.form.deptId.length - 1]
}
--
Gitblit v1.8.0