From 598fe738b22d39172b068db5309476e08481e868 Mon Sep 17 00:00:00 2001 From: feige <791364011@qq.com> Date: 星期二, 10 九月 2024 16:20:31 +0800 Subject: [PATCH] 修改bug --- ruoyi-ui/src/api/travel/index.js | 6 + ruoyi-ui/src/views/clanManager/ancestor/index.vue | 9 +- ruoyi-ui/src/views/system/user/profile/index.vue | 13 ++- ruoyi-ui/src/views/travel/Info.vue | 140 +++++++++++++++++++---------------- ruoyi-ui/src/views/clanManager/clan/index.vue | 29 ++++--- ruoyi-ui/src/views/travel/index.vue | 1 ruoyi-ui/src/views/index.vue | 6 + ruoyi-ui/vue.config.js | 2 ruoyi-ui/src/api/self/index.js | 1 ruoyi-ui/src/views/system/user/index.vue | 3 10 files changed, 123 insertions(+), 87 deletions(-) diff --git a/ruoyi-ui/src/api/self/index.js b/ruoyi-ui/src/api/self/index.js index 804a6c9..d8a1ae5 100644 --- a/ruoyi-ui/src/api/self/index.js +++ b/ruoyi-ui/src/api/self/index.js @@ -5,7 +5,6 @@ return request({ url: '/self/user' , method: 'get', - }) } //鏇存柊涓汉淇℃伅 diff --git a/ruoyi-ui/src/api/travel/index.js b/ruoyi-ui/src/api/travel/index.js index 5439289..2d1e6a8 100644 --- a/ruoyi-ui/src/api/travel/index.js +++ b/ruoyi-ui/src/api/travel/index.js @@ -82,7 +82,13 @@ }) } +export function getTravelBaseInfoBycid(cid) { + return request({ + url: '/travel/detail/' + cid, + method: 'get', + }) +} // 鏍规嵁id鏌ヨ鎵�鏈夋敹鏀彴璐︿俊鎭� export function getTravelBaseInfo(id) { return request({ diff --git a/ruoyi-ui/src/views/clanManager/ancestor/index.vue b/ruoyi-ui/src/views/clanManager/ancestor/index.vue index 0a1f12b..52aa510 100644 --- a/ruoyi-ui/src/views/clanManager/ancestor/index.vue +++ b/ruoyi-ui/src/views/clanManager/ancestor/index.vue @@ -134,8 +134,7 @@ <el-dropdown-menu slot="dropdown"> <el-dropdown-item command="handleResetPwd" icon="el-icon-key" v-hasPermi="['system:user:resetPwd']">閲嶇疆瀵嗙爜</el-dropdown-item> - <el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check" - v-hasPermi="['system:user:edit']">鍒嗛厤瑙掕壊</el-dropdown-item> + </el-dropdown-menu> </el-dropdown> </template> @@ -624,14 +623,16 @@ }, /** 閲嶇疆瀵嗙爜鎸夐挳鎿嶄綔 */ handleResetPwd(row) { - this.$prompt('璇疯緭鍏�"' + row.userName + '"鐨勬柊瀵嗙爜', "鎻愮ず", { + // alert(333) + // alert(row.sysId) + this.$prompt('璇疯緭鍏�"' + row.name + '"鐨勬柊瀵嗙爜', "鎻愮ず", { confirmButtonText: "纭畾", cancelButtonText: "鍙栨秷", closeOnClickModal: false, inputPattern: /^.{5,20}$/, inputErrorMessage: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿" }).then(({ value }) => { - resetUserPwd(row.userId, value).then(response => { + resetUserPwd(row.sysId, value).then(response => { this.$modal.msgSuccess("淇敼鎴愬姛锛屾柊瀵嗙爜鏄細" + value); }); }).catch(() => {}); diff --git a/ruoyi-ui/src/views/clanManager/clan/index.vue b/ruoyi-ui/src/views/clanManager/clan/index.vue index c2f2fcd..f9975e0 100644 --- a/ruoyi-ui/src/views/clanManager/clan/index.vue +++ b/ruoyi-ui/src/views/clanManager/clan/index.vue @@ -228,19 +228,19 @@ methods: { chongf(){ //alert(2) - if(this.form.name!=""){ - findByFname(this.form.name).then(response => { - console.log(response.data) - // alert(response.data!=null) - if(response.data!=null) - { - this.$set(this.form,'name',"") - this.$modal.msgSuccess("瀹跺涵鍙峰凡缁忓瓨鍦紒") - } + // if(this.form.name!=""){ + // findByFname(this.form.name).then(response => { + // console.log(response.data) + // // alert(response.data!=null) + // if(response.data!=null) + // { + // this.$set(this.form,'name',"") + // this.$modal.msgSuccess("瀹跺涵鍙峰凡缁忓瓨鍦紒") + // } - }); - } + // }); + // } }, handleChange(){ let _this = this; @@ -477,14 +477,19 @@ let _this = this this.$refs["form"].validate(valid => { if (valid) { - // alert(this.form.id) + //alert(this.form.id) if (this.form.clanId != undefined) { // alert(this.form.name) // this.form.menuIds = this.getMenuAllCheckedKeys(); updateClan(this.form).then(response => { + console.log(response) + if(response.msg=="瀹舵棌鍚嶇О涓嶈兘閲嶅锛�") + this.$modal.msgSuccess("瀹舵棌鍚嶇О涓嶈兘閲嶅") + else{ this.$modal.msgSuccess("淇敼鎴愬姛"); this.open = false; this.getList(); + } }); } else { diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue index a38b201..2c58e76 100644 --- a/ruoyi-ui/src/views/index.vue +++ b/ruoyi-ui/src/views/index.vue @@ -78,8 +78,12 @@ getUserProfile().then(response => { this.user = response.data; }); + let clanId = this.$store.state.user.clanId - // alert(clanId) + if(clanId==null) + { + //alert(clanId) + return} listRoot(10,clanId).then(response =>{ this.rootList =response.data; diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index 993c35a..88d13cc 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -581,6 +581,7 @@ hanldeLoop(){ let fid = this.form.fid + alert(fid) let _this = this if(this.cuid==undefined) { @@ -976,6 +977,8 @@ } fm.fid = this.form.fid fm.mid = this.form.mid + alert(this.form.fid) + alert(this.form.mid) // alert(this.form.isMyFamily) fm.isMyFamily = this.form.isMyFamily=='1'?1:0 diff --git a/ruoyi-ui/src/views/system/user/profile/index.vue b/ruoyi-ui/src/views/system/user/profile/index.vue index 1c2ab57..1f10f90 100644 --- a/ruoyi-ui/src/views/system/user/profile/index.vue +++ b/ruoyi-ui/src/views/system/user/profile/index.vue @@ -64,7 +64,7 @@ <div style="padding-top: 20px; background-color: #F4FFF8;"> <el-divider></el-divider> - <div > + <div v-if="roleJudge"> <el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-row> <el-col :span="10" :xs="24"> @@ -99,7 +99,7 @@ </el-form> </div> <el-divider></el-divider> - <div> + <div v-if="roleJudge"> <el-form> <el-row> <el-col :span="10" :xs="24"> @@ -151,6 +151,7 @@ components: { userAvatar, userInfo, resetPwd }, data() { return { + roleJudge:false, formDat: { familyName: undefined, modelName: undefined, @@ -405,9 +406,12 @@ // console.log("鎵撳嵃瀹跺涵鎴愬憳搴忓垪"+id) // console.log(this.FaimlyList) // }); + // alert(id) getIndividualList().then(response => { this.user = response.data; - // console.log(this.user,'useruseruser') + console.log(this.user,'useruseruser') + if(response.data.roleId==3) + this.roleJudge = true; // alert(890) this.fid = response.data.familyId // alert(this.fid) @@ -431,7 +435,8 @@ let _this = this let clanId = this.$store.state.user.clanId - + if(clanId==null) + return getAllInfo(clanId).then(response=>{ let fams = response.data for(let i = 0; i < fams.length; i++) diff --git a/ruoyi-ui/src/views/travel/Info.vue b/ruoyi-ui/src/views/travel/Info.vue index aad89a4..f77890c 100644 --- a/ruoyi-ui/src/views/travel/Info.vue +++ b/ruoyi-ui/src/views/travel/Info.vue @@ -89,64 +89,70 @@ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> - <el-table v-loading="loading" border :data="travelBase" @selection-change="handleSelectionChange" @row-click="handleCheck" :row-class-name="tableRowClassName" style="background: #FFEFF2; border-radius: 14px 14px 14px 14px;"> - <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/> - - <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-table-column label="鍦扮偣" prop="address" sortable width="100" /> - - <el-table-column label="鎸佽瘉鏃呮父" prop="certificate" sortable width="100" /> - <el-table-column label="璐圭敤" prop="totalPrice" sortable width="100" /> - <el-table-column label="鍏垂/鑷垂" prop="self" sortable width="100" > - <template slot-scope="scope">{{scope.row.self==0?'鍏垂':'鑷垂'}}</template> - </el-table-column> - <el-table-column label="鐢靛瓙鏂囦欢" prop="url" width="160" > - <template slot-scope="scope" > - <img - class="el-upload-list__item-thumbnail" - src="../../assets/images/deviceLis.png" - alt="" - style="width: 35px; height: 35px;" - fit="cover" - v-if="scope.row.url !== ','" - > - <img - class="el-upload-list__item-thumbnail" - src="../../assets/images/deviceA.png" - alt="" - style="width: 35px; height: 35px;" - fit="cover" - v-if="scope.row.url === ','" - > - </template> - </el-table-column> - <el-table-column label="澶囨敞" prop="remark" sortable width="100" /> - - - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> - <template slot-scope="scope" v-if="scope.row.roleId !== 1"> - <el-button - size="mini" - type="text" - icon="el-icon-edit" - @click="handleUpdate(scope.row)" - v-hasPermi="['familymodel:economy:info']" - >淇敼</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-delete" - @click="handleDelete(scope.row)" - v-hasPermi="['system:role:remove']" - >鍒犻櫎</el-button> - - </template> - </el-table-column> - </el-table> + <el-table :header-row-class-name="tableHeaderRowClassName" v-loading="loading" :data="travelBase[props.row.id]" style="background: #FFEFF2; border-radius: 14px 14px 14px 14px;" :row-class-name="tableRowClassName1" > + <el-table-column label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="50px"/> + + <el-table-column label="鏃堕棿" prop="happenDate" sortable width="100" align="center" > + <template slot-scope="scope">{{scope.row.happenDate? scope.row.happenDate: '鈥斺�斺�斺��'}}</template> + </el-table-column> + + <el-table-column label="鍦扮偣" prop="address" sortable width="100" /> + + <el-table-column label="寤虹瓚" prop="scenic" sortable width="100" /> + <!-- <el-table-column label="鏃呮湡" prop="travelPeriod" sortable width="100" /> --> + <el-table-column label="浣跨敤璇佷欢" prop="document" sortable width="100" /> + <el-table-column label="杞︽/鑸彮" prop="flight" sortable width="120px" /> + <el-table-column label="椁愯垂" prop="eat" sortable width="70px" /> + <el-table-column label="浣忓璐�" prop="stay" sortable width="100px" /> + <el-table-column label="浜ら��" prop="travel" sortable width="70px" /> + <el-table-column label="闂ㄧエ" prop="entrance" sortable width="70px" /> + <el-table-column label="鍏跺畠璐圭敤" prop="otherCost" sortable width="120px" /> + <el-table-column label="澶囨敞" prop="backInfo" sortable width="120px" /> + + <el-table-column label="鐢靛瓙鏂囦欢" prop="url" width="160" > + <template slot-scope="scope" > + <img + class="el-upload-list__item-thumbnail" + src="../../assets/images/deviceLis.png" + alt="" + style="width: 35px; height: 35px;" + fit="cover" + v-if="!(scope.row.url === '' || scope.row.url === ',' || scope.row.url === null)" + > + <img + v-else + class="el-upload-list__item-thumbnail" + src="../../assets/images/deviceA.png" + alt="" + style="width: 35px; height: 35px;" + fit="cover" + > + </template> + </el-table-column> + <!-- <el-table-column label="澶囨敞" prop="remark" sortable width="100" />--> + + + <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" v-if="userId != 2"> + <template slot-scope="scope" v-if="scope.row.roleId !== 1"> + <el-button + size="mini" + type="text" + icon="el-icon-edit" + @click="handleUpdate1(scope.row)" + v-hasPermi="['familymodel:economy:info']" + >淇敼</el-button> + <el-button + size="mini" + type="text" + icon="el-icon-delete" + @click="handleDelete1(scope.row)" + v-hasPermi="['system:role:remove']" + >鍒犻櫎</el-button> + <el-button size="mini" type="text" icon="el-icon-d-arrow-right" @click="handleCheck1(scope.row)">鏌ョ湅璇︽儏</el-button> + + </template> + </el-table-column> + </el-table> <pagination v-show="total>0" @@ -353,6 +359,11 @@ deptNodeAll: false, // 鏃ユ湡鑼冨洿 dateRange: [], + queryParams: { + pageNum: 1, + pageSize: 10, + + }, // 鏁版嵁鑼冨洿閫夐」 // 鏁版嵁鑼冨洿閫夐」 fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx', @@ -513,7 +524,7 @@ const id = this.$route.params && this.$route.params.id; - this.getList1(); + // this.getList1(); this.getList(id); }, @@ -558,14 +569,15 @@ getList(fid) { this.loading = true; this.queryParams.fid = fid - this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0] - this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1] + // this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0] + // this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1] - // console.log(this.queryParams) + // // console.log(this.queryParams) // listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => { listTravelBase(this.queryParams).then(response => { // alert(123) - // console.log(response.data) + console.log(response.data) + console.log(response.data.data) this.travelBase = response.data.data; // console.log(this.travelBase) this.total = response.data.total; @@ -585,7 +597,7 @@ this.loading = false; const detailList = filteredData.detailList; // console.log(detailList); - resolve(detailList); + // resolve(detailList); }).catch(error => { console.error("璇锋眰閿欒:", error); reject(error); diff --git a/ruoyi-ui/src/views/travel/index.vue b/ruoyi-ui/src/views/travel/index.vue index 0787a47..b727368 100644 --- a/ruoyi-ui/src/views/travel/index.vue +++ b/ruoyi-ui/src/views/travel/index.vue @@ -1430,6 +1430,7 @@ }, handleCheck1(row){ const id = row.id; + alert(id) this.$router.push("/self/travel/travelInfo/" + id); }, /** 淇敼鎸夐挳鎿嶄綔 */ diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index ff976d1..0b0cb0e 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -37,7 +37,7 @@ // detail: https://cli.vuewww.bendudu.comjs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { //target: `https://10.39.18.174:8080/`, - // target: `https://192.168.1.3:8080/`, + // target: `https://192.168.1.7:8080/`, target: 'https://www.bendudu.com:8080/', changeOrigin: true, pathRewrite: { -- Gitblit v1.9.1