123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796 |
- <template>
- <div class="records">
- <div class="header" style="flex-direction: row-reverse">
- <el-button @click="backPageHandler">返回</el-button>
- <el-button style="margin: 0px 10px" type="primary" @click="handleSave"
- >保存</el-button
- >
- <el-button :disabled="isDisableExport" @click="handleExport"
- >导出</el-button
- >
- </div>
- <h3 class="title">现 场 勘 验 笔 录</h3>
- <div class="content">
- <div class="line" style="flex-direction: row-reverse">
- <el-input
- class="input"
- v-model="data.inquestNum"
- placeholder=""
- style="width: 280px"
- />
- <span>现场勘验号:</span>
- </div>
- <div class="line">
- <span>现场勘验单位:</span>
- <el-input
- class="input"
- v-model="data.deptName"
- placeholder=""
- style="width: 100%"
- />
- </div>
- <div class="line">
- <span>指派/报告单位:</span>
- <el-input
- class="input"
- v-model="data.reportDept"
- placeholder=""
- style="width: 100%"
- />
- </div>
- <div class="line">
- <span>勘验时间: </span>
- <div>
- <el-date-picker
- class="input"
- v-model="data.inquestTime"
- type="datetime"
- placeholder="勘验时间"
- value-format="YYYY-MM-DD HH:mm:ss"
- style="width: 200px"
- />
- </div>
- </div>
- <div class="textarea">
- <span>勘验事由: </span>
- <el-input
- type="textarea"
- :rows="6"
- v-model="data.inquestResource"
- placeholder="报警人:xxx(性别:xxx 电话:xxx)报警称:xxx发生一起:xxx案,现场需勘察。接报后技术科科长:xxx带领技术员:xxx、法医:xxx立即赶赴现场进行勘察."
- style="width: 100%"
- />
- </div>
- <div class="line">
- <span>现场勘验时间: </span>
- <div>
- <el-date-picker
- class="input"
- v-model="data.times"
- type="datetimerange"
- range-separator="至"
- start-placeholder="现场勘验开始时间"
- end-placeholder="现场勘验结束时间"
- />
- </div>
- </div>
- <div class="line">
- <span>现场地点:</span>
- <el-input
- class="input"
- type="text"
- v-model="data.address"
- placeholder=""
- style="width: 100%"
- />
- </div>
- <div class="line">
- <span>现场保护情况:</span>
- <el-input
- class="input"
- type="text"
- v-model="data.protectionSituation"
- placeholder=""
- style="width: 100%"
- />
- </div>
- <div class="line">
- <span>现场保护人: </span>
- <span>姓名</span>
- <!-- 单位 XX派出所 职务 一级警长 -->
- <el-input
- class="input"
- type="text"
- v-model="data.protector.name"
- placeholder=""
- style="width: 180px"
- />
- <span>单位</span>
- <el-input
- class="input"
- type="text"
- v-model="data.protector.unit"
- placeholder=""
- style="width: 200px"
- />
- <span>职务</span>
- <el-input
- class="input"
- type="text"
- v-model="data.protector.job"
- placeholder=""
- style="width: 200px"
- />
- </div>
- <!-- protectionMeasures -->
- <div class="line">
- <span>保护措施: </span>
- <el-checkbox-group v-model="data.protectionMeasures">
- <el-checkbox :value="0" label="专人看护现场,防止他人进入" />
- <el-checkbox :value="1" checked label="设立警戒带,划定禁行区域" />
- <el-checkbox :value="2" label="其他措施" />
- </el-checkbox-group>
- </div>
- <div class="line">
- <span>现场情况: </span>
- <el-checkbox-group v-model="data.situation">
- <el-checkbox :value="0" label="原始现场" />
- <el-checkbox :value="1" checked label="变动现场" />
- </el-checkbox-group>
- </div>
- <!-- changeReason -->
- <div class="line">
- <span>变动原因: </span>
- <el-checkbox-group v-model="data.changeReason">
- <el-checkbox
- v-for="reason in ChangeReasonType"
- :value="reason.id"
- :label="reason.name"
- >
- </el-checkbox>
- <!-- <el-checkbox :value="0" label="事主进入" />
- <el-checkbox :value="1" label="报案人进入" />
- <el-checkbox :value="2" label="其他" /> -->
- </el-checkbox-group>
- <el-input
- class="input"
- v-model="data.changeReasonOtherValue"
- :disabled="!data.changeReason.includes(2)"
- style="margin-left: 20px; width: 200px"
- />
- </div>
- <div class="line">
- <span>天气: </span>
- <el-checkbox-group v-model="data.weatherInfo.type">
- <el-checkbox :value="0" label="阴" />
- <el-checkbox :value="1" label="晴" />
- <el-checkbox :value="2" label="雨" />
- <el-checkbox :value="3" label="雾" />
- </el-checkbox-group>
- <span style="margin-left: 20px; font-size: 12px">温度: </span>
- <el-input
- class="input"
- v-model="data.weatherInfo.temperature"
- style="width: 80px"
- /><span>℃</span>
- <span style="margin-left: 20px; font-size: 12px">湿度: </span>
- <el-input
- class="input"
- v-model="data.weatherInfo.humidity"
- style="width: 80px"
- /><span>%</span>
- <span style="margin-left: 20px; font-size: 12px">风向: </span>
- <el-input
- class="input"
- v-model="data.weatherInfo.windDirection"
- style="width: 80px"
- />
- </div>
- <div class="line">
- <span>现场勘验利用的光线: </span>
- <el-checkbox-group v-model="data.light">
- <el-checkbox :value="0" checked label="自然光" />
- <el-checkbox :value="1" checked label="灯光" />
- <el-checkbox :value="2" label="特种光" />
- </el-checkbox-group>
- </div>
- <div class="line">
- <span>现场勘验指挥人: </span>
- <span>姓名</span>
- <!-- 单位 XX派出所 职务 一级警长 -->
- <el-input
- class="input"
- type="text"
- v-model="data.inquestCommander.name"
- placeholder=""
- style="width: 180px"
- />
- <span>单位</span>
- <el-input
- class="input"
- type="text"
- v-model="data.inquestCommander.unit"
- placeholder=""
- style="width: 200px"
- />
- <span>职务</span>
- <el-input
- class="input"
- type="text"
- v-model="data.inquestCommander.job"
- placeholder=""
- style="width: 200px"
- />
- </div>
- <div class="textarea">
- <span>现场勘验情况 :</span>
- <el-input
- type="textarea"
- :rows="6"
- v-model="data.inquestSituation"
- placeholder=""
- style="width: 100%"
- />
- </div>
- <div class="line">
- <span>现场勘验制图 </span>
- <el-input-number
- class="input"
- controls-position="right"
- v-model="data.imageNum"
- style="width: 130px"
- />
- <span>张; </span>
- <span>照相</span>
- <el-input-number
- class="input"
- controls-position="right"
- v-model="data.photographNum"
- style="width: 130px"
- />
- <span>张; </span>
- <span>摄像</span>
- <el-input-number
- class="input"
- controls-position="right"
- v-model="data.photographyMinNum"
- style="width: 130px"
- />
- <span>分</span>
- <el-input-number
- class="input"
- controls-position="right"
- v-model="data.photographySecNum"
- style="width: 130px"
- />
- <span>秒</span>
- <span style="margin-left: 10px">录音</span>
- <el-input-number
- class="input"
- controls-position="right"
- v-model="data.recordingMinNum"
- style="width: 130px"
- />
- <span>分</span>
- <el-input-number
- class="input"
- controls-position="right"
- v-model="data.recordingSecNum"
- style="width: 130px"
- />
- <span>秒</span>
- </div>
- <div class="line">
- 现场勘验记录人员:
- <el-button link @click="recorderInfoDialogShow = true"
- ><el-icon :size="18"><CirclePlus /> </el-icon>
- </el-button>
- </div>
- <!-- 现场勘验记录人员 -->
- <template v-for="(info, index) in data.recorderInfo">
- <div class="line info">
- <span>{{ info.typeLabel }}: </span>
- <span>姓名</span>
- <!-- 单位 XX派出所 职务 一级警长 -->
- <el-input
- class="input"
- type="text"
- v-model="info.name"
- placeholder=""
- style="width: 180px"
- />
- <span>单位</span>
- <el-input
- class="input"
- type="text"
- v-model="info.unit"
- placeholder=""
- style="width: 200px"
- />
- <span>职务</span>
- <el-input
- class="input"
- type="text"
- v-model="info.job"
- placeholder=""
- style="width: 200px"
- />
- <el-button
- link
- class="del-btn"
- type="danger"
- @click="removeRecorderInfo(index)"
- ><el-icon :size="18"><CircleClose /> </el-icon>
- </el-button>
- </div>
- </template>
- <div class="line">
- 现场勘验人员:
- <el-button link @click="addSignatureInfo"
- ><el-icon :size="18"><CirclePlus /> </el-icon>
- </el-button>
- </div>
- <template v-for="(sign, index) of data.signatureInfo">
- <div class="line info">
- <span>本人签名: </span>
- <span>_______________ </span>
- <span>单位</span>
- <el-input
- class="input"
- type="text"
- v-model="sign.unit"
- placeholder=""
- style="width: 200px"
- />
- <span>职务</span>
- <el-input
- class="input"
- type="text"
- v-model="sign.job"
- placeholder=""
- style="width: 200px"
- />
- <el-button
- class="del-btn"
- link
- type="danger"
- @click="removeSignatureInfo(index)"
- ><el-icon :size="18"><CircleClose /> </el-icon>
- </el-button>
- </div>
- </template>
- <div class="line">
- 现场勘验见证人:
- <el-button link @click="addWitnessInfo"
- ><el-icon :size="18"><CirclePlus /> </el-icon>
- </el-button>
- </div>
- <template v-for="(witness, index) of data.witnessInfo">
- <div class="line info">
- <span>本人签名: </span>
- <span>_______________ </span>
- <span>性别</span>
- <el-select
- class="input"
- v-model="witness.sex"
- placeholder="性别"
- style="width: 140px"
- >
- <el-option :value="0" label="男" />
- <el-option :value="1" label="女" />
- </el-select>
- <span>出生日期</span>
- <el-date-picker
- class="input"
- v-model="witness.birthday"
- type="date"
- placeholder="出生日期"
- style="width: 180px"
- />
- <!-- <el-input
- class="input"
- type="text"
- v-model="witness.birthday"
- placeholder=""
- style="width: 200px"
- /> -->
- <span>住址</span>
- <el-input
- class="input"
- type="text"
- v-model="witness.address"
- placeholder=""
- style="width: 260px"
- />
- <el-button
- link
- class="del-btn"
- type="danger"
- @click="removeWitnessInfo(index)"
- ><el-icon :size="18"><CircleClose /> </el-icon>
- </el-button>
- </div>
- </template>
- <div class="textarea">
- <span>备注:</span>
- <el-input
- type="textarea"
- :rows="6"
- v-model="data.remark"
- placeholder=""
- style="width: 100%"
- />
- </div>
- <div></div>
- </div>
- <el-dialog
- v-model="recorderInfoDialogShow"
- title="增加现场勘验记录人员"
- width="500"
- align-center
- @close="recorderInfoDialogSelect = null"
- >
- <div style="width: 80%; margin: 30px auto">
- <el-select
- v-model="recorderInfoDialogSelect"
- placeholder="请选择现场勘验记录人员"
- size="large"
- >
- <el-option
- v-for="item in recorderInfoType"
- :key="item.type"
- :label="item.typeLabel"
- :value="item.type"
- />
- </el-select>
- </div>
- <template #footer>
- <div class="dialog-footer">
- <el-button type="primary" @click="addRecorderInfo"> 确定 </el-button>
- </div>
- </template>
- </el-dialog>
- </div>
- </template>
- <script setup>
- import { onMounted, ref, watch, h, computed } from "vue";
- import { reactive } from "vue";
- import { router, RouteName } from "@/router";
- import {
- getCaseInquestInfo,
- saveCaseInquestInfo,
- exportCaseInquestInfo,
- getCaseInquestInfoOld,
- } from "@/store/case";
- import { ElMessage, ElMessageBox } from "element-plus";
- import saveAs from "@/util/file-serve";
- import { CirclePlus, CircleClose } from "@element-plus/icons-vue";
- import { recorderInfoType, ChangeReasonType } from "./formData.ts";
- import { confirm } from "@/helper/message";
- const props = defineProps({ caseId: Number, title: String });
- console.log("router.currentRoute", router.currentRoute.value?.params);
- const fileId = computed(() => router.currentRoute.value?.params?.fileId);
- const caseId = computed(() => router.currentRoute.value?.params?.caseId);
- const isDisableExport = ref(false);
- const data = reactive({
- title: "",
- inquestNum: "", //现场勘验号
- deptName: "", //单位名称
- sendDept: "", //发送单位
- issuanceCount: "", // 份数
- makeTime: "", //制作时间
- recorder: "", // 笔录人
- issuanceOpinion: "", //签发意见
- reportDept: "", //报告单位
- times: [], // startTime ,endTime
- address: "", // 勘验地址
- inquestTime: "", //勘验时间
- inquestResource:
- "报警人:xxx(性别:xxx 电话:xxx)报警称:xxx发生一起:xxx案,现场需勘察。接报后技术科科长:xxx带领技术员:xxx、法医:xxx立即赶赴现场进行勘察.", //勘验范围
- protector: {
- name: "",
- unit: "",
- job: "",
- }, // 现场保护人
- protectionSituation: "", // 现场保护情况
- situation: [], //现场情况
- changeReason: [],
- changeReasonOtherValue: "",
- protectionMeasures: [], //保护措施
- weatherInfo: {
- type: [],
- temperature: "",
- humidity: "",
- windDirection: "",
- }, //天气情况
- light: [], //光线
- painter: "",
- photographer: "",
- inquestCommander: {
- name: "",
- unit: "",
- job: "",
- }, //现场勘验指挥人
- inquestSituation: "", //现场勘验情况
- imageNum: 0, //现场勘验制图数量
- photographNum: 0, //照相数量
- photographyMinNum: 0, //摄影数量
- photographySecNum: 0, //摄影数量
- recorderInfo: recorderInfoType,
- signatureInfo: [], //现场勘验人员
- witnessInfo: [],
- remark: "",
- });
- const signatureInfoNum = 4;
- const witnessInfoNum = 2;
- const recorderInfoDialogShow = ref(false);
- const recorderInfoDialogSelect = ref();
- const initInfo = async (inquestFileId) => {
- const res = await getCaseInquestInfoOld(inquestFileId || fileId.value);
- console.log("initInfo", res);
- if (!res.data) {
- isDisableExport.value = true;
- } else {
- isDisableExport.value = false;
- }
- for (var k in data) {
- if (res.data && res.data.hasOwnProperty(k)) {
- // console.log("Key is " + k);
- if (res.data[k]) {
- data[k] = res.data[k];
- }
- }
- }
- setTimeout(() => {
- initSignatureAndWitInfo();
- }, 500);
- };
- const initSignatureAndWitInfo = () => {
- (data.recorderInfo.length === 0 || !data.recorderInfo) &&
- (data.recorderInfo = [...recorderInfoType, recorderInfoType[4]]);
- (data.signatureInfo.length === 0 || !data.signatureInfo) &&
- Array.from(new Array(signatureInfoNum)).forEach(() => {
- data.signatureInfo.push({
- unit: "",
- job: "",
- });
- });
- (data.witnessInfo.length === 0 || !data.witnessInfo) &&
- Array.from(new Array(witnessInfoNum)).forEach(() => {
- data.witnessInfo.push({
- sex: 0,
- birthday: "",
- address: "",
- });
- });
- };
- onMounted(() => {
- initInfo();
- });
- const addRecorderInfo = () => {
- console.log("recorderInfoDialogSelect", recorderInfoType);
- recorderInfoDialogShow.value = false;
- if (recorderInfoDialogSelect.value) {
- const newCrew = recorderInfoType.find(
- (i) => i.type === recorderInfoDialogSelect.value
- );
- console.log("recorderInfoDialogSelect", newCrew);
- data.recorderInfo.push({
- ...newCrew,
- job: "",
- name: "",
- unit: "",
- });
- // debugger;
- }
- };
- const removeRecorderInfo = async (index) => {
- if (await confirm("确定要删除此数据?")) {
- data.recorderInfo.splice(index, 1);
- }
- };
- const addSignatureInfo = async () => {
- if (await confirm("确定要添加新的现场勘验人员?")) {
- data.signatureInfo.push({
- unit: "",
- job: "",
- });
- }
- };
- const removeSignatureInfo = async (index) => {
- if (await confirm("确定要删除此数据?")) {
- data.signatureInfo.splice(index, 1);
- }
- };
- const addWitnessInfo = async () => {
- if (await confirm("确定要添加新的现场勘验见证人?")) {
- data.witnessInfo.push({
- sex: 0,
- birthday: "",
- address: "",
- });
- }
- };
- const backPageHandler = () => {
- router.back();
- };
- const removeWitnessInfo = async (index) => {
- if (await confirm("确定要删除此数据?")) {
- data.witnessInfo.splice(index, 1);
- }
- };
- const handleSave = async () => {
- console.log("data", data);
- for (var k in data) {
- if (data && data.hasOwnProperty(k)) {
- // console.log("Key is " + k);
- if (Array.isArray(data[k])) {
- data[k] = data[k].sort((a, b) => a - b);
- }
- }
- }
- let inquestFileId = fileId.value == -1 ? "" : fileId.value;
- let params = { ...data, caseId: caseId.value, inquestFileId };
- const res = await saveCaseInquestInfo(params);
- initInfo(res.data.inquestFileId);
- console.log("saveCaseInquestInfo", res);
- if (fileId.value == -1) {
- router.replace({
- name: RouteName.records,
- params: { caseId: caseId.value, fileId: res.data?.inquestFileId },
- });
- return;
- }
- if (res.code === 0) {
- ElMessage.success("保存成功!");
- }
- };
- const handleExport = async () => {
- let inquestFileId = fileId.value == -1 ? "" : fileId.value;
- let params = { ...data, caseId: caseId.value, inquestFileId };
- await saveCaseInquestInfo(params);
- const res = await exportCaseInquestInfo(fileId.value);
- console.log("res", res);
- saveAs(res, `勘验笔录.docx`);
- };
- </script>
- <style lang="scss">
- .records {
- max-width: 1280px;
- margin: 0 auto;
- padding: 20px;
- position: relative;
- background: #fff;
- .header {
- display: flex;
- justify-content: flex-endTime;
- position: sticky;
- top: 10px;
- z-index: 1000;
- background-color: white;
- }
- .input {
- height: 32px;
- line-height: 32px;
- margin: 0 8px;
- }
- .textarea {
- margin-right: 8px;
- margin-bottom: 20px;
- span {
- padding: 10px 0;
- display: inline-block;
- }
- // margin: 0 8px;
- }
- .line {
- display: inline-flex;
- width: 100%;
- flex-direction: row;
- align-items: center;
- margin-bottom: 25px;
- line-height: 38px;
- span {
- white-space: nowrap;
- }
- }
- }
- .title {
- text-align: center;
- margin-bottom: 30px;
- }
- .sub-tit {
- display: inline-block;
- padding-bottom: 20px;
- }
- .info {
- display: block;
- .inner {
- display: flex;
- flex-direction: row;
- width: 100%;
- .input {
- flex: 1;
- }
- .sec {
- flex: 1;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- }
- }
- }
- .witnessInfo {
- background: #f5f5f5;
- padding: 15px;
- margin-top: 20px;
- margin-right: 8px;
- }
- .gap {
- margin: 15px 0;
- }
- .btn-container {
- padding: 20px 0;
- .btn {
- color: #26559b;
- width: 100%;
- &:hover {
- background: #f5f5f5;
- border-color: #dcdfe6;
- }
- }
- }
- .info {
- .del-btn {
- display: none;
- }
- &:hover {
- .del-btn {
- display: block;
- }
- }
- }
- </style>
|