licailing 4 лет назад
Родитель
Сommit
5529b3640e

+ 8 - 8
src/main/vue/src/components/MultiUploadRegu.vue

@@ -64,8 +64,8 @@ export default {
     },
     methods: {
         handleRemove(file, fileList) {
-            console.log(file);
-            console.log(fileList);
+            // console.log(file);
+            // console.log(fileList);
             this.realFileList = fileList;
             this.$emit(
                 'input',
@@ -73,16 +73,16 @@ export default {
             );
         },
         handlePictureCardPreview(file) {
-            console.log(file);
+            // console.log(file);
             this.previewUrl = file.value;
             this.previewList = this.fileList.map(i => i.value);
-            console.log(this.$refs.preview.$el);
+            // console.log(this.$refs.preview.$el);
             this.$refs.preview.showViewer = true;
         },
         handleSuccess(res, file, fileList) {
-            console.log(file);
-            console.log(res);
-            console.log(fileList);
+            // console.log(file);
+            // console.log(res);
+            // console.log(fileList);
             if (res instanceof Array) {
                 file.value = res[0];
             } else {
@@ -95,7 +95,7 @@ export default {
             );
         },
         updateFileList(list) {
-            console.log(list);
+            // console.log(list);
             if (!list) {
                 list = [];
             } else if (typeof list == 'string') {

+ 25 - 21
src/main/vue/src/components/RegulationDrawer.vue

@@ -38,7 +38,7 @@
                     </div>
                 </el-timeline-item>
             </el-timeline>
-            <el-timeline v-else-if="edit">
+            <!-- <el-timeline v-else-if="edit">
                 <el-timeline-item
                     :timestamp="tipsType[index]"
                     placement="top"
@@ -56,38 +56,42 @@
                         <multi-upload-regu v-model="item.img"></multi-upload-regu>
                     </div>
                 </el-timeline-item>
-            </el-timeline>
+            </el-timeline> -->
 
-            <el-timeline reverse v-if="checkMap.get(recordId).length > 0">
+            <el-timeline reverse v-if="checkMap.get(recordId).length > 0 && !edit">
                 <el-timeline-item
                     :timestamp="item.createdAt"
                     placement="top"
                     v-for="item in checkMap.get(recordId)"
                     :key="item.id"
                 >
-                    <div style="font-size: 14px; color: #4a4646" v-if="!edit">
+                    <div style="font-size: 14px; color: #4a4646">
                         {{ item.content }}
                     </div>
-                    <el-input v-else type="textarea" :rows="2" v-model="item.content"></el-input>
-                    <div style="margin-top:5px">
-                        <div v-if="!edit">
-                            <el-image
-                                v-for="(img, index) in item.file"
-                                :key="index"
-                                :src="img"
-                                fit="fill"
-                                :lazy="true"
-                                style="width:60px;height:60px;margin-right:3px"
-                                :preview-src-list="item.file"
-                            >
-                            </el-image>
-                        </div>
-                        <multi-upload-regu v-model="item.img" v-else></multi-upload-regu>
-                    </div>
+                    <el-image
+                        v-for="(img, index) in item.file"
+                        :key="index"
+                        :src="img"
+                        fit="fill"
+                        :lazy="true"
+                        style="width:60px;height:60px;margin-right:3px"
+                        :preview-src-list="item.file"
+                    >
+                    </el-image>
                 </el-timeline-item>
             </el-timeline>
+            <div v-else-if="edit">
+                <div v-for="item in checkMap.get(recordId)" :key="item.id">
+                    <el-input type="textarea" :rows="2" v-model="item.content" style="width: 90%"></el-input>
+                    <el-button type="danger" icon="el-icon-delete" circle style="margin:5px"></el-button>
+                    <div style="margin-top:5px">
+                        <multi-upload-regu v-model="item.file"></multi-upload-regu>
+                    </div>
+                </div>
+                <el-button type="primary" round size="mini" style="margin-bottom: 10px">添加</el-button>
+            </div>
 
-            <div>
+            <div style="margin-top: 10px">
                 <el-button @click="edit = true" size="mini" plain v-if="!edit">编辑</el-button>
                 <el-button @click="saveRow(recordId)" type="success" size="mini" plain v-if="edit" :saving="saving"
                     >保存</el-button

+ 2 - 2
src/main/vue/src/plugins/http.js

@@ -5,10 +5,10 @@ import qs from 'qs';
 let baseUrl = 'http://localhost:8080';
 switch (process.env.NODE_ENV) {
     case 'development':
-        // baseUrl = 'http://localhost:8080';
+        baseUrl = 'http://localhost:8080';
         // baseUrl = 'http://wljtest.izouma.com';
         // baseUrl = 'http://192.168.50.190:8080';
-        baseUrl = "http://yskj.njlyw.cn:8081";
+        // baseUrl = "http://yskj.njlyw.cn:8081";
         break;
     case 'test':
         baseUrl = 'http://localhost:8080';