From 5b1a4f4e29652cf1b2f4eb406d96700acffc9e8c Mon Sep 17 00:00:00 2001 From: zhanghua <314079846@qq.com> Date: 星期二, 24 十月 2023 14:23:17 +0800 Subject: [PATCH] 静态资源地址替换 --- src/views/operate/disposal/casepool/pool/index.vue | 235 ++++++++++++++++++++++++++++++++++++---------------------- 1 files changed, 145 insertions(+), 90 deletions(-) diff --git a/src/views/operate/disposal/casepool/pool/index.vue b/src/views/operate/disposal/casepool/pool/index.vue index a069592..36b86f6 100644 --- a/src/views/operate/disposal/casepool/pool/index.vue +++ b/src/views/operate/disposal/casepool/pool/index.vue @@ -1,66 +1,11 @@ <template> <div class="userList"> <header> - <div class="headerContent"> - <div class="search"> - <span>鏉ユ簮鏌ヨ:</span> - <div class="option"> - <el-select clearable v-model="resource" placeholder="璇烽�夋嫨鏉ユ簮"> - <el-option - v-for="item in eventSourceOptions" - :key="item.label" - :label="item.label" - :value="item.value" - > - </el-option> - </el-select> - </div> - <div class="findBtn"> - <el-button type="primary" @click="getUserList">鏌ヨ</el-button> - </div> - </div> - <div class="addUser"> - <el-button - class="addBtn button-addition" - type="primary" - @click="dialogCreate = true" - >娣诲姞</el-button - > - <!-- 閫夋嫨鐧昏绫诲瀷 --> - <el-dialog - :before-close="handleClose" - :visible.sync="dialogCreate" - title="璇烽�夋嫨涓婃姤浜嬩欢绫诲瀷" - width="45%" - v-if="dialogCreate" - > - <createUser @getPageProp="setDialog" /> - </el-dialog> - <!-- 浜嬩欢鐧昏 --> - <el-dialog - :before-close="handleClose" - :visible.sync="dialogNewAdd" - :title="newAddType === 0 ? '杩濊浜嬩欢鐧昏' : '杩濆缓浜嬩欢鐧昏'" - width="80%" - v-if="dialogNewAdd" - > - <!-- 杩濆缓鐧昏 --> - <MyIll - v-if="newAddType === 1" - :refresh="getUserList" - :mytype="newAddType" - @changeDialog="changeDialog" - /> - <!-- 杩濊鐧昏 --> - <myVio - v-else - :refresh="getUserList" - :mytype="newAddType" - @changeDialog="changeDialog" - /> - </el-dialog> - </div> - </div> + <MyHeader + ref="myHeader" + @dialogCreatepro="dialogCreatepro" + @getUserList="getUserList" + ></MyHeader> </header> <main> <div class="mainContent"> @@ -100,7 +45,8 @@ :row-class-name="tableRowClassName" @selection-change="tableChange" > - <el-table-column type="selection" min-width="5"> </el-table-column> + <el-table-column label="搴忓彿" type="index" min-width="10"> + </el-table-column> <el-table-column prop="code" label="浜嬩欢缂栧彿" min-width="18"> <template slot-scope="scope"> <el-link @click="JumpView(scope.row)">{{ @@ -111,7 +57,7 @@ <el-table-column prop="eventSource" label="闂鏉ユ簮" min-width="8"> <template slot-scope="scope"> <span>{{ - scope.row.eventSource === 2 ? "浜哄伐涓婁紶" : "瑙嗛宸℃煡" + scope.row.eventSource === 2 ? "缃戞牸宸℃煡" : "瑙嗛宸℃煡" }}</span> </template> </el-table-column> @@ -131,6 +77,7 @@ :prop="mystatus === 1 ? 'site' : ''" :label="mystatus === 1 ? '鎶ヨ鐐逛綅' : '杩濇硶寤虹瓚闀裤�佸銆侀珮'" :min-width="mystatus === 1 ? '10' : '20'" + show-overflow-tooltip > <template slot-scope="scope"> <div v-if="mystatus === 2"> @@ -173,7 +120,7 @@ <el-table-column prop="operation" label="鎿嶄綔" min-width="20"> <template slot-scope="scope"> <div class="operation" v-if="statusArr[0] === 0"> - <span @click="handleFind(scope.row)">涓婃姤</span> + <span @click="handleUpload(scope.row)">涓婃姤</span> <span class="line">|</span> <span @click="handleDispatch(scope.row)">璋冨害</span> <span class="line">|</span> @@ -189,14 +136,22 @@ </el-table> <!-- 璇︽儏椤靛睍绀� --> <el-dialog + custom-class="customWidth" :visible.sync="dialogView" - width="60%" title="鍩虹淇℃伅(浜哄伐)" v-if="dialogView" - :before-close="handleClose" + :before-close="handleClose2" > - <MyDetail :info="info" v-if="mystatus === 1"></MyDetail> - <MyIllDetail :info="info" v-else></MyIllDetail> + <MyDetail + style="min-width: 300px" + :info="info" + v-if="mystatus === 1" + ></MyDetail> + <MyIllDetail + style="min-width: 500px" + :info="info" + v-else + ></MyIllDetail> </el-dialog> <!-- 璋冨害 --> <el-dialog @@ -246,6 +201,39 @@ </div> </div> </main> + <!-- 閫夋嫨鐧昏绫诲瀷 --> + <el-dialog + :before-close="handleClose" + :visible.sync="dialogCreate" + title="璇烽�夋嫨涓婃姤浜嬩欢绫诲瀷" + width="45%" + v-if="dialogCreate" + > + <createUser @getPageProp="setDialog" /> + </el-dialog> + <!-- 浜嬩欢鐧昏 --> + <el-dialog + :before-close="handleClose" + :visible.sync="dialogNewAdd" + :title="newAddType === 0 ? '杩濊浜嬩欢鐧昏' : '杩濆缓浜嬩欢鐧昏'" + width="80%" + v-if="dialogNewAdd" + > + <!-- 杩濆缓鐧昏 --> + <MyIll + v-if="newAddType === 1" + :refresh="getUserList" + :mytype="newAddType" + @changeDialog="changeDialog" + /> + <!-- 杩濊鐧昏 --> + <myVio + v-else + :refresh="getUserList" + :mytype="newAddType" + @changeDialog="changeDialog" + /> + </el-dialog> </div> </template> <script> @@ -258,7 +246,7 @@ import helper from "@/utils/mydate"; import { RESOURCE_OPTIONS } from "@/utils/helper"; import basecase from "@/api/operate/basecase"; - +import MyHeader from "@/components/seachHeader/index"; export default { components: { createUser, @@ -267,6 +255,7 @@ MyDetail, MyDispatch, MyIllDetail, + MyHeader, }, data() { return { @@ -361,9 +350,13 @@ this.statusArr[1] = item.value; } }); - this.getUserList(); + this.getUserList(undefined); }, + mounted() {}, methods: { + dialogCreatepro() { + this.dialogCreate = true; + }, // 璋冨害 handleDispatch(data) { this.baseId = data.id; @@ -438,14 +431,57 @@ }); }, // 鑾峰彇鐢ㄦ埛鍒楄〃 - getUserList() { - const params = { - current: this.currentPage, - state: this.statusArr[0] ?? null, - size: this.pageSize, - resource: this.resource, - type: this.statusArr[1] ?? null, - }; + getUserList(seachData) { + // console.log(seachData.seachData.resource) + let params; + if (seachData) { + params = { + current: this.currentPage, + state: this.statusArr[0] ?? null, + size: this.pageSize, + resource: + seachData.seachData.resource == undefined + ? null + : seachData.seachData.resource, + region: + seachData.seachData.region == undefined + ? null + : seachData.seachData.region, + type: this.statusArr[1] ?? null, + code: + seachData.seachData.code == undefined + ? null + : seachData.seachData.code, + categoryBig: + seachData.seachData.categoryBig == undefined + ? null + : seachData.seachData.categoryBig, + categorySmall: + seachData.seachData.categorySmall == undefined + ? null + : seachData.seachData.categorySmall, + site: + seachData.seachData.site == undefined + ? null + : seachData.seachData.site, + street: + seachData.seachData.street == undefined + ? null + : seachData.seachData.street, + }; + if (seachData.seachData.alarmTime) { + params.startTime = seachData.seachData.alarmTime[0]; + params.endTime = seachData.seachData.alarmTime[1]; + } + } else { + params = { + current: this.currentPage, + state: this.statusArr[0] ?? null, + size: this.pageSize, + type: this.statusArr[1] ?? null, + }; + } + basecase .baseCasePoolList(params) .then(({ records, total }) => { @@ -462,8 +498,16 @@ return "success-row"; } }, - // 鏌ョ湅鐢ㄦ埛淇℃伅(涓嶅彲淇敼) - handleFind(rowData) {}, + + handleUpload(rowData) { + debugger; + basecase + .uploadEvent(rowData.id) + .then((res) => { + debugger; + }) + .catch((err) => this.$message.error(err)); + }, // 褰撳墠椤垫敼鍙樿Е鍙戜簨浠� changeCurrentPage(page) { this.currentPage = page; @@ -475,6 +519,12 @@ this.dialogCreate = flag; this.dialogView = flag; this.dialogDispatch = flag; + }, + handleClose2(done) { + this.dialogCreate = false; + this.dialogNewAdd = false; + this.dialogDispatch = false; + this.dialogView = false; }, handleClose(done) { this.$confirm("纭鍏抽棴锛�") @@ -498,6 +548,7 @@ this.statusArr[0] = this.tagList[idx].value; this.statusArr[1] = 1; this.getUserList(); + this.$refs.myHeader.seachData = {}; }, // 鏇存敼杩濊/杩濆缓 changeTypeChecked(idx) { @@ -507,6 +558,7 @@ this.mystatus = idx + 1; this.statusArr[1] = this.typeList[idx].value; this.getUserList(); + this.$refs.myHeader.seachData = {}; }, async JumpView(data) { await this.getEventInfo(data.code); @@ -652,20 +704,18 @@ .nav { display: flex; line-height: 40px; - + .is-active { + // background-color: #070f22; + //color: #333; + color: #f5222d; + font-weight: 700; + } .nav-item { width: 80px; text-align: center; - &:hover { cursor: pointer; } - } - - .is-active { - // background-color: #070f22; - color: #333; - font-size: 500; } } @@ -687,8 +737,8 @@ .is-active { // background-color: #070f22; border-radius: 4px; - color: #333; - font-size: 500; + color: #f5222d; + font-weight: 700; } } @@ -771,7 +821,7 @@ .operation { display: flex; - + color: #2f54eb; .line { padding: 0 5px; } @@ -784,3 +834,8 @@ } } </style> +<style> +.customWidth { + width: 1000px !important; +} +</style> -- Gitblit v1.8.0