Commit 2de3954cf6881ad940df2a884fb0a85aa4393c80

Authored by 杨泽宇
2 parents 37bf5f50 9c46d9fd

Merge branch 'dev'

src/views/community/housekeeper/changeAdmin.vue
@@ -51,8 +51,8 @@ const search = (): void => { @@ -51,8 +51,8 @@ const search = (): void => {
51 data.loading = true; 51 data.loading = true;
52 getTableList(searchData) 52 getTableList(searchData)
53 .then((res) => { 53 .then((res) => {
54 - data.tableList = res.data.data;  
55 - data.total = res.data.data.length; 54 + data.tableList = res.data.data.list;
  55 + data.total = res.data.data.total;
56 data.loading = false; 56 data.loading = false;
57 }) 57 })
58 .catch((err) => { 58 .catch((err) => {
@@ -114,7 +114,7 @@ watchEffect(() => { @@ -114,7 +114,7 @@ watchEffect(() => {
114 <template> 114 <template>
115 <div> 115 <div>
116 <!-- 搜索 --> 116 <!-- 搜索 -->
117 - <el-form :inline="true" :model="searchData" v-loading="data.loading"> 117 + <el-form :inline="true" :model="searchData" >
118 <el-form-item> 118 <el-form-item>
119 <el-input 119 <el-input
120 style="width: 280px" 120 style="width: 280px"
@@ -141,6 +141,7 @@ watchEffect(() =&gt; { @@ -141,6 +141,7 @@ watchEffect(() =&gt; {
141 :data="data.tableList" 141 :data="data.tableList"
142 @selection-change="handleSelectionChange" 142 @selection-change="handleSelectionChange"
143 ref="multipleTableRef" 143 ref="multipleTableRef"
  144 + v-loading="data.loading"
144 > 145 >
145 <el-table-column type="selection" width="55"/> 146 <el-table-column type="selection" width="55"/>
146 <el-table-column label="姓名" prop="name"></el-table-column> 147 <el-table-column label="姓名" prop="name"></el-table-column>
src/views/community/housekeeper/index.vue
@@ -6,7 +6,8 @@ import HouseDetail from &quot;./houseDetail.vue&quot;; @@ -6,7 +6,8 @@ import HouseDetail from &quot;./houseDetail.vue&quot;;
6 import ChangeAdmin from "./changeAdmin.vue"; 6 import ChangeAdmin from "./changeAdmin.vue";
7 import Pagination from "@/components/Pagination/index.vue"; 7 import Pagination from "@/components/Pagination/index.vue";
8 import { useRoute } from "vue-router"; 8 import { useRoute } from "vue-router";
9 -import type { ElForm } from 'element-plus' 9 +import type { ElForm } from "element-plus";
  10 +import File from "@/components/FileUpload/index.vue";
10 11
11 let instance: ComponentInternalInstance | null = getCurrentInstance(); //获取app实例 12 let instance: ComponentInternalInstance | null = getCurrentInstance(); //获取app实例
12 const houseDetailRef = ref<InstanceType<typeof ElForm>>(); 13 const houseDetailRef = ref<InstanceType<typeof ElForm>>();
@@ -59,7 +60,7 @@ const search = (): void =&gt; { @@ -59,7 +60,7 @@ const search = (): void =&gt; {
59 const edit = (row: Object) => { 60 const edit = (row: Object) => {
60 data.title = "编辑楼宇"; 61 data.title = "编辑楼宇";
61 data.formObj = JSON.parse(JSON.stringify(row)); 62 data.formObj = JSON.parse(JSON.stringify(row));
62 - console.log( typeof data.formObj.grossArea); 63 + console.log(typeof data.formObj.grossArea);
63 data.formObj.neighborhoodId = JSON.parse(JSON.stringify(row)).neighborhoodId; 64 data.formObj.neighborhoodId = JSON.parse(JSON.stringify(row)).neighborhoodId;
64 data.dialogVisible = true; 65 data.dialogVisible = true;
65 }; 66 };
@@ -93,7 +94,7 @@ const changeData: void = () =&gt; { @@ -93,7 +94,7 @@ const changeData: void = () =&gt; {
93 * 弹框关闭 94 * 弹框关闭
94 */ 95 */
95 const dialogClose: void = () => { 96 const dialogClose: void = () => {
96 - console.log(111) 97 + console.log(111);
97 data.title = "新增楼宇"; 98 data.title = "新增楼宇";
98 data.formObj = {}; 99 data.formObj = {};
99 houseDetailRef.value.resetForm(); 100 houseDetailRef.value.resetForm();
@@ -121,6 +122,12 @@ const changeClose = () =&gt; { @@ -121,6 +122,12 @@ const changeClose = () =&gt; {
121 changeObj.originalId = null; 122 changeObj.originalId = null;
122 }; 123 };
123 /** 124 /**
  125 + * 下载模板
  126 + */
  127 +const down = () => {
  128 + window.open(`${import.meta.env.VITE_BASE_URL}building.xlsx`);
  129 +};
  130 +/**
124 * 监听路由参数变换 131 * 监听路由参数变换
125 */ 132 */
126 watchEffect(() => { 133 watchEffect(() => {
@@ -157,6 +164,14 @@ watchEffect(() =&gt; { @@ -157,6 +164,14 @@ watchEffect(() =&gt; {
157 <el-button type="primary" @click="data.dialogVisible = true" 164 <el-button type="primary" @click="data.dialogVisible = true"
158 >新增</el-button 165 >新增</el-button
159 > 166 >
  167 + <el-button type="success" @click="down()">下载模板</el-button>
  168 + </el-form-item>
  169 + <el-form-item>
  170 + <File
  171 + url="building/importExcel"
  172 + method="put"
  173 + @success="search"
  174 + ></File>
160 </el-form-item> 175 </el-form-item>
161 </el-row> 176 </el-row>
162 </el-form> 177 </el-form>
@@ -196,10 +211,18 @@ watchEffect(() =&gt; { @@ -196,10 +211,18 @@ watchEffect(() =&gt; {
196 > 211 >
197 <el-button type="text" size="mini" class="btn">房屋管理</el-button> 212 <el-button type="text" size="mini" class="btn">房屋管理</el-button>
198 </router-link> 213 </router-link>
199 - <el-button type="text" size="mini" @click="edit(scope.row)" class="btn" 214 + <el-button
  215 + type="text"
  216 + size="mini"
  217 + @click="edit(scope.row)"
  218 + class="btn"
200 >编辑</el-button 219 >编辑</el-button
201 > 220 >
202 - <el-button type="text" size="mini" @click="remove(scope.row.id)" class="btn" 221 + <el-button
  222 + type="text"
  223 + size="mini"
  224 + @click="remove(scope.row.id)"
  225 + class="btn"
203 >删除</el-button 226 >删除</el-button
204 > 227 >
205 </template> 228 </template>
@@ -247,7 +270,7 @@ watchEffect(() =&gt; { @@ -247,7 +270,7 @@ watchEffect(() =&gt; {
247 </template> 270 </template>
248 271
249 <style scoped> 272 <style scoped>
250 -.btn{  
251 - margin-left:8px 273 +.btn {
  274 + margin-left: 8px;
252 } 275 }
253 </style> 276 </style>
src/views/community/residence/communityDetail.vue
@@ -58,7 +58,7 @@ const rules = reactive({ @@ -58,7 +58,7 @@ const rules = reactive({
58 ], 58 ],
59 storeroomCount: [ 59 storeroomCount: [
60 { 60 {
61 - required: true, 61 + required: false,
62 message: "请输入储藏室数", 62 message: "请输入储藏室数",
63 trigger: "blur", 63 trigger: "blur",
64 }, 64 },
@@ -66,7 +66,7 @@ const rules = reactive({ @@ -66,7 +66,7 @@ const rules = reactive({
66 ], 66 ],
67 truckSpaceCount: [ 67 truckSpaceCount: [
68 { 68 {
69 - required: true, 69 + required: false,
70 message: "请输入车位数", 70 message: "请输入车位数",
71 trigger: "blur", 71 trigger: "blur",
72 }, 72 },
src/views/event/handwork/edit.vue
@@ -80,6 +80,19 @@ const checkPrice = (rules, value, callback) =&gt; { @@ -80,6 +80,19 @@ const checkPrice = (rules, value, callback) =&gt; {
80 } 80 }
81 }; 81 };
82 /** 82 /**
  83 + * 图集校验
  84 + * @param {object} rules 验证规则
  85 + * @param {string} value 待验证数值
  86 + * @callback checkPic~checkCallback
  87 + */
  88 +const checkPic = (rules, value, callback) => {
  89 + if(form.publicityPic.length) {
  90 + callback()
  91 + } else {
  92 + callback(new Error('请上传宣传图片'))
  93 + }
  94 +}
  95 +/**
83 * 表单验证规则 96 * 表单验证规则
84 */ 97 */
85 const rules = reactive({ 98 const rules = reactive({
@@ -90,6 +103,21 @@ const rules = reactive({ @@ -90,6 +103,21 @@ const rules = reactive({
90 trigger: "change", 103 trigger: "change",
91 }, 104 },
92 ], 105 ],
  106 + publicityPic: [
  107 + {
  108 + required: true,
  109 + message: "请上传宣传图片",
  110 + trigger: "change",
  111 + validator: checkPic
  112 + },
  113 + ],
  114 + neighborhoodId: [
  115 + {
  116 + required: true,
  117 + message: "请选择小区",
  118 + trigger: "change",
  119 + },
  120 + ],
93 name: [ 121 name: [
94 { 122 {
95 required: true, 123 required: true,
@@ -413,14 +441,6 @@ onMounted(() =&gt; { @@ -413,14 +441,6 @@ onMounted(() =&gt; {
413 /> 441 />
414 </el-form-item> 442 </el-form-item>
415 <el-form-item label="流程介绍" prop="processDesc" style="width: 100%"> 443 <el-form-item label="流程介绍" prop="processDesc" style="width: 100%">
416 - <!-- <el-input  
417 - v-model.trim="form.data.processDesc"  
418 - placeholder="请填写流程介绍"  
419 - maxlength="1500"  
420 - show-word-limit  
421 - :rows="5"  
422 - type="textarea"  
423 - /> -->  
424 <Tinymce v-model="form.data.processDesc"></Tinymce> 444 <Tinymce v-model="form.data.processDesc"></Tinymce>
425 </el-form-item> 445 </el-form-item>
426 <el-form-item label="宣传图片" prop="publicityPic" style="width: 100%"> 446 <el-form-item label="宣传图片" prop="publicityPic" style="width: 100%">
src/views/housekeeper/buildinMganager/index.vue
@@ -36,7 +36,7 @@ const search = (): void =&gt; { @@ -36,7 +36,7 @@ const search = (): void =&gt; {
36 data.loading = true; 36 data.loading = true;
37 getTableList(searchData) 37 getTableList(searchData)
38 .then((res) => { 38 .then((res) => {
39 - data.tableList = res.data.data; 39 + data.tableList = res.data.data.list;
40 data.total = res.data.data.total; 40 data.total = res.data.data.total;
41 data.loading = false; 41 data.loading = false;
42 }) 42 })
src/views/notify/index.vue
@@ -143,7 +143,7 @@ onMounted(() =&gt; { @@ -143,7 +143,7 @@ onMounted(() =&gt; {
143 <el-form-item> 143 <el-form-item>
144 <el-button type="primary" @click="getList">查询</el-button> 144 <el-button type="primary" @click="getList">查询</el-button>
145 <el-button type="primary"> 145 <el-button type="primary">
146 - <router-link to="/notify/edit">添加公告</router-link> 146 + <router-link to="/notify/edit">新增公告</router-link>
147 </el-button> 147 </el-button>
148 <el-button 148 <el-button
149 type="danger" 149 type="danger"