From 8b62a3ca3b67fd8e45b666043e48a7049dce08ce Mon Sep 17 00:00:00 2001 From: Tcsm <1377977403@qq.com> Date: 星期日, 28 五月 2023 02:13:06 +0800 Subject: [PATCH] 1.将家庭小医生和收藏荣誉模块的的类别改为选择的形式 2.荣誉证书页面的选择式类别暂时无法搜索和新增 --- ruoyi-ui/src/views/honor/index.vue | 74 +++++++--- ruoyi-ui/src/views/genealogy/index.vue | 83 ++++++++--- ruoyi-ui/src/views/collection/collectionInfo.vue | 31 ++++ ruoyi-ui/src/views/genealogy/perInfo.vue | 2 ruoyi-ui/src/api/honor/index.js | 9 + ruoyi-ui/src/views/doctor/doctorInfo.vue | 17 ++ ruoyi-ui/src/views/collection/index.vue | 89 +++++++----- ruoyi-ui/src/views/doctor/index.vue | 73 +++++++--- 8 files changed, 265 insertions(+), 113 deletions(-) diff --git a/ruoyi-ui/src/api/honor/index.js b/ruoyi-ui/src/api/honor/index.js index de941cc..5d22b6d 100644 --- a/ruoyi-ui/src/api/honor/index.js +++ b/ruoyi-ui/src/api/honor/index.js @@ -62,3 +62,12 @@ data: data }) } +//鎷垮埌绫诲埆 +export function getCategory() +{ + return request({ + url: '/zDict/byId', + method: 'get', + params: {'id':21} + }) +} diff --git a/ruoyi-ui/src/views/collection/collectionInfo.vue b/ruoyi-ui/src/views/collection/collectionInfo.vue index ce641b6..ca0552c 100644 --- a/ruoyi-ui/src/views/collection/collectionInfo.vue +++ b/ruoyi-ui/src/views/collection/collectionInfo.vue @@ -23,8 +23,10 @@ </el-cow> <el-cow > <el-form-item label="绫诲埆" prop="type" label-width="40px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> - <el-input v-model="formData.type" placeholder="璇疯緭鍏ョ被鍒�" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> + <el-select v-model="formData.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-cow> <el-cow > @@ -282,7 +284,30 @@ }], }, - typeOptions: [], + typeOptions: [ + { + value: '閭エ', + label: '閭エ' + }, { + value: '鏃ユ湰鍐涘垁', + label: '鏃ユ湰鍐涘垁' + }, { + value: '鑼呭彴閰�', + label: '鑼呭彴閰�' + }, { + value: '绾㈡湪', + label: '绾㈡湪' + }, { + value: '绾康鍝�', + label: '绾康鍝�' + }, { + value: '鐡峰櫒', + label: '鐡峰櫒' + }, { + value: '涔︾睄', + label: '涔︾睄' + } + ], } }, computed: {}, diff --git a/ruoyi-ui/src/views/collection/index.vue b/ruoyi-ui/src/views/collection/index.vue index 3bba6cc..5ebd0d9 100644 --- a/ruoyi-ui/src/views/collection/index.vue +++ b/ruoyi-ui/src/views/collection/index.vue @@ -60,37 +60,27 @@ range-separator="-" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" + @keyup.enter.native="handleQuery" ></el-date-picker> </el-form-item> - <el-form-item label="绫诲埆" prop="type" > - <el-input + <el-form-item label="绫诲埆" prop="type"> + <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="item in typeOptions" + :key="item.value" + :label="item.label" + :value="item.value" + /> + </el-select> </el-form-item> -<!-- <el-form-item label="绫诲埆" prop="type">--> -<!-- <el-select--> -<!-- v-model="queryParams.type"--> -<!-- placeholder="鎵�鏈夌被鍒�"--> -<!-- clearable--> -<!-- style="width: 240px"--> -<!-- @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-cntainer> <el-col :span="9" > <el-form-item> @@ -200,12 +190,10 @@ <el-table-column label="鑾峰緱鏃堕棿" prop="happenTime" sortable width="100" align="center"> <template slot-scope="scope">{{scope.row.happenTime? scope.row.happenTime: '鈥斺�斺�斺��'}}</template> </el-table-column> - <el-form-item label="绫诲埆" prop="type" width="120"> - <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-table-column label="绫诲埆" prop="type" sortable width="120" align="center"> + <template slot-scope="scope">{{ getSrc(scope.row.type) }}</template> +<!-- <template slot-scope="scope">{{scope.row.type? 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> </el-table-column> @@ -296,8 +284,10 @@ <el-input v-model="formDat.happenTime" placeholder="璇疯緭鍏ヨ幏寰楁椂闂�" clearable :style="{width: '100%'}" ></el-input> </el-form-item> <el-form-item label="绫诲埆" prop="type"> - <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%'}" > @@ -536,20 +526,26 @@ }, typeOptions: [ { - value: '閫夐」1', + value: '閭エ', label: '閭エ' }, { - value: '閫夐」2', + value: '鏃ユ湰鍐涘垁', label: '鏃ユ湰鍐涘垁' }, { - value: '閫夐」3', + value: '鑼呭彴閰�', label: '鑼呭彴閰�' }, { - value: '閫夐」4', + value: '绾㈡湪', label: '绾㈡湪' }, { - value: '閫夐」5', + value: '绾康鍝�', label: '绾康鍝�' + }, { + value: '鐡峰櫒', + label: '鐡峰櫒' + }, { + value: '涔︾睄', + label: '涔︾睄' } ], }; @@ -605,7 +601,26 @@ }) }) }, - + //绫诲埆閫夋嫨 + getSrc(type) { + if (type === '閭エ') { + return '閭エ' + }else if(type === '鏃ユ湰鍐涘垁'){ + return '鏃ユ湰鍐涘垁' + }else if(type === '鑼呭彴閰�'){ + return '鑼呭彴閰�' + }else if(type === '绾㈡湪'){ + return '绾㈡湪' + }else if(type === '绾康鍝�'){ + return '绾康鍝�' + }else if(type === '鐡峰櫒'){ + return '鐡峰櫒' + }else if(type === '涔︾睄'){ + return '涔︾睄' + } else { + return '鍏跺畠' + } + }, handleRemove(file) { alert(323) }, diff --git a/ruoyi-ui/src/views/doctor/doctorInfo.vue b/ruoyi-ui/src/views/doctor/doctorInfo.vue index c637dc8..1146589 100644 --- a/ruoyi-ui/src/views/doctor/doctorInfo.vue +++ b/ruoyi-ui/src/views/doctor/doctorInfo.vue @@ -19,8 +19,10 @@ <el-row> <el-cow :span="8"> <el-form-item label="绫诲瀷" prop="type" label-width="50px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> - <el-input v-model="formData.type" placeholder="璇疯緭鍏ョ被鍨�" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> + <el-select v-model="formData.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-cow> <el-cow :span="8"> @@ -270,7 +272,16 @@ }], }, - typeOptions: [], + typeOptions: [{ + value:'绁炵粡绉�', + label:'绁炵粡绉�' + },{ + value:'鐗欑', + label:'鐗欑' + },{ + value:'鍐呯', + label:'鍐呯' + }], } }, computed: {}, diff --git a/ruoyi-ui/src/views/doctor/index.vue b/ruoyi-ui/src/views/doctor/index.vue index 8072694..8c1842f 100644 --- a/ruoyi-ui/src/views/doctor/index.vue +++ b/ruoyi-ui/src/views/doctor/index.vue @@ -51,16 +51,21 @@ --> </el-form-item> - <el-form-item label="绫诲瀷" prop="type" > - <el-input + <el-form-item label="绫诲埆" prop="type"> + <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="item in typeOptions" + :key="item.value" + :label="item.label" + :value="item.value" + /> + </el-select> </el-form-item> <el-form-item label="鐥囩姸" prop="symptom"> @@ -190,8 +195,8 @@ <el-table-column type="selection" :reserve-selection="true" width="25" align="center" /> <el-table-column fixed label="搴忓彿" sortable type="index" align="center" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="60"/> <el-table-column label="绫诲瀷" prop="type" sortable width="80" align="center"> - - <template slot-scope="scope">{{scope.row.type? scope.row.type: '鈥斺�斺�斺��'}}</template> + <template slot-scope="scope">{{ getSrc(scope.row.type) }}</template> +<!-- <template slot-scope="scope">{{scope.row.type? scope.row.type: '鈥斺�斺�斺��'}}</template>--> </el-table-column> <el-table-column label="鐥囩姸" prop="symptom" sortable :show-overflow-tooltip="true" width="120" align="center" > <template slot-scope="scope">{{scope.row.symptom? scope.row.symptom: '鈥斺�斺�斺��'}}</template> @@ -279,8 +284,10 @@ <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="100px"> <el-form-item label="绫诲瀷" prop="type"> - <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="symptom"> @@ -521,12 +528,21 @@ trigger: 'blur' }], }, - typeOptions: [], + typeOptions: [{ + value:'绁炵粡绉�', + label:'绁炵粡绉�' + },{ + value:'鐗欑', + label:'鐗欑' + },{ + value:'鍐呯', + label:'鍐呯' + }], }; }, created() { this.getList(); - // this.getCateInfor() + this.getCateInfor() // for (let i = 0; i < this.contactList.length; i++) { // this.formDat[i] = this.contactList[i]; // } @@ -562,17 +578,28 @@ ); }, /** 鏌ヨ绫诲埆淇℃伅 */ - // 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 === '绁炵粡绉�'){ + return '绁炵粡绉�' + }else if(type === '鐗欑'){ + return '鐗欑' + }else if(type === '鍐呯'){ + return '鍐呯' + }else { + return '鍏跺畠' + } + }, handleRemove(file) { alert(323) }, diff --git a/ruoyi-ui/src/views/genealogy/index.vue b/ruoyi-ui/src/views/genealogy/index.vue index 19393de..8100cc2 100644 --- a/ruoyi-ui/src/views/genealogy/index.vue +++ b/ruoyi-ui/src/views/genealogy/index.vue @@ -19,14 +19,20 @@ </el-form-item> <el-form-item label="韬唤" prop="identity" > - <el-input + <el-select v-model="queryParams.identity" - 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="item in typeOptions" + :key="item.value" + :label="item.label" + :value="item.value" + /> + </el-select> </el-form-item> @@ -71,14 +77,14 @@ </el-form-item> </el-form> <div> - <div style="width: 149px; - height: 24px; - font-size: 18px; - font-family: Microsoft YaHei-Regular, Microsoft YaHei; - font-weight: 400; - color: #000000; - line-height: 21px; - ">寮犳皬涓�瑙堣〃</div> +<!-- <div style="width: 149px;--> +<!-- height: 24px;--> +<!-- font-size: 18px;--> +<!-- font-family: Microsoft YaHei-Regular, Microsoft YaHei;--> +<!-- font-weight: 400;--> +<!-- color: #000000;--> +<!-- line-height: 21px;--> +<!-- ">寮犳皬涓�瑙堣〃</div>--> <el-row :gutter="10" class="mb8"> <!-- <el-col :span="1.5">--> @@ -149,6 +155,7 @@ <template slot-scope="scope"> <span>绗瑊{scope.row.identity}}浠�</span> </template> +<!-- <template slot-scope="scope">{{ getSrc(scope.row.identity) }}</template>--> </el-table-column> <el-table-column label="濮撳悕" prop="nickName" sortable :show-overflow-tooltip="true" width="100" align="center"/> <el-table-column label="鎬у埆" prop="sex" sortable width="100" align="center" > @@ -456,12 +463,24 @@ }], }, - typeOptions: [], + typeOptions: [{ + value:'1', + label:'绗�1浠�' + },{ + value:'2', + label:'绗�2浠�' + },{ + value:'3', + label:'绗�3浠�' + },{ + value:'4', + label:'绗�4浠�' + }], }; }, created() { this.getList(); - // this.getCateInfor() + this.getCateInfor() // for (let i = 0; i < this.contactList.length; i++) { // this.formDat[i] = this.contactList[i]; // } @@ -526,16 +545,30 @@ ); }, /** 鏌ヨ绫诲埆淇℃伅 */ - // 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(identity) { + if (identity === '1'){ + return '绗�1浠�' + }else if(identity === '2'){ + return '绗�2浠�' + }else if(identity === '3'){ + return '绗�3浠�' + }else if(identity === '4'){ + return '绗�4浠�' + }else { + return '鍏跺畠' + } + }, handleRemove(file) { alert(323) diff --git a/ruoyi-ui/src/views/genealogy/perInfo.vue b/ruoyi-ui/src/views/genealogy/perInfo.vue index edcb863..9c46d1e 100644 --- a/ruoyi-ui/src/views/genealogy/perInfo.vue +++ b/ruoyi-ui/src/views/genealogy/perInfo.vue @@ -15,7 +15,7 @@ } , mounted() { - const id = this.$route.params && this.$route.params.id; + const id = this.$route.params && this.$route.params.id; this.getList(id); }, methods:{ diff --git a/ruoyi-ui/src/views/honor/index.vue b/ruoyi-ui/src/views/honor/index.vue index a5f3bf5..732a9c1 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> @@ -259,8 +274,12 @@ </el-input> </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> @@ -370,7 +389,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 { @@ -501,12 +520,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]; // } @@ -542,16 +562,28 @@ ); }, /** 鏌ヨ绫诲埆淇℃伅 */ - // 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 === '鍑虹敓璇�'){ + return '鍑虹敓璇�' + }else if(type === '鐗欑'){ + return '鐗欑' + }else if(type === '鍐呯'){ + return '鍐呯' + }else { + return '鍏跺畠' + } + }, handleRemove(file) { alert(323) -- Gitblit v1.9.1