From 7cbde843c7ddc09e0aa0a4b6ce47e02ef8bfa1b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cyiyousong=E2=80=9D?= <鈥測ousong_yi@foxmail.com鈥�> Date: Fri, 9 Dec 2022 17:35:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/src/api/baseSet.js | 22 ++-- .../src/pages/software/basics/BasicsSet.vue | 124 +++++++----------- .../pages/software/matter/MatterManage.vue | 50 +++---- .../pages/software/matter/modal/AddMatter.vue | 4 +- 4 files changed, 84 insertions(+), 116 deletions(-) diff --git a/sample-form-manager-ui/admin/src/api/baseSet.js b/sample-form-manager-ui/admin/src/api/baseSet.js index 2943e39..16eda14 100644 --- a/sample-form-manager-ui/admin/src/api/baseSet.js +++ b/sample-form-manager-ui/admin/src/api/baseSet.js @@ -1,20 +1,20 @@ // 鍩虹璁剧疆api -import request from '@/utils/request' +import request from "@/utils/request"; // 鏌ョ湅鍩虹璁剧疆 export const getBaseSetInfo = (data) => { - return request({ - url: "/sampleform/hotword/list", - method: "post", - data, - }); + return request({ + url: "/sampleform/baseset/list", + method: "post", + data, + }); }; // 淇濆瓨鍩虹璁剧疆 export const saveBaseSet = (data) => { - return request({ - url: "/sampleform/baseset/save", - method: "post", - data, - }); + return request({ + url: "/sampleform/baseset/save", + method: "post", + data, + }); }; diff --git a/sample-form-manager-ui/admin/src/pages/software/basics/BasicsSet.vue b/sample-form-manager-ui/admin/src/pages/software/basics/BasicsSet.vue index bf42348..389e8da 100644 --- a/sample-form-manager-ui/admin/src/pages/software/basics/BasicsSet.vue +++ b/sample-form-manager-ui/admin/src/pages/software/basics/BasicsSet.vue @@ -7,89 +7,59 @@ <div class="header"> <span class="mr15 title">鐑棬鎼滅储璇嶆眹</span> <span class="tips" - >鐐瑰嚮鐑棬璇嶆眹锛岃嚜鍔ㄦ绱€€傜郴缁熼粯璁ゅ睍绀烘悳绱㈤噺鏈€澶氱殑10涓瘝锛屾瘡涓瘝灞曠ず6涓眽瀛楋紝鏀寔鎵嬪姩淇敼銆�</span + >鐐瑰嚮鐑棬璇嶆眹锛岃嚜鍔ㄦ绱€€傜郴缁熼粯璁ゅ睍绀烘悳绱㈤噺鏈€澶氱殑10涓瘝锛屾瘡涓瘝灞曠ず6涓眽瀛楋紝鏀寔鎵嬪姩淇敼銆�</span > </div> <!-- 鏍囩 --> <div class="mt20"> <template v-for="item in baseSetInfo.hotwords"> <el-tooltip - class="item" - effect="dark" - :key="item.id" - :content="item.hotwords" - v-if="item.hotwords.length > 6" - placement="top-start" + class="item" + effect="dark" + :key="item.id" + :content="item.hotwords" + v-if="item.hotwords.length > 6" + placement="top-start" > <el-tag - :key="item.id" - size="small" - closable - :disable-transitions="false" - @close="handleClose(item.hotwords)" - > - {{ `${item.hotwords.slice(0, 6)}...` }} - </el-tag> - </el-tooltip> - <el-tag :key="item.id" size="small" - v-else closable :disable-transitions="false" @close="handleClose(item.hotwords)" + > + {{ `${item.hotwords.slice(0, 6)}...` }} + </el-tag> + </el-tooltip> + <el-tag + :key="item.id" + size="small" + v-else + closable + :disable-transitions="false" + @close="handleClose(item.hotwords)" > {{ item.hotwords }} </el-tag> </template> <el-input - class="input-new-tag" - v-if="inputVisible" - v-model="inputValue" - ref="saveTagInput" - size="mini" - @keyup.enter.native="handleInputConfirm" - @blur="handleInputConfirm" + class="input-new-tag" + v-if="inputVisible" + v-model="inputValue" + ref="saveTagInput" + size="mini" + @keyup.enter.native="handleInputConfirm" + @blur="handleInputConfirm" > </el-input> <el-button v-else class="button-new-tag" size="mini" @click="showInput" - >+ 娣诲姞璇嶆眹 - </el-button - > - </div> - <div class="mt20"> - <p class="title mb20">绌虹櫧鎵撳嵃鏉愭枡灞曠ず鏁伴噺</p> - <el-input - size="small" - placeholder="璇疯緭鍏ョ┖鐧芥墦鍗版潗鏂欏睍绀烘暟閲�" - v-model.number="baseSetInfo.printDisplay" - style="width: 250px" - > - <template slot="suffix">涓�</template> - </el-input> + >+ 娣诲姞璇嶆眹 + </el-button> </div> - - -<!-- <div class="mt20"> - <p class="title mb20">鏂伴椈鏉ユ簮</p> - <el-radio-group v-model="baseSetInfo.newsSource" size="medium"> - - <el-radio - v-for='($label, $value) in newSourceEnumData' - :key='$value' - :label="$value" - >{{ $label }} - </el-radio> - - </el-radio-group> - </div>--> - - <div class="mt50"> <el-button size="small" type="primary" @click="handleOk" - >纭畾 - </el-button - > + >纭畾 + </el-button> <el-button size="small" @click="handleReset">閲嶇疆</el-button> </div> </el-card> @@ -97,15 +67,15 @@ </template> <script> -import {getBaseSetInfo, saveBaseSet} from "@/api/baseSet"; +import { getBaseSetInfo, saveBaseSet } from "@/api/baseSet"; import local from "@/utils/local"; export default { data() { return { - siteId: local.getLocal("writeSiteId") - ? local.getLocal("writeSiteId") - : "", + siteId: local.getLocal("sampleSiteId") + ? local.getLocal("sampleSiteId") + : "", inputVisible: false, inputValue: "", newSourceEnumData: {}, @@ -125,23 +95,21 @@ export default { let res = await getBaseSetInfo({ siteId: this.siteId, }); - console.log("res:", res) - console.log("res lens:", res.data.data.data.length) if (res.data.code === 1) { - this.newSourceEnumData = res.data.dict.newsSource + this.newSourceEnumData = res.data.dict.newsSource; if (res.data.data.data.length > 0) { this.baseSetInfo.hotwords = res.data.data.data[0].hotwordList; this.baseSetInfo.printDisplay = res.data.data.data[0].printDisplay; this.baseSetInfo.newsSource = res.data.data.data[0].newsSource + ""; - } } }, handleClose(tag) { - //鍒犻櫎褰撳墠璇嶆眹 - this.baseSetInfo.hotwords=this.baseSetInfo.hotwords.filter(i=>i.hotwords!=tag) + this.baseSetInfo.hotwords = this.baseSetInfo.hotwords.filter( + (i) => i.hotwords != tag + ); }, showInput() { @@ -157,15 +125,16 @@ export default { handleInputConfirm() { let inputValue = this.inputValue; if (inputValue) { - - let list = this.baseSetInfo.hotwords.filter(i => i.hotwords === inputValue); + let list = this.baseSetInfo.hotwords.filter( + (i) => i.hotwords === inputValue + ); if (list.length == 0) { - let obj = {} - obj.hotwords = inputValue - obj.siteId = this.siteId - obj.searchCount = 0 - obj.wordsSource = 1 + let obj = {}; + obj.hotwords = inputValue; + obj.siteId = this.siteId; + obj.searchCount = 0; + obj.wordsSource = 1; this.baseSetInfo.hotwords.push(obj); } } @@ -179,14 +148,13 @@ export default { hotwordList: this.baseSetInfo.hotwords, siteId: this.siteId, }); - let {code, msg} = res.data; + let { code, msg } = res.data; if (code === 1) { this.$message.success(msg); } else { this.getBaseSetInfo(); } - //淇濆瓨鐑棬璇嶆眹 }, // 閲嶇疆 diff --git a/sample-form-manager-ui/admin/src/pages/software/matter/MatterManage.vue b/sample-form-manager-ui/admin/src/pages/software/matter/MatterManage.vue index 796b92a..69c3e6f 100644 --- a/sample-form-manager-ui/admin/src/pages/software/matter/MatterManage.vue +++ b/sample-form-manager-ui/admin/src/pages/software/matter/MatterManage.vue @@ -286,12 +286,12 @@ import TableHeader from "@/components/TableHeader.vue"; import AddMatter from "./modal/AddMatter.vue"; import { mapGetters } from "vuex"; import { - getMatterList, + // getMatterList, createMatter, getWriteMatterList, delMatter, recommendMatter, - getMatterSubList + getMatterSubList, } from "@/api/matter"; import local from "@/utils/local"; export default { @@ -327,7 +327,7 @@ export default { }; }, created() { - this.getMatterList(); + this.getMatterSubList(); this.getWriteMatterList(); }, computed: { @@ -353,23 +353,23 @@ export default { } }, // 鑾峰彇涓€浣撳寲浜嬮」鍒楄〃 - async getMatterList() { - this.loadingRight = true; - let res = await getMatterList({ - page: this.rightCurrent, - size: this.rightSize, - matterName: this.rightSearch, - deptCode: this.departmentRight, - siteId: this.siteId, - }); - this.loadingRight = false; - if (res.data.code === 1) { - let { total, data } = res.data.data; - this.rightTableData = data; - this.rightTotal = total; - this.$refs.rightTable.bodyWrapper.scrollTop = 0; - } - }, + // async getMatterList() { + // this.loadingRight = true; + // let res = await getMatterList({ + // page: this.rightCurrent, + // size: this.rightSize, + // matterName: this.rightSearch, + // deptCode: this.departmentRight, + // siteId: this.siteId, + // }); + // this.loadingRight = false; + // if (res.data.code === 1) { + // let { total, data } = res.data.data; + // this.rightTableData = data; + // this.rightTotal = total; + // this.$refs.rightTable.bodyWrapper.scrollTop = 0; + // } + // }, // 鑾峰彇鏍疯〃绯荤粺浜嬮」鍒楄〃 async getWriteMatterList() { @@ -482,14 +482,14 @@ export default { // 鍙宠竟鎼滅储 handleSearchRight() { this.rightCurrent = 1; - this.getMatterList(); + this.getMatterSubList(); }, // 鍙宠竟閲嶇疆 rightReset() { this.rightSearch = ""; this.departmentRight = ""; this.rightCurrent = 1; - this.getMatterList(); + this.getMatterSubList(); }, // 鍙宠竟鍕鹃€� handleSelectionChangeRight(select) { @@ -503,19 +503,19 @@ export default { this.$message.success(msg); this.rightSelectedRowKeys = []; this.$refs.rightTable.clearSelection(); - this.getMatterList(); + this.getMatterSubList(); this.getWriteMatterList(); } }, // 鍙宠竟缈婚〉 rightChangePagination(cur) { this.rightCurrent = cur; - this.getMatterList(); + this.getMatterSubList(); }, // 鍙宠竟鏀瑰彉姣忛〉鏄剧ず鏁伴噺 rightChangeSize(size) { this.rightSize = size; - this.getMatterList(); + this.getMatterSubList(); }, // 鎵归噺鍔犲叆 handleAllJoin() { diff --git a/sample-form-manager-ui/admin/src/pages/software/matter/modal/AddMatter.vue b/sample-form-manager-ui/admin/src/pages/software/matter/modal/AddMatter.vue index f582324..457d284 100644 --- a/sample-form-manager-ui/admin/src/pages/software/matter/modal/AddMatter.vue +++ b/sample-form-manager-ui/admin/src/pages/software/matter/modal/AddMatter.vue @@ -86,8 +86,8 @@ export default { deptId: "", // 閮ㄩ棬id deptCode: "", // 閮ㄩ棬缂栧彿 matterNo: "", // 浜嬮」缂栧彿 - siteId: local.getLocal("writeSiteId") - ? local.getLocal("writeSiteId") + siteId: local.getLocal("sampleSiteId") + ? local.getLocal("sampleSiteId") : "", source: 1, // 1涓烘墜鍔ㄦ坊鍔�, deptName: "", -- 2.24.3