Jelajahi Sumber

考级活动

xuqiang 4 tahun lalu
induk
melakukan
e44b1d8c87

+ 6 - 1
src/main/vue/src/components/MultiUpload.vue

@@ -126,4 +126,9 @@ export default {
     }
 };
 </script>
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.el-upload-list__item-actions {
+    width: 100px !important;
+    height: 100px !important;
+}
+</style>

+ 319 - 0
src/main/vue/src/components/RecordLog.vue

@@ -0,0 +1,319 @@
+<template>
+    <el-dialog
+        v-loading="saving"
+        @close="closeDialog"
+        title="备案管理信息"
+        center
+        :visible.sync="dialogVisible"
+        width="800px"
+    >
+        <div class="edit-view">
+            <el-form
+                :model="formData"
+                :rules="rules"
+                ref="form"
+                label-width="80px"
+                label-position="right"
+                size="small"
+                style="max-width: 600px;"
+            >
+                <!-- <el-form-item label-width="0">
+                <el-button type="primary" size="small" @click="onAddOtherForm()">添加检查记录</el-button>
+            </el-form-item> -->
+                <el-timeline reverse>
+                    <el-timeline-item
+                        v-for="(item, index) in checks"
+                        :key="index"
+                        placement="top"
+                        size="normal"
+                        :timestamp="item.createdAt"
+                    >
+                        <el-card shadow="hover" :body-style="{ padding: '20px' }">
+                            <div v-if="!item.del">
+                                <el-form-item prop="content" label="其他">
+                                    <el-input :rows="5" type="textarea" v-model="item.content"></el-input>
+                                </el-form-item>
+                                <el-form-item prop="file" label="作证材料">
+                                    <!-- <file-upload v-model="item.file"></file-upload> -->
+                                    <multi-upload v-model="item.file"></multi-upload>
+                                </el-form-item>
+                                <!-- <el-form-item>
+                                <el-button
+                                    class="del"
+                                    type="danger"
+                                    size="small"
+                                    icon="el-icon-delete"
+                                    @click="onDeleteOtherForm(item, index)"
+                                ></el-button>
+                            </el-form-item> -->
+                            </div>
+                        </el-card>
+
+                        <!-- content -->
+                    </el-timeline-item>
+                </el-timeline>
+                <el-collapse-transition>
+                    <div v-show="showMore">
+                        <el-timeline reverse>
+                            <el-timeline-item
+                                v-for="(item, index) in lists"
+                                :key="index"
+                                placement="top"
+                                size="normal"
+                                :timestamp="item.createdAt"
+                            >
+                                <el-card shadow="hover" :body-style="{ padding: '20px' }">
+                                    <div v-if="!item.del">
+                                        <div style="margin-left:10px">
+                                            <div>
+                                                {{ tipsType[item.type] }}
+                                            </div>
+                                            <template>
+                                                <div style="margin:10px 0">
+                                                    <el-radio
+                                                        @change="changeRadio(item, true)"
+                                                        v-model="item.value"
+                                                        :label="true"
+                                                        >是</el-radio
+                                                    >
+                                                    <el-radio
+                                                        @change="changeRadio(item, false)"
+                                                        v-model="item.value"
+                                                        :label="false"
+                                                        >否</el-radio
+                                                    >
+                                                </div>
+                                            </template>
+                                        </div>
+                                        <el-form-item prop="file" label="作证材料">
+                                            <!-- <file-upload v-model="item.file"></file-upload> -->
+                                            <multi-upload v-model="item.img"></multi-upload>
+                                        </el-form-item>
+                                        <!-- <el-form-item>
+                                <el-button
+                                    class="del"
+                                    type="danger"
+                                    size="small"
+                                    icon="el-icon-delete"
+                                    @click="onDeleteOtherForm(item, index)"
+                                ></el-button>
+                            </el-form-item> -->
+                                    </div>
+                                </el-card>
+
+                                <!-- content -->
+                            </el-timeline-item>
+                        </el-timeline>
+                    </div>
+                </el-collapse-transition>
+                <div style="width:800px;textAlign:center">
+                    <el-button
+                        class="more"
+                        round
+                        type="primary"
+                        :plain="!showMore"
+                        :icon="showMore ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
+                        @click="showMore = !showMore"
+                    ></el-button>
+                </div>
+
+                <!-- <el-form-item prop="files" label="作证材料">
+                <el-upload class="upload-demo" action="../upload/file" :on-change="handleChange" :file-list="fileList3">
+                    <el-button size="small" type="primary">
+                        点击上传
+                    </el-button>
+                </el-upload>
+            </el-form-item> -->
+                <el-form-item>
+                    <!-- <el-button type="success" size="small" @click="onAddOtherForm()">添加检查记录</el-button> -->
+                    <el-button @click="onSave" :loading="saving" type="primary">保存</el-button>
+                    <el-button @click="$router.go(-1)">取消</el-button>
+                </el-form-item>
+            </el-form>
+        </div>
+    </el-dialog>
+</template>
+<script>
+export default {
+    name: 'RecordCheckEdit',
+    created() {},
+    props: ['dialogVisible'],
+    data() {
+        return {
+            saving: false,
+            showMore: false,
+            formData: {},
+            rules: {},
+            checks: [],
+            tipsType: {
+                examOrganization: '是否履行考前备案手续(此项为否,不再检查下面内容)',
+                examSite: '是否在考场明显位置张贴《考级简章》',
+                examRoom: '考场服务设施是否完善(候考室、指示标记、安全设施等)',
+                environment: '考级时间与网上平台考前备案的考级时间是否一致',
+                safetyq: '考场内有无相关专业考官且佩戴考官证',
+                safetyw: '是否现场对考生艺术水平作出评定(美术专业除外)',
+                safetye: '考级内容是否是所属考级机构教材确定的考级内容',
+                safetyr: '是否在考场明显位置张贴《恢复开展社会艺术水平考级现场考级活动疫情防控措施指南》海报',
+                safetyt: '考点是否配备测量体温设施设备,并有专人值守',
+                safetys: '考级现场是否实施预约限流措施'
+            },
+            lists: [],
+            recordId: ''
+        };
+    },
+    computed: {
+        saveOtherJson() {
+            const checks = [...this.checks]
+                .filter(item => {
+                    return !!item.content || !!item.files;
+                })
+                .map(item => {
+                    return {
+                        ...item,
+                        recordId: this.recordId
+                    };
+                });
+            return JSON.stringify(checks);
+        },
+        dataCon() {
+            return this.lists.map(item => {
+                return {
+                    recordId: this.recordId,
+                    type: item.type,
+                    value: item.value,
+                    img: item.img
+                };
+            });
+        }
+    },
+    methods: {
+        init(id) {
+            if (id) {
+                this.recordId = Number(id);
+                this.$http
+                    .post(
+                        'recordCheck/all',
+                        {
+                            size: 20,
+                            sort: 'createdAt,asc',
+                            query: { recordId: this.recordId }
+                        },
+                        { body: 'json' }
+                    )
+                    .then(res => {
+                        if (res.content.length > 0) {
+                            this.checks = res.content;
+                        }
+                    })
+                    .catch(e => {
+                        console.log(e);
+                        this.$message.error(e.error);
+                    });
+                this.$http
+                    .post(
+                        'recordExpertAudit/all',
+                        {
+                            query: {
+                                recordId: id
+                            }
+                        },
+                        { body: 'json' }
+                    )
+                    .then(res => {
+                        console.log(res);
+                        this.lists = res.content;
+                        // this.empty = res.empty;
+                    });
+            }
+        },
+        closeDialog() {
+            this.$emit('close');
+        },
+        onSave() {
+            this.$refs.form.validate(valid => {
+                if (valid) {
+                    this.submit();
+                } else {
+                    return false;
+                }
+            });
+        },
+        submit() {
+            this.saving = true;
+            this.$http
+                .post('/recordCheck/batchSave', { checks: this.saveOtherJson })
+                .then(res => {
+                    this.saving = false;
+                    this.$message.success('成功');
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.saving = false;
+                    this.$message.error(e.error);
+                });
+            this.$http
+                .post('/recordExpertAudit/batchSave', this.dataCon, { body: 'json' })
+                .then(res => {
+                    this.saving = false;
+                    this.$message.success('成功');
+                    // this.$router.go(-1);
+                    this.dialogVisible = false;
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.saving = false;
+                    this.$message.error(e.error);
+                });
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
+                .then(() => {
+                    return this.$http.post(`/recordCheck/del/${this.formData.id}`);
+                })
+                .then(() => {
+                    this.$message.success('删除成功');
+                    this.$router.go(-1);
+                })
+                .catch(e => {
+                    if (e !== 'cancel') {
+                        console.log(e);
+                        this.$message.error((e || {}).error || '删除失败');
+                    }
+                });
+        },
+        onAddOtherForm() {
+            this.checks.push({
+                content: '',
+                files: ''
+            });
+        },
+        onDeleteOtherForm(info, index) {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'warning' })
+                .then(() => {
+                    const checks = [...this.checks];
+                    if (info.id) {
+                        info.del = true;
+                        checks[index] = info;
+                    } else {
+                        checks.splice(index, 1);
+                    }
+                    this.checks = checks;
+                    this.$message.success('删除成功');
+                })
+                .catch(e => {});
+        }
+    }
+};
+</script>
+<style lang="less" scoped>
+.parameters1 {
+    display: flex;
+    align-items: center;
+    margin-top: 23px;
+}
+
+.edit-view {
+    padding: 0 0;
+    background-color: transparent;
+}
+</style>

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

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

+ 98 - 3
src/main/vue/src/views/record/RecordCheck.vue

@@ -22,14 +22,14 @@
                 >
                     <el-card shadow="hover" :body-style="{ padding: '20px' }">
                         <div v-if="!item.del">
-                            <el-form-item prop="content" label="检查情况">
+                            <el-form-item prop="content" label="其他">
                                 <el-input :rows="5" type="textarea" v-model="item.content"></el-input>
                             </el-form-item>
                             <el-form-item prop="file" label="作证材料">
                                 <!-- <file-upload v-model="item.file"></file-upload> -->
                                 <multi-upload v-model="item.file"></multi-upload>
                             </el-form-item>
-                            <el-form-item>
+                            <!-- <el-form-item>
                                 <el-button
                                     class="del"
                                     type="danger"
@@ -37,7 +37,51 @@
                                     icon="el-icon-delete"
                                     @click="onDeleteOtherForm(item, index)"
                                 ></el-button>
+                            </el-form-item> -->
+                        </div>
+                    </el-card>
+
+                    <!-- content -->
+                </el-timeline-item>
+            </el-timeline>
+            <el-timeline reverse>
+                <el-timeline-item
+                    v-for="(item, index) in lists"
+                    :key="index"
+                    placement="top"
+                    size="normal"
+                    :timestamp="item.createdAt"
+                >
+                    <el-card shadow="hover" :body-style="{ padding: '20px' }">
+                        <div v-if="!item.del">
+                            <div style="margin-left:10px">
+                                <div>
+                                    {{ tipsType[item.type] }}
+                                </div>
+                                <template>
+                                    <div style="margin:10px 0">
+                                        <el-radio @change="changeRadio(item, true)" v-model="item.value" :label="true"
+                                            >是</el-radio
+                                        >
+                                        <el-radio @change="changeRadio(item, false)" v-model="item.value" :label="false"
+                                            >否</el-radio
+                                        >
+                                    </div>
+                                </template>
+                            </div>
+                            <el-form-item prop="file" label="作证材料">
+                                <!-- <file-upload v-model="item.file"></file-upload> -->
+                                <multi-upload v-model="item.img"></multi-upload>
                             </el-form-item>
+                            <!-- <el-form-item>
+                                <el-button
+                                    class="del"
+                                    type="danger"
+                                    size="small"
+                                    icon="el-icon-delete"
+                                    @click="onDeleteOtherForm(item, index)"
+                                ></el-button>
+                            </el-form-item> -->
                         </div>
                     </el-card>
 
@@ -53,7 +97,7 @@
                 </el-upload>
             </el-form-item> -->
             <el-form-item>
-                <el-button type="success" size="small" @click="onAddOtherForm()">添加检查记录</el-button>
+                <!-- <el-button type="success" size="small" @click="onAddOtherForm()">添加检查记录</el-button> -->
                 <el-button @click="onSave" :loading="saving" type="primary">保存</el-button>
                 <el-button @click="$router.go(-1)">取消</el-button>
             </el-form-item>
@@ -85,6 +129,21 @@ export default {
                     console.log(e);
                     this.$message.error(e.error);
                 });
+            this.$http
+                .post(
+                    'recordExpertAudit/all',
+                    {
+                        query: {
+                            recordId: this.$route.query.rid
+                        }
+                    },
+                    { body: 'json' }
+                )
+                .then(res => {
+                    console.log(res);
+                    this.lists = res.content;
+                    // this.empty = res.empty;
+                });
         }
     },
     data() {
@@ -93,6 +152,19 @@ export default {
             formData: {},
             rules: {},
             checks: [],
+            tipsType: {
+                examOrganization: '是否履行考前备案手续(此项为否,不再检查下面内容)',
+                examSite: '是否在考场明显位置张贴《考级简章》',
+                examRoom: '考场服务设施是否完善(候考室、指示标记、安全设施等)',
+                environment: '考级时间与网上平台考前备案的考级时间是否一致',
+                safetyq: '考场内有无相关专业考官且佩戴考官证',
+                safetyw: '是否现场对考生艺术水平作出评定(美术专业除外)',
+                safetye: '考级内容是否是所属考级机构教材确定的考级内容',
+                safetyr: '是否在考场明显位置张贴《恢复开展社会艺术水平考级现场考级活动疫情防控措施指南》海报',
+                safetyt: '考点是否配备测量体温设施设备,并有专人值守',
+                safetys: '考级现场是否实施预约限流措施'
+            },
+            lists: [],
             recordId: ''
         };
     },
@@ -109,6 +181,17 @@ export default {
                     };
                 });
             return JSON.stringify(checks);
+        },
+        dataCon() {
+            return this.lists.map(item => {
+                return {
+                    recordId: this.$route.query.rid,
+                    type: item.type,
+                    value: item.value,
+                    img: item.img
+                    // supervisor: this.supervisor
+                };
+            });
         }
     },
     methods: {
@@ -125,6 +208,18 @@ export default {
             this.saving = true;
             this.$http
                 .post('/recordCheck/batchSave', { checks: this.saveOtherJson })
+                .then(res => {
+                    this.saving = false;
+                    this.$message.success('成功');
+                    // this.$router.go(-1);
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.saving = false;
+                    this.$message.error(e.error);
+                });
+            this.$http
+                .post('/recordExpertAudit/batchSave', this.dataCon, { body: 'json' })
                 .then(res => {
                     this.saving = false;
                     this.$message.success('成功');

+ 65 - 8
src/main/vue/src/views/record/RecordRegulationList.vue

@@ -76,7 +76,6 @@
                                 <div>
                                     {{ item.content }}
                                 </div>
-
                                 <div style="margin-top:5px">
                                     <el-image
                                         v-for="(img, index) in item.file"
@@ -84,7 +83,7 @@
                                         :src="img"
                                         fit="fill"
                                         :lazy="true"
-                                        style="width:60px;height:60px"
+                                        style="width:60px;height:60px;margin-right:3px"
                                         :preview-src-list="item.file"
                                     >
                                     </el-image>
@@ -92,6 +91,30 @@
                                 <!-- content -->
                             </el-timeline-item>
                         </el-timeline>
+                        <el-timeline-item
+                            :timestamp="item.createdAt"
+                            placement="top"
+                            v-for="item in lists"
+                            :key="item.id"
+                        >
+                            <div>
+                                {{ tipsType[item.type] }}
+                            </div>
+                            <div style="margin-top:5px">
+                                {{ item.value ? '是' : '否' }}
+                            </div>
+
+                            <div style="margin-top:5px">
+                                <el-image
+                                    v-for="(img, index) in item.img"
+                                    :key="index"
+                                    :src="img"
+                                    style="width:60px;height:60px;margin-right:3px"
+                                    :preview-src-list="item.img"
+                                >
+                                </el-image>
+                            </div>
+                        </el-timeline-item>
                         <div style="margin-left: 26px">
                             <el-button @click="saveRow(props.row)" size="mini" plain>编辑</el-button>
                         </div>
@@ -139,10 +162,12 @@
             >
             </el-pagination>
         </div>
+        <record-log ref="dataRef" :dialogVisible="isShow" @close="isShow = false"></record-log>
     </div>
 </template>
 <script>
 import pageableTable from '@/mixins/pageableTable';
+import RecordLog from '../../components/RecordLog';
 import format from 'date-fns/format';
 import startOfDay from 'date-fns/startOfDay';
 import endOfDay from 'date-fns/endOfDay';
@@ -151,6 +176,7 @@ import { th } from 'date-fns/locale';
 export default {
     name: 'RecordRegulationList',
     mixins: [pageableTable],
+    components: { RecordLog },
     created() {
         this.$http
             .get('/district/NJ')
@@ -166,6 +192,8 @@ export default {
     data() {
         return {
             multipleMode: false,
+            isShow: false,
+            lists: [],
             search: '',
             url: '/record/all',
             downloading: false,
@@ -179,6 +207,18 @@ export default {
             organizer: '',
             dateRange: '',
             currentTime: '',
+            tipsType: {
+                examOrganization: '是否履行考前备案手续(此项为否,不再检查下面内容)',
+                examSite: '是否在考场明显位置张贴《考级简章》',
+                examRoom: '考场服务设施是否完善(候考室、指示标记、安全设施等)',
+                environment: '考级时间与网上平台考前备案的考级时间是否一致',
+                safetyq: '考场内有无相关专业考官且佩戴考官证',
+                safetyw: '是否现场对考生艺术水平作出评定(美术专业除外)',
+                safetye: '考级内容是否是所属考级机构教材确定的考级内容',
+                safetyr: '是否在考场明显位置张贴《恢复开展社会艺术水平考级现场考级活动疫情防控措施指南》海报',
+                safetyt: '考点是否配备测量体温设施设备,并有专人值守',
+                safetys: '考级现场是否实施预约限流措施'
+            },
             checkMap: new Map()
         };
     },
@@ -243,12 +283,14 @@ export default {
             this.$refs.table.toggleRowExpansion(row, true);
         },
         saveRow(row) {
-            this.$router.push({
-                path: '/recordCheck',
-                query: {
-                    rid: row.id
-                }
-            });
+            this.isShow = true;
+            this.$refs.dataRef.init(row.id);
+            // this.$router.push({
+            //     path: '/recordCheck',
+            //     query: {
+            //         rid: row.id
+            //     }
+            // });
         },
         download() {
             this.downloading = true;
@@ -355,6 +397,21 @@ export default {
                 .then(() => {
                     this.checkMap = new Map(checks);
                 });
+            this.$http
+                .post(
+                    'recordExpertAudit/all',
+                    {
+                        query: {
+                            recordId: row.id
+                        }
+                    },
+                    { body: 'json' }
+                )
+                .then(res => {
+                    console.log(res);
+                    this.lists = res.content;
+                    // this.empty = res.empty;
+                });
         }
     }
 };