Commit 474b475f authored by 吴卿华's avatar 吴卿华

化工巡检

parent 5507eeeb
......@@ -93,6 +93,17 @@ public class TNfcSettingController extends BaseController
return AjaxResult.success(tNfcSettingService.selectTNfcSettingById(nfcId));
}
/**
* 巡检打卡详细信息
* @param recordId
* @return
*/
@GetMapping(value = "getPunchClockList/{recordId}")
public AjaxResult getPunchClockList( @PathVariable("recordId") Long recordId)
{
return AjaxResult.success(tNfcSettingService.getPunchClockList(recordId));
}
/**
* 根据nfcNum获取巡检详细信息
*/
......
......@@ -18,6 +18,8 @@ public class TNfcSetting extends BaseEntity
/** nfc_id */
private Long nfcId;
private Long TNfcSetting;
/** 排序 */
@Excel(name = "排序")
private Integer patrolSort;
......@@ -64,7 +66,13 @@ public class TNfcSetting extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String applyWorkEndTime;
public Long getTNfcSetting() {
return TNfcSetting;
}
public void setTNfcSetting(Long TNfcSetting) {
this.TNfcSetting = TNfcSetting;
}
public String getApplyWorkStartTime() {
return applyWorkStartTime;
......
......@@ -80,4 +80,11 @@ public interface TNfcSettingMapper
* @return
*/
int getNfcNum(String nfcNum);
/**
* 巡检打卡详细信息
* @param recordId
* @return
*/
TNfcRecord getPunchClockList(Long recordId);
}
......@@ -73,4 +73,11 @@ public interface ITNfcSettingService
* @return
*/
List<TNfcRecord> punchClockList(TNfcSetting tNfcSetting);
/**
* 巡检打卡详细信息
* @param recordId
* @return
*/
TNfcRecord getPunchClockList(Long recordId);
}
......@@ -127,4 +127,14 @@ public class TNfcSettingServiceImpl implements ITNfcSettingService
public List<TNfcRecord> punchClockList(TNfcSetting tNfcSetting) {
return tNfcSettingMapper.punchClockList(tNfcSetting);
}
/**
* 巡检打卡详细信息
* @param recordId
* @return
*/
@Override
public TNfcRecord getPunchClockList(Long recordId) {
return tNfcSettingMapper.getPunchClockList(recordId);
}
}
......@@ -5,6 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.zehong.system.mapper.TNfcSettingMapper">
<resultMap type="TNfcSetting" id="TNfcSettingResult">
<result property="recordId" column="record_id" />
<result property="nfcId" column="nfc_id" />
<result property="patrolSort" column="patrol_sort" />
<result property="patrolAddress" column="patrol_address" />
......@@ -98,7 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--巡检打卡查询列表-->
<select id="punchClockList" resultType="com.zehong.system.domain.TNfcRecord">
select a.is_normal as isNormal,a.remarks as remarks ,a.create_time as createTime,
select a.record_id as recordId,a.is_normal as isNormal,a.remarks as remarks ,a.create_time as createTime,
b.patrol_address as patrolAddress,b.patrol_coment as patrolComent,b.patrol_frequency as patrolFrequency,
c.nick_name as nickName,
d.dict_label as dictLabel
......@@ -127,4 +128,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getNfcNum" resultType="java.lang.Integer">
select count(nfc_id) from t_nfc_setting where nfc_num=#{nfcNum}
</select>
<!--巡检打卡详细信息-->
<select id="getPunchClockList" resultType="com.zehong.system.domain.TNfcRecord">
select a.is_normal as isNormal,a.picture,a.remarks as remarks ,a.create_time as createTime,
b.patrol_address as patrolAddress,b.patrol_coment as patrolComent,b.patrol_frequency as patrolFrequency,
c.nick_name as nickName,
d.dict_label as dictLabel
from t_nfc_record a left join t_nfc_setting b on a.nfc_id=b.nfc_id
left join sys_user c on a.create_user=c.user_id
left join sys_dict_data d on b.region=d.dict_value
where
b.is_del='0' and d.dict_type='t_nfc_region'
and a.record_id=#{recordId}
</select>
</mapper>
......@@ -38,7 +38,7 @@
"clipboard": "2.0.6",
"core-js": "^3.19.1",
"echarts": "^5.3.3",
"element-ui": "2.15.0",
"element-ui": "^2.15.10",
"file-saver": "2.0.4",
"fuse.js": "6.4.3",
"highlight.js": "9.18.5",
......
......@@ -16,7 +16,13 @@ export function getSetting(nfcId) {
method: 'get'
})
}
//查询巡检打卡详情
export function getPunchClockList(recordId) {
return request({
url: '/system/inspection/getPunchClockList/' +recordId,
method: 'get',
})
}
// 新增setting
export function addSetting(data) {
return request({
......
......@@ -105,16 +105,16 @@
<span slot-scope="scope" style="color: red" v-if="scope.row.isNormal==0">异常</span>
<span slot-scope="scope" v-else-if="scope.row.isNormal==1">正常</span>
</el-table-column>
<el-table-column label="上报时间" align="center" prop="createTime" width="150"/>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['system:setting:edit']"-->
<!-- >修改</el-button>-->
<el-table-column label="上报时间" align="center" prop="createTime" width="170" />
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:setting:edit']"
>详情</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
......@@ -122,10 +122,46 @@
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['system:setting:remove']"-->
<!-- >删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</template>
</el-table-column>
</el-table>
<!-- <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>-->
<!-- <el-descriptions title="垂直带边框列表" direction="vertical" :column="4" border>-->
<!-- <el-descriptions-item label="用户名">kooriookami</el-descriptions-item>-->
<!-- <el-descriptions-item label="手机号">18100000000</el-descriptions-item>-->
<!-- <el-descriptions-item label="居住地" :span="2">苏州市</el-descriptions-item>-->
<!-- <el-descriptions-item label="备注">-->
<!-- <el-tag size="small">学校</el-tag>-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item label="联系地址">江苏省苏州市吴中区吴中大道 1188 号</el-descriptions-item>-->
<!-- </el-descriptions>-->
<!-- </el-dialog>-->
<el-dialog :title="title" :visible.sync="open" width="1100px" append-to-body>
<el-descriptions :model="form" :column="2" border>
<el-descriptions-item label="巡检区域">{{form.dictLabel}}</el-descriptions-item>
<el-descriptions-item :span="2" label="巡检地点" >{{form.patrolAddress}}</el-descriptions-item>
<el-descriptions-item :span="2" label="巡检内容">{{form.patrolComent}}</el-descriptions-item>
<el-descriptions-item label="巡检频次" >{{form.patrolFrequency}}</el-descriptions-item>
<el-descriptions-item label="巡检结果" >
<el-tag v-if="form.isNormal==0" size="danger">异常</el-tag>
<el-tag v-else-if="form.isNormal==1" size="small">正常</el-tag>
</el-descriptions-item>
<el-descriptions-item label="图片" >
<el-image size="small" :preview-src-list="srcList" :src="form.picture" ></el-image>
</el-descriptions-item>
<el-descriptions-item :span="4" label="上报人">{{form.nickName}}</el-descriptions-item>
<el-descriptions-item :span="2" label="上报时间">{{form.createTime}}</el-descriptions-item>
<el-descriptions-item label="备注">{{form.remarks}}</el-descriptions-item>
</el-descriptions>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<pagination
v-show="total>0"
:total="total"
......@@ -135,34 +171,43 @@
/>
<!-- 添加或修改setting对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="排序" prop="patrolSort">
<el-input v-model="form.patrolSort" placeholder="请输入排序" />
</el-form-item>
<el-form-item label="巡检地点" prop="patrolAddress">
<el-input v-model="form.patrolAddress" placeholder="请输入巡检地点" />
</el-form-item>
<el-form-item label="巡检频次" prop="patrolFrequency">
<el-input v-model="form.patrolFrequency" placeholder="请输入巡检频次" />
</el-form-item>
<el-form-item label="nfc编号" prop="nfcNum">
<el-input v-model="form.nfcNum" placeholder="请输入nfc编号" />
</el-form-item>
<el-form-item label="巡检内容" prop="patrolComent">
<el-input v-model="form.patrolComent" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!-- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>-->
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="80px">-->
<!-- <el-form-item label="巡检地点" >-->
<!-- <el-input v-model="form.patrolAddress" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="巡检区域" >-->
<!-- <el-input v-model="form.dictLabel" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="巡检频次">-->
<!-- <el-input v-model="form.patrolFrequency" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="上报人">-->
<!-- <el-input v-model="form.nickName" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="巡检结果">-->
<!-- <el-input v-if="form.isNormal==0" value="异常" />-->
<!-- <el-input v-else-if="form.isNormal==1" value="正常" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="上报时间" prop="nfcNum">-->
<!-- <el-input v-model="form.createTime" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="巡检内容" prop="createTime">-->
<!-- <el-input v-model="form.patrolComent" type="textarea" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="备注" prop="createTime">-->
<!-- <el-input v-model="form.remarks" type="textarea" />-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <div slot="footer" class="dialog-footer">-->
<!-- <el-button @click="cancel">取 消</el-button>-->
<!-- </div>-->
<!-- </el-dialog>-->
</div>
</template>
<script>
import { listSetting, getSetting, delSetting, addSetting, updateSetting, exportPunchClockList } from "@/api/system/statistics.js";
import { listSetting, getPunchClockList, delSetting, addSetting, updateSetting, exportPunchClockList } from "@/api/system/statistics.js";
export default {
name: "Setting",
......@@ -170,6 +215,9 @@ export default {
},
data() {
return {
srcList: [
],
region:null,
activeName: '0',
// 遮罩层
......@@ -242,6 +290,7 @@ export default {
// 表单重置
reset() {
this.form = {
recordId:null,
nfcId: null,
patrolSort: null,
patrolAddress: null,
......@@ -279,11 +328,13 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const nfcId = row.nfcId || this.ids
getSetting(nfcId).then(response => {
const recordId = row.recordId || this.ids
getPunchClockList(recordId).then(response => {
this.srcList = []
this.srcList.push(response.data.picture)
this.form = response.data;
this.open = true;
this.title = "修改化工车间巡检信息";
this.title = "化工车间打卡信息";
});
},
/** 提交按钮 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment