From 7ca95d0b01940011b16f03683e59ab4f18fff4e0 Mon Sep 17 00:00:00 2001
From: linwenling <3256558519@qq.com>
Date: 星期二, 25 七月 2023 15:40:39 +0800
Subject: [PATCH] 时间搜索
---
ruoyi-ui/src/views/honor/index.vue | 126 ++++++++++++++++++++++++++++++-----------
1 files changed, 92 insertions(+), 34 deletions(-)
diff --git a/ruoyi-ui/src/views/honor/index.vue b/ruoyi-ui/src/views/honor/index.vue
index bb75692..080cc80 100644
--- a/ruoyi-ui/src/views/honor/index.vue
+++ b/ruoyi-ui/src/views/honor/index.vue
@@ -38,7 +38,6 @@
</tablemax>
</div>-->
-
<!-- v-model="queryParams.id"
v-model:phone="queryParams.phone"
@@ -61,16 +60,31 @@
</el-input>
</el-form-item>
<el-form-item label="绫诲埆" prop="type" >
- <el-input
+<!-- <el-input-->
+<!-- v-model="queryParams.type"-->
+<!-- placeholder="璇疯緭鍏ョ被鍒�"-->
+<!-- clearable-->
+<!-- style="width: 240px"-->
+<!-- @keyup.enter.native="handleQuery">-->
+<!-- <i slot="prefix" class="el-input__icon el-icon-search"></i>-->
+<!-- </el-input>-->
+ <el-select
v-model="queryParams.type"
- placeholder="璇疯緭鍏ョ被鍒�"
+ placeholder="鎵�鏈夌被鍒�"
clearable
style="width: 240px"
- @keyup.enter.native="handleQuery">
- <i slot="prefix" class="el-input__icon el-icon-search"></i>
- </el-input>
+ @keyup.enter.native="handleQuery"
+ >
+ <el-option
+ v-for="dict in typeOptions"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ />
+ </el-select>
</el-form-item>
+
<el-form-item label="绾у埆" prop="grade">
<el-input
@@ -170,7 +184,8 @@
<template slot-scope="scope">{{scope.row.createTime? scope.row.createTime: '鈥斺�斺�斺��'}}</template>
</el-table-column>
<el-table-column label="绫诲埆" prop="type" sortable :show-overflow-tooltip="true" width="120" align="center" >
- <template slot-scope="scope">{{scope.row.type? scope.row.type: '鈥斺�斺�斺��'}}</template>
+<!-- <template slot-scope="scope">{{scope.row.type? scope.row.type: '鈥斺�斺�斺��'}}</template>-->
+ <template slot-scope="scope">{{ getSrc(scope.row.type) }}</template>
</el-table-column>
<el-table-column label="鍚嶇О" prop="name" sortable :show-overflow-tooltip="true" width="120" align="center" >
<template slot-scope="scope">{{scope.row.name? scope.row.name: '鈥斺�斺�斺��'}}</template>
@@ -187,8 +202,12 @@
<el-table-column label="鑾峰緱鏃堕棿" prop="getDate" sortable width="170" align="center" >
<template slot-scope="scope">{{scope.row.getDate? scope.row.getDate: '鈥斺�斺�斺��'}}</template>
</el-table-column>
+ <el-table-column label="瀛樻斁浣嶇疆" prop="location" sortable width="170" align="center" >
+ <template slot-scope="scope">{{scope.row.location? scope.row.location: '鈥斺�斺�斺��'}}</template>
+ </el-table-column>
<el-table-column label="鐢靛瓙鏂囦欢" prop="url" width="160" align="center">
<template slot-scope="scope" >
+ <div @click="handleCheck(scope.row)">
<img
class="el-upload-list__item-thumbnail"
src="../../assets/images/deviceLis.png"
@@ -204,7 +223,7 @@
style="width: 35px; height: 35px;"
fit="cover"
v-if="scope.row.url ===',' "
- >
+ ></div>
</template>
</el-table-column>
<el-table-column label="澶囨敞" prop="remark" sortable width="120" align="center">
@@ -228,12 +247,12 @@
v-hasPermi="['system:role:remove']"
>鍒犻櫎</el-button>
-<!-- <el-button-->
-<!-- size="mini"-->
-<!-- type="text"-->
-<!-- icon="el-icon-d-arrow-right"-->
-<!-- @click="handleCheck(scope.row)">-->
-<!-- 鏌ョ湅璇︽儏</el-button>-->
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-d-arrow-right"
+ @click="handleCheck(scope.row)">
+ 鏌ョ湅璇︽儏</el-button>
</template>
</el-table-column>
</el-table>
@@ -252,12 +271,19 @@
<el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="100px">
<el-form-item label="鏃堕棿" prop="createTime">
- <el-input v-model="formDat.createTime" placeholder="璇疯緭鍏ュ垱寤烘椂闂�" clearable :style="{width: '100%'}" >
+ <el-input v-model="formDat.createTime" type='date' placeholder='閫夋嫨鏃ユ湡' clearable :style="{width: '100%'}" >
</el-input>
</el-form-item>
+<!-- <el-form-item label="鑾峰緱鏃堕棿" prop="happenTime">-->
+<!-- <el-date-picker v-model='formDat.happenTime' type='date' placeholder='閫夋嫨鏃ユ湡'></el-date-picker>-->
+<!-- </el-form-item>-->
<el-form-item label="绫诲埆" prop="type">
- <el-input v-model="formDat.type" placeholder="璇疯緭鍏ョ被鍒�" clearable :style="{width: '100%'}" >
- </el-input>
+<!-- <el-input v-model="formDat.type" placeholder="璇疯緭鍏ョ被鍒�" clearable :style="{width: '100%'}" >-->
+<!-- </el-input>-->
+ <el-select v-model="formDat.type" placeholder="璇烽�夋嫨绫诲埆" clearable :style="{width: '100%'}" >
+ <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value"
+ ></el-option>
+ </el-select>
</el-form-item>
<el-form-item label="鍚嶇О" prop="name">
<el-input v-model="formDat.name" placeholder="璇疯緭鍏ュ悕绉�" clearable :style="{width: '100%'}" ></el-input>
@@ -271,11 +297,12 @@
</el-input>
</el-form-item>
<el-form-item label="鏈夋晥鏃堕棿" prop="validityDate">
- <el-input v-model="formDat.validityDate" placeholder="璇疯緭鍏ユ湁鏁堟椂闂�" clearable :style="{width: '100%'}" >
+ <el-input v-model="formDat.validityDate" type='date' placeholder='閫夋嫨鏃ユ湡' clearable :style="{width: '100%'}" >
</el-input>
</el-form-item>
+
<el-form-item label="鑾峰緱鏃堕棿" prop="getDate">
- <el-input v-model="formDat.getDate" placeholder="璇疯緭鍏ヨ幏寰楁椂闂�" clearable :style="{width: '100%'}" >
+ <el-input v-model="formDat.getDate" type='date' placeholder='閫夋嫨鏃ユ湡' clearable :style="{width: '100%'}" >
</el-input>
</el-form-item>
<el-form-item label="瀛樻斁浣嶇疆" prop="location">
@@ -367,7 +394,7 @@
//瀵煎叆鎺ュ彛鍑芥暟
-import {listHonor,enload, addHonor,updateHonor, delHonor,uploadPic} from "@/api/honor/index";
+import {listHonor,enload, addHonor,updateHonor, delHonor,uploadPic,getCategory} from "@/api/honor/index";
import { Notification, MessageBox, Message, Loading } from 'element-ui'
export default {
@@ -498,12 +525,13 @@
trigger: 'blur'
}],
},
+ selected:'',
typeOptions: [],
};
},
created() {
this.getList();
- // this.getCateInfor()
+ this.getCateInfor()
// for (let i = 0; i < this.contactList.length; i++) {
// this.formDat[i] = this.contactList[i];
// }
@@ -526,7 +554,9 @@
/** 鏌ヨ璁板綍鍒楄〃 */
getList() {
this.loading = true;
- // console.log(this.queryParams)
+ console.log(this.queryParams)
+ this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0]
+ this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1]
// listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
listHonor(this.queryParams).then(response => {
// alert(123)
@@ -539,16 +569,40 @@
);
},
/** 鏌ヨ绫诲埆淇℃伅 */
- // getCateInfor()
- // {
- // let _this = this
- // getCategory().then(response=>{
- //
- // response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{
- // _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]})
- // })
- // })
- // },
+ getCateInfor()
+ {
+ let _this = this
+ getCategory().then(response=>{
+
+ response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{
+ _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]})
+ })
+ })
+ },
+ //绫诲埆閫夋嫨
+ getSrc(type) {
+ if (type === 1){
+ return '鍑虹敓璇�'
+ }else if(type === 2){
+ return '瀛︾敓璇�'
+ }else if(type === 3){
+ return '姣曚笟璇�'
+ }else if(type === 4){
+ return '缁撳璇�'
+ }else if(type === 5){
+ return '鎴峰彛绨�'
+ }else if(type === 6){
+ return '鐙敓瀛愬コ璇�'
+ }else if(type === 7){
+ return '楂樼骇鑱岀О'
+ }else if(type === 8){
+ return '鎶ょ収'
+ }else if(type === 9){
+ return '閫氳璇�'
+ }else {
+ return '鍏跺畠'
+ }
+ },
handleRemove(file) {
alert(323)
@@ -626,7 +680,7 @@
/** 鏌ョ湅璇︾粏淇℃伅 */
handleCheck(row){
const id = row.id;
- this.$router.push("/familymodel/Doctor/doctorInfo/" + id);
+ this.$router.push("/self/Honor/honorInfo/" + id);
},
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(row) {
@@ -634,7 +688,7 @@
let jd = true
this.$router.push({
- path:"/familymodel/Doctor/doctorInfo/" + id,
+ path:"/self/Honor/honorInfo/" + id,
query:{
detail:jd
}
@@ -666,6 +720,10 @@
});
}
});
+ // 娓呯┖formDat瀵硅薄鐨勬暟鎹�
+ Object.keys(this.formDat).forEach(key => {
+ this.formDat[key] = '';
+ });
},
requestUpload(params)
{
--
Gitblit v1.9.1