|
|
@@ -1,33 +1,44 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <van-nav-bar title="随访记录" @click-left="$router.back()" left-arrow fixed placeholder safe-area-inset-top />
|
|
|
+ <van-nav-bar
|
|
|
+ title="随访记录"
|
|
|
+ @click-left="$router.back()"
|
|
|
+ left-arrow
|
|
|
+ fixed
|
|
|
+ placeholder
|
|
|
+ safe-area-inset-top
|
|
|
+ />
|
|
|
<div class="message">
|
|
|
<van-row class="topBox">
|
|
|
<van-col span="18">
|
|
|
<van-row class="row">
|
|
|
- <van-col span="9">姓名:{{childInfo.name}}</van-col>
|
|
|
- <van-col span="6">性别:{{childInfo.sex}}</van-col>
|
|
|
- <van-col span="9">年龄:{{childInfo.age}}</van-col>
|
|
|
+ <van-col span="9">姓名:{{ childInfo.name }}</van-col>
|
|
|
+ <van-col span="6">性别:{{ childInfo.sex }}</van-col>
|
|
|
+ <van-col span="9">年龄:{{ childInfo.age }}</van-col>
|
|
|
</van-row>
|
|
|
<van-row class="row">
|
|
|
- <van-col span="24">儿童类型:{{childInfo.childTypeName}}</van-col>
|
|
|
+ <van-col span="24">儿童类型:{{ childInfo.childTypeName }}</van-col>
|
|
|
</van-row>
|
|
|
<van-row class="row">
|
|
|
- <van-col span="24">教育情况:{{childInfo.school}}</van-col>
|
|
|
+ <van-col span="24">教育情况:{{ childInfo.school }}</van-col>
|
|
|
</van-row>
|
|
|
<van-row class="row">
|
|
|
- <van-col span="24">健康情况:{{childInfo.healthStatus}}</van-col>
|
|
|
+ <van-col span="24">健康情况:{{ childInfo.healthStatus }}</van-col>
|
|
|
</van-row>
|
|
|
</van-col>
|
|
|
<van-col span="6">
|
|
|
- <img class="tx" :src="childInfo.url?childInfo.url:require('../../assets/tx.png')" alt="">
|
|
|
+ <img
|
|
|
+ class="tx"
|
|
|
+ :src="childInfo.url ? childInfo.url : require('../../assets/tx.png')"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
</van-col>
|
|
|
<van-row class="row">
|
|
|
- <van-col span="10">监护人:{{childInfo.guardianName}}</van-col>
|
|
|
- <van-col span="14">联系方式:{{childInfo.guardianPhone}}</van-col>
|
|
|
+ <van-col span="10">监护人:{{ childInfo.guardianName }}</van-col>
|
|
|
+ <van-col span="14">联系方式:{{ childInfo.guardianPhone }}</van-col>
|
|
|
</van-row>
|
|
|
<van-row class="row">
|
|
|
- <van-col span="24">居住地址:{{childInfo.address}}</van-col>
|
|
|
+ <van-col span="24">居住地址:{{ childInfo.address }}</van-col>
|
|
|
</van-row>
|
|
|
</van-row>
|
|
|
</div>
|
|
|
@@ -35,190 +46,432 @@
|
|
|
<div class="main">
|
|
|
<van-row class="cell">
|
|
|
<van-col span="6">随访时间:</van-col>
|
|
|
- <!-- <van-col span="18" @click="showPopup">{{form.followDate?form.followDate:'请选择'}}</van-col> -->
|
|
|
<van-col span="18">
|
|
|
- <van-field v-model="form.followDate" @click="showPopup" :rules="[{ required: true}]" placeholder="请选择" readonly />
|
|
|
+ <van-field
|
|
|
+ v-model="form.followDate"
|
|
|
+ @click="showPopup"
|
|
|
+ :rules="[{ required: true }]"
|
|
|
+ placeholder="请选择"
|
|
|
+ readonly
|
|
|
+ />
|
|
|
</van-col>
|
|
|
<van-popup v-model="show" position="bottom" :style="{ height: '50%' }">
|
|
|
- <van-datetime-picker @confirm="dateConfirm" @cancel="showPopup" v-model="followDate" type="date" :min-date="minDate" :max-date="maxDate" :columns-order="[ 'year','month', 'day']"
|
|
|
- :formatter="formatter" />
|
|
|
+ <van-datetime-picker
|
|
|
+ @confirm="dateConfirm"
|
|
|
+ @cancel="showPopup"
|
|
|
+ v-model="followDate"
|
|
|
+ type="date"
|
|
|
+ :min-date="minDate"
|
|
|
+ :max-date="maxDate"
|
|
|
+ :columns-order="['year', 'month', 'day']"
|
|
|
+ :formatter="formatter"
|
|
|
+ />
|
|
|
</van-popup>
|
|
|
</van-row>
|
|
|
<van-row class="cell">
|
|
|
<van-col span="6">选择街道:</van-col>
|
|
|
- <!-- <van-col span="18" @click="streetshowPopup">{{form.streetName?form.streetName:'请选择'}}</van-col> -->
|
|
|
<van-col span="18">
|
|
|
- <van-field v-model="form.streetName" @click="streetshowPopup" :rules="[{ required: true}]" placeholder="请选择" readonly />
|
|
|
+ <van-field
|
|
|
+ v-model="form.streetName"
|
|
|
+ @click="streetshowPopup"
|
|
|
+ :rules="[{ required: true }]"
|
|
|
+ placeholder="请选择"
|
|
|
+ readonly
|
|
|
+ />
|
|
|
</van-col>
|
|
|
<van-popup v-model="streetShow" position="bottom" :style="{ height: '50%' }">
|
|
|
- <van-picker default-index="2" :visible-item-count="6" show-toolbar :columns="streetList" @confirm="onConfirm" @cancel="streetshowPopup" @change="onChange" value-key="name" />
|
|
|
+ <van-picker
|
|
|
+ default-index="2"
|
|
|
+ :visible-item-count="6"
|
|
|
+ show-toolbar
|
|
|
+ :columns="streetList"
|
|
|
+ @confirm="onConfirm"
|
|
|
+ @cancel="streetshowPopup"
|
|
|
+ @change="onChange"
|
|
|
+ value-key="name"
|
|
|
+ />
|
|
|
</van-popup>
|
|
|
</van-row>
|
|
|
<van-row class="cell">
|
|
|
<van-col span="6">随访地点:</van-col>
|
|
|
<van-col span="18">
|
|
|
- <van-field v-model="form.place" :rules="[{ required: true}]" placeholder="请输入随访地点" />
|
|
|
+ <van-field
|
|
|
+ v-model="form.place"
|
|
|
+ :rules="[{ required: true }]"
|
|
|
+ placeholder="请输入随访地点"
|
|
|
+ />
|
|
|
</van-col>
|
|
|
</van-row>
|
|
|
<van-row class="cell">
|
|
|
<van-col span="6">随访人员:</van-col>
|
|
|
<van-col span="18">
|
|
|
- <van-field v-model="form.personnel" :rules="[{ required: true}]" placeholder="请输入随访人员" />
|
|
|
+ <van-field
|
|
|
+ v-model="form.personnel"
|
|
|
+ :rules="[{ required: true }]"
|
|
|
+ placeholder="请输入随访人员"
|
|
|
+ />
|
|
|
</van-col>
|
|
|
</van-row>
|
|
|
<van-row class="cell">
|
|
|
<van-col span="6">联系方式:</van-col>
|
|
|
<van-col span="18">
|
|
|
- <van-field v-model="form.phone" type="tel" :rules="[{validator,required: true, message:'手机号格式不正确'}]" placeholder="请输入" />
|
|
|
+ <van-field
|
|
|
+ v-model="form.phone"
|
|
|
+ type="tel"
|
|
|
+ :rules="[{ validator, required: true, message: '手机号格式不正确' }]"
|
|
|
+ placeholder="请输入"
|
|
|
+ />
|
|
|
</van-col>
|
|
|
</van-row>
|
|
|
+ <!-- 随访记录 -->
|
|
|
<van-row class="cell">
|
|
|
<van-col span="6">随访记录:</van-col>
|
|
|
<van-col span="18">
|
|
|
- <van-field class="textarea" :rules="[{ required: true}]" v-model="form.remark" rows="1" type="textarea" placeholder="请输入随访记录" />
|
|
|
+ <van-field
|
|
|
+ class="textarea"
|
|
|
+ :rules="[{ required: true }]"
|
|
|
+ v-model="form.remark"
|
|
|
+ rows="1"
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入随访记录"
|
|
|
+ />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+
|
|
|
+ <!--预警风险描述 -->
|
|
|
+ <van-row v-if="!childInfo.warningId" class="cell">
|
|
|
+ <van-col span="6">预警风险:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field
|
|
|
+ placeholder="请选择预警风险"
|
|
|
+ :value="riskText"
|
|
|
+ readonly
|
|
|
+ is-link
|
|
|
+ @click="openWarningSheet"
|
|
|
+ />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <vanUploader
|
|
|
+ ref="imgUploader"
|
|
|
+ :text="'图片'"
|
|
|
+ @getfileList="getfileList"
|
|
|
+ ></vanUploader>
|
|
|
+ <vanUploader
|
|
|
+ ref="videoUploader"
|
|
|
+ :text="'视频'"
|
|
|
+ @getfileList="getfileList"
|
|
|
+ ></vanUploader>
|
|
|
+
|
|
|
+ <van-row v-if="childInfo.warningLevel" class="cell">
|
|
|
+ <van-col span="6">预警等级:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field
|
|
|
+ :value="warningText"
|
|
|
+ readonly
|
|
|
+ is-link
|
|
|
+ @click="checkWarningDetail()"
|
|
|
+ />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+
|
|
|
+ <van-row v-for="(item, index) in warningRecordList" :key="item.id" class="cell">
|
|
|
+ <van-col span="6">查看处置{{ index + 1 }}:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field
|
|
|
+ :value="item.disposalResult"
|
|
|
+ readonly
|
|
|
+ is-link
|
|
|
+ @click="checkNoteHandle(item)"
|
|
|
+ />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+
|
|
|
+ <van-row v-if="childInfo.warningId && isAddRecord" class="cell">
|
|
|
+ <van-col span="6">添加处置:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field
|
|
|
+ placeholder="请添加处置记录"
|
|
|
+ readonly
|
|
|
+ is-link
|
|
|
+ @click="addNoteHandle"
|
|
|
+ />
|
|
|
</van-col>
|
|
|
</van-row>
|
|
|
- <vanUploader :text="'图片'" @getfileList="getfileList"></vanUploader>
|
|
|
- <vanUploader :text="'视频'" @getfileList="getfileList"></vanUploader>
|
|
|
</div>
|
|
|
+
|
|
|
<div class="but">
|
|
|
<van-button native-type="submit" :disabled="disabled">确 定</van-button>
|
|
|
</div>
|
|
|
</van-form>
|
|
|
+
|
|
|
+ <!-- 预警选择弹窗组件 -->
|
|
|
+ <WarningSheet
|
|
|
+ v-model="showWarningSheet"
|
|
|
+ :list="warningList"
|
|
|
+ :selected-value="riskValue"
|
|
|
+ @confirm="handleWarningConfirm"
|
|
|
+ >
|
|
|
+ </WarningSheet>
|
|
|
</div>
|
|
|
</template>
|
|
|
+
|
|
|
<script>
|
|
|
-import { saveFollowUp, getStreetList, getChildInfo } from '../../api/index.js'
|
|
|
-import vanUploader from '../../components/vanUploader.vue'
|
|
|
+import {
|
|
|
+ saveFollowUp,
|
|
|
+ getStreetList,
|
|
|
+ getChildInfo,
|
|
|
+ warningReasons,
|
|
|
+ warningSave,
|
|
|
+ warningRecordList,
|
|
|
+} from "../../api/index.js";
|
|
|
+import WarningSheet from "../../components/warningSheet.vue";
|
|
|
+import vanUploader from "../../components/vanUploader.vue";
|
|
|
+
|
|
|
export default {
|
|
|
- components: { vanUploader },
|
|
|
+ components: { vanUploader, WarningSheet },
|
|
|
data() {
|
|
|
return {
|
|
|
show: false,
|
|
|
streetShow: false,
|
|
|
disabled: false,
|
|
|
showvideoplay: false,
|
|
|
- videourl: '',
|
|
|
+ videourl: "",
|
|
|
fileList: [],
|
|
|
- form: {
|
|
|
- fileList: [],
|
|
|
- },
|
|
|
- streetList: '',
|
|
|
+ form: { fileList: [] },
|
|
|
+ streetList: "",
|
|
|
followDate: new Date(),
|
|
|
minDate: new Date(2020, 0, 1),
|
|
|
maxDate: new Date(),
|
|
|
- customFieldName: {
|
|
|
- text: 'name',
|
|
|
- id: 'id',
|
|
|
- },
|
|
|
- childInfo: '',
|
|
|
+ customFieldName: { text: "name", id: "id" },
|
|
|
+ childInfo: "",
|
|
|
pics: [],
|
|
|
videos: [],
|
|
|
+
|
|
|
+ showWarningSheet: false,
|
|
|
+ riskText: "",
|
|
|
+ warningList: [],
|
|
|
+ riskValue: "",
|
|
|
+ riskLabel: "",
|
|
|
+
|
|
|
+ isAddRecord: false,
|
|
|
+ warningRecordList: [],
|
|
|
+ };
|
|
|
+ },
|
|
|
+
|
|
|
+ // 监听路由:只有【新进入】才刷新
|
|
|
+ beforeRouteEnter(to, from, next) {
|
|
|
+ console.log("路由");
|
|
|
+ console.log(to);
|
|
|
+ console.log(from);
|
|
|
+ next((vm) => {
|
|
|
+ // 只有从 /home 进来或在本界面手动刷新,才刷新页面!
|
|
|
+ if (from.path === "/followUp/director" || from.path === "/") {
|
|
|
+ vm.reloadPageData();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 离开页面时:如果是回到 /home,清空所有状态!
|
|
|
+ beforeRouteLeave(to, from, next) {
|
|
|
+ if (to.path === "/followUp/director") {
|
|
|
+ // 清空关键标记,保证下次从home进入一定刷新
|
|
|
+ this.childInfo = null;
|
|
|
+ this.lastEnteredFromHome = false;
|
|
|
}
|
|
|
+ next();
|
|
|
},
|
|
|
- created() {
|
|
|
- this.id = this.$route.query.id
|
|
|
- this.getStreetList()
|
|
|
- this.getChildInfo()
|
|
|
+
|
|
|
+ computed: {
|
|
|
+ warningText() {
|
|
|
+ const level = this.childInfo?.warningLevel;
|
|
|
+ const map = { 1: "蓝色预警", 2: "黄色预警", 3: "橙色预警", 4: "红色预警" };
|
|
|
+ return map[level] || "";
|
|
|
+ },
|
|
|
},
|
|
|
+
|
|
|
+ created() {},
|
|
|
+
|
|
|
+ // 返回页面:只刷新处置记录,不清空表单!
|
|
|
+ activated() {
|
|
|
+ if (this.childInfo?.warningId) {
|
|
|
+ this.getWarningRecordList();
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
methods: {
|
|
|
+ // ===================== 完全保留你原版的重置方法 =====================
|
|
|
+ async reloadPageData() {
|
|
|
+ // 先清空上传照片和视频的组件
|
|
|
+ if (this.$refs.imgUploader) this.$refs.imgUploader.childrenClear();
|
|
|
+ if (this.$refs.videoUploader) this.$refs.videoUploader.childrenClear();
|
|
|
+ this.childInfo = "";
|
|
|
+ this.pics = [];
|
|
|
+ this.videos = [];
|
|
|
+ this.warningRecordList = [];
|
|
|
+ this.form = { fileList: [] };
|
|
|
+ this.riskText = "";
|
|
|
+ this.isAddRecord = false;
|
|
|
+ this.disabled = false;
|
|
|
+
|
|
|
+ await this.getChildInfo();
|
|
|
+ this.getWarningReasons();
|
|
|
+ this.getStreetList();
|
|
|
+ },
|
|
|
+
|
|
|
+ openWarningSheet() {
|
|
|
+ this.showWarningSheet = true;
|
|
|
+ },
|
|
|
+ async handleWarningConfirm({ item, levelText }) {
|
|
|
+ try {
|
|
|
+ const res = await warningSave({
|
|
|
+ childId: this.form.childId,
|
|
|
+ warningReason: item.label,
|
|
|
+ });
|
|
|
+ if (res.code === "0000") {
|
|
|
+ this.$toast.success("保存成功");
|
|
|
+ this.showWarningSheet = false;
|
|
|
+ this.childInfo.warningId = res.data.id;
|
|
|
+ this.childInfo.warningLevel = res.data.warningLevel;
|
|
|
+ this.riskText = levelText;
|
|
|
+ this.getWarningRecordList();
|
|
|
+ }
|
|
|
+ } catch (err) {
|
|
|
+ this.$toast.fail("保存失败");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ checkWarningDetail() {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/followUp/warningDetail",
|
|
|
+ query: { id: this.childInfo.warningId },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ addNoteHandle() {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/followUp/addNote",
|
|
|
+ query: {
|
|
|
+ warningId: this.childInfo.warningId,
|
|
|
+ warningLevel: this.childInfo.warningLevel,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ checkNoteHandle(e) {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/followUp/checkNote",
|
|
|
+ query: { id: e.id, warningLevel: this.childInfo.warningLevel },
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
validator(val) {
|
|
|
- return /^1(3|4|5|6|7|8|9)\d{9}$/.test(val)
|
|
|
+ return /^1(3|4|5|6|7|8|9)\d{9}$/.test(val);
|
|
|
},
|
|
|
async getChildInfo() {
|
|
|
- const res = await getChildInfo({ id: this.id })
|
|
|
- this.childInfo = res.data
|
|
|
- this.form.childId = res.data.childId
|
|
|
+ const res = await getChildInfo({ id: this.$route.query.childId });
|
|
|
+ this.childInfo = res.data;
|
|
|
+ this.form.childId = res.data.childId;
|
|
|
+ this.getWarningRecordList();
|
|
|
},
|
|
|
formatter(type, val) {
|
|
|
- if (type === 'year') {
|
|
|
- return val + '年'
|
|
|
- }
|
|
|
- if (type === 'month') {
|
|
|
- return val + '月'
|
|
|
- }
|
|
|
- if (type === 'day') {
|
|
|
- return val + '日'
|
|
|
- }
|
|
|
- return val
|
|
|
+ if (type === "year") return val + "年";
|
|
|
+ if (type === "month") return val + "月";
|
|
|
+ if (type === "day") return val + "日";
|
|
|
+ return val;
|
|
|
},
|
|
|
timeFormat(time) {
|
|
|
- // 时间格式化 2019-09-08
|
|
|
- let year = time.getFullYear()
|
|
|
- let month = time.getMonth() + 1
|
|
|
- if (month < 10) {
|
|
|
- month = '0' + month
|
|
|
- }
|
|
|
-
|
|
|
- let day = time.getDate()
|
|
|
- if (day < 10) {
|
|
|
- day = '0' + day
|
|
|
- }
|
|
|
- return year + '-' + month + '-' + day
|
|
|
+ let year = time.getFullYear();
|
|
|
+ let month = time.getMonth() + 1;
|
|
|
+ let day = time.getDate();
|
|
|
+ if (month < 10) month = "0" + month;
|
|
|
+ if (day < 10) day = "0" + day;
|
|
|
+ return year + "-" + month + "-" + day;
|
|
|
},
|
|
|
showPopup() {
|
|
|
- this.show = !this.show
|
|
|
+ this.show = !this.show;
|
|
|
},
|
|
|
streetshowPopup() {
|
|
|
- this.streetShow = !this.streetShow
|
|
|
+ this.streetShow = !this.streetShow;
|
|
|
},
|
|
|
onChange() {},
|
|
|
onConfirm(value) {
|
|
|
- this.form.streetName = value.name
|
|
|
- this.form.areaId = value.id
|
|
|
- this.streetShow = false
|
|
|
+ this.form.streetName = value.name;
|
|
|
+ this.form.areaId = value.id;
|
|
|
+ this.streetShow = false;
|
|
|
},
|
|
|
dateConfirm(v) {
|
|
|
- console.log(v)
|
|
|
- this.form.followDate = this.timeFormat(v)
|
|
|
- this.show = false
|
|
|
+ this.form.followDate = this.timeFormat(v);
|
|
|
+ this.show = false;
|
|
|
},
|
|
|
async saveFollowUp() {
|
|
|
if (this.pics.length == 0) {
|
|
|
- this.$toast.fail('请选择至少一张图片')
|
|
|
- return
|
|
|
+ this.$toast.fail("请选择至少一张图片");
|
|
|
+ return;
|
|
|
}
|
|
|
- this.form.pics = this.pics.join(',')
|
|
|
- this.form.videos = this.videos.join(',')
|
|
|
- var data = JSON.parse(JSON.stringify(this.form))
|
|
|
- data.followDate = data.followDate + ' 00:00:00'
|
|
|
- const res = await saveFollowUp(data)
|
|
|
- if (res.code == '0000') {
|
|
|
- this.disabled = true
|
|
|
- this.$toast.success('成功')
|
|
|
- this.$router.go(-1)
|
|
|
+ this.form.pics = this.pics.join(",");
|
|
|
+ this.form.videos = this.videos.join(",");
|
|
|
+ this.form.warningId = this.childInfo.warningId;
|
|
|
+ this.form.warningLevel = this.childInfo.warningLevel;
|
|
|
+ var data = JSON.parse(JSON.stringify(this.form));
|
|
|
+ data.followDate = data.followDate + " 00:00:00";
|
|
|
+ const res = await saveFollowUp(data);
|
|
|
+ if (res.code == "0000") {
|
|
|
+ this.disabled = true;
|
|
|
+ this.$toast.success("成功");
|
|
|
+ this.$router.go(-1);
|
|
|
}
|
|
|
},
|
|
|
async getStreetList() {
|
|
|
- const res = await getStreetList()
|
|
|
- this.streetList = res.data
|
|
|
+ const res = await getStreetList();
|
|
|
+ this.streetList = res.data;
|
|
|
},
|
|
|
getfileList(v, index) {
|
|
|
if (index == undefined) {
|
|
|
if (
|
|
|
- v.indexOf('.png') != -1 ||
|
|
|
- v.indexOf('.jpg') != -1 ||
|
|
|
- v.indexOf('.jpeg') != -1
|
|
|
- ) {
|
|
|
- this.pics.push(v)
|
|
|
- } else {
|
|
|
- this.videos.push(v)
|
|
|
- }
|
|
|
+ v.indexOf(".png") != -1 ||
|
|
|
+ v.indexOf(".jpg") != -1 ||
|
|
|
+ v.indexOf(".jpeg") != -1
|
|
|
+ )
|
|
|
+ this.pics.push(v);
|
|
|
+ else this.videos.push(v);
|
|
|
} else {
|
|
|
- if (v == '图片') {
|
|
|
- this.pics.splice(index, 1)
|
|
|
- } else {
|
|
|
- this.videos.splice(index, 1)
|
|
|
- }
|
|
|
+ v == "图片" ? this.pics.splice(index, 1) : this.videos.splice(index, 1);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async getWarningRecordList() {
|
|
|
+ const res = await warningRecordList({
|
|
|
+ id: this.childInfo.warningId,
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 30,
|
|
|
+ });
|
|
|
+ if (res.code == "0000") {
|
|
|
+ this.warningRecordList = res.data.records;
|
|
|
+ this.checkIsAddRecord();
|
|
|
}
|
|
|
},
|
|
|
+ async getWarningReasons() {
|
|
|
+ const res = await warningReasons();
|
|
|
+ let arr = [];
|
|
|
+ for (let key in res.data) arr.push({ value: key, label: res.data[key] });
|
|
|
+ this.warningList = arr;
|
|
|
+ },
|
|
|
+ checkIsAddRecord() {
|
|
|
+ if (!this.warningRecordList || this.warningRecordList.length === 0) {
|
|
|
+ this.isAddRecord = true;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const temp = this.warningRecordList.some(
|
|
|
+ (item) => item.disposalResult === "风险解除"
|
|
|
+ );
|
|
|
+ this.isAddRecord = !temp;
|
|
|
+ },
|
|
|
},
|
|
|
-}
|
|
|
+};
|
|
|
</script>
|
|
|
+
|
|
|
<style lang="scss" scoped>
|
|
|
.tx {
|
|
|
width: 160px;
|
|
|
height: 160px;
|
|
|
+ object-fit: cover;
|
|
|
+ border-radius: 8px;
|
|
|
}
|
|
|
.message {
|
|
|
padding: 0 30px;
|
|
|
@@ -279,7 +532,6 @@ export default {
|
|
|
height: 200px;
|
|
|
margin: 0 20px;
|
|
|
}
|
|
|
-
|
|
|
img {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
@@ -287,7 +539,6 @@ export default {
|
|
|
video {
|
|
|
width: 100%;
|
|
|
}
|
|
|
- // background-color: chocolate;
|
|
|
}
|
|
|
.van-uploader {
|
|
|
position: absolute;
|
|
|
@@ -299,7 +550,6 @@ export default {
|
|
|
height: 200px;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
::v-deep .van-uploader__preview {
|
|
|
margin: 0 20px;
|
|
|
.van-uploader__file {
|
|
|
@@ -309,7 +559,6 @@ export default {
|
|
|
width: 200px;
|
|
|
height: 200px;
|
|
|
opacity: 0;
|
|
|
- // margin: 20px;
|
|
|
}
|
|
|
width: 200px;
|
|
|
height: 200px;
|
|
|
@@ -323,4 +572,4 @@ export default {
|
|
|
color: #333;
|
|
|
-webkit-text-fill-color: unset;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|