From c40fc03236e94c0b7710d5e931a915f78ecdea13 Mon Sep 17 00:00:00 2001
From: linwenling <3256558519@qq.com>
Date: 星期二, 25 七月 2023 00:09:18 +0800
Subject: [PATCH] 所有模块的按时间搜索
---
ruoyi-ui/src/views/honor/honorInfo.vue | 118 +++++++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 87 insertions(+), 31 deletions(-)
diff --git a/ruoyi-ui/src/views/honor/honorInfo.vue b/ruoyi-ui/src/views/honor/honorInfo.vue
index 2ad5826..7738e57 100644
--- a/ruoyi-ui/src/views/honor/honorInfo.vue
+++ b/ruoyi-ui/src/views/honor/honorInfo.vue
@@ -196,7 +196,8 @@
import errorCode from "@/utils/errorCode";
import {Message} from "element-ui";
import { download,uploadPic} from "@/api/doctor/index";
-import {listHonor,updateHonor} from "@/api/honor/index";
+import {listHonor,updateHonor,getHonor} from "@/api/honor/index";
+import {listRoot} from "@/api/root";
export default {
components: {},
@@ -307,44 +308,99 @@
let _this = this
if (id) {
this.loading = true;
- listHonor(id).then((response) => {
- this.formData = response.data;
- let paths = response.data.url.split(",");
- for(let i = 0; i < paths.length; i++)
- {
- if(paths[i]!="") {
+ // getHonor(id).then((response) => {
+ // this.formData = response.data;
+ // let paths = response.data.url.split(",");
+ // for(let i = 0; i < paths.length; i++)
+ // {
+ // if(paths[i]!="") {
+ //
+ // let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
+ //
+ // if (_this.fot.includes(pth) === true)
+ // _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
+ // else {
+ // // alert(paths[i])
+ // let nms = paths[i].split("\/")
+ // let nm = nms[nms.length - 1]
+ // _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
+ // }
+ // }
+ // }
+ // this.loading = false;
+ // });
- let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
-
- if (_this.fot.includes(pth) === true)
- _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
- else {
- // alert(paths[i])
- let nms = paths[i].split("\/")
- let nm = nms[nms.length - 1]
- _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
- }
- }
- }
- this.loading = false;
- });
+ this.fetchData()
this.getCateInfor()
}
+ //浠ヤ笅涓簍est
+ // if (id){
+ // this.loading =true;
+ // getHonor(id).then((response)=> {
+ // this.formData =response.data;
+ // let paths=response.data.url.split(" ");
+ // for(let i = 0; i < paths.length; i++){
+ // if(paths[i]!=""){
+ // let pth = paths[i].substr(paths[i].length - 4, paths[i].length);
+ // if (_this.fot.includes(pth)) {
+ // _this.fileList.push({
+ // name: paths[i],
+ // url: process.env.VUE_APP_BASE_TRUE_API + paths[i],
+ // });
+ // } else {
+ // // alert(paths[i])
+ // let nms = paths[i].split("\/")
+ // let nm = nms[nms.length - 1]
+ // _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
+ // }
+ // }
+ // }
+ // this.loading = false;
+ // });
+ //
+ // // getHonor(id).then(response => {
+ // // // alert(123)
+ // // // alert(123)
+ // // // console.log(response.data)
+ // // // alert(90)
+ // // this.formData = response.data;
+ // // this.isShow_1=true
+ // // // alert(this.rootList[0].url)
+ // // // this.total = response.data.total;
+ // // this.loading = false;
+ // // }
+ // // );
+ // this.getCateInfor()
+ //
+ // }
},
mounted() {},
methods: {
+ // 鑾峰彇鏁版嵁鏂规硶
+ fetchData(id) {
+ const url = 'http://47.93.189.255:8080/zHonor/id=${id}'; // 鎺ュ彛 URL'/zHonor/id='+query
+ fetch(url)
+ .then(response => response.json())
+ .then(data => {
+ this.formData = data; // 閫氳繃灏嗚繑鍥炴暟鎹祴缁欑粍浠跺睘鎬ф潵鏇存柊瑙嗗浘
+ })
+ .catch(error => {
+ console.error('Error:', error); // 澶勭悊閿欒
+ });
+ },
+
/** 鏌ヨ绫诲埆淇℃伅 */
- // 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]})
+ })
+ })
+ },
submitForm() {
let ul = this.fileList.map(function (elem){
return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
--
Gitblit v1.9.1