Commit 620e44f5 authored by 李苏's avatar 李苏 💬

维护风险接口

parent 79ee169b
<template>
<div class="min_full" style="height: calc(84vh - 75px);">
<div v-show="queryParams.mid" class="min_full" style="height: calc(84vh - 75px);">
<!-- 按钮操作-->
<el-row class="tool-bar">
<PrintButton :app='app'></PrintButton>
......@@ -23,104 +23,58 @@
<script>
/* 引入需要的接口*/
import {
QueryAppversion,
QueryApptype,
AddAppversion,
DelAppversion,
UpdateAppversion
} from "common/src/api/system/dmgSystem.js";
doQueryJcnr,
doAddJcnr,
doUpdateJcnr,
doDeleteJcnr
} from '@/api/riskPrecontrol/screeningCriteria';
/* edit页面*/
import Edit from './contentEdit.vue'
import {tableMixin} from 'common'
export default {
mixins: [tableMixin],
name: 'appVersion',
/* 初始额外赋值*/
async mounted() {
await this.$asRun(
[QueryApptype(),
res => {
var data = res['data']['records'];
let typeMap = []
for (var i in data) {
typeMap[data[i].id] = data[i].name
}
this.systemType = data
this.typeMap = typeMap
}
]
)
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/*需要的额外参数 */
typeMap: [],
systemType: [],
baseUrl: 'kzzx/appversion',
baseUrl: '/aqgl/fxyk/fxjcnr',
/* 查询参数*/
queryParams: {},
/* 表格标题对应参数*/
tableTitle: [{
prop: 'appid',
label: 'APPID',
width: '120'
},
{
prop: 'name',
label: 'APP名称',
width: '120'
},
{
prop: 'type',
label: '系统类型',
width: '120',
formatter: (row, column, cellValue, index) => {
var text = this.typeMap[cellValue]
return text;
}
},
{
prop: 'version',
label: 'app版本',
width: '120'
},
{
prop: 'url',
label: '下载路径',
width: '350'
},
{
prop: 'bz',
label: '备注',
width: '140'
},
{
prop: 'whr',
label: '维护人',
width: '100'
},
{
prop: 'whsj',
label: '维护时间',
...this.$common('ftDateTime')
queryParams: {
mid:''
},
/* 表格标题对应参数*/
tableTitle: [{label: "标准ID", prop: "mid", fieldType: "ftString",width:192},
{label: "检查内容", prop: "nr", fieldType: "ftString",width:300},
{label: "检查分值", prop: "jcfz", fieldType: "float"},
{label: "备注", prop: "bz", fieldType: "ftString",width:300},
{label: "维护人", prop: "whr", fieldType: "ftString"},
{label: "维护时间", prop: "whsj", fieldType: "ftDateTime"},
{label: "创建人", prop: "cjr", fieldType: "ftString"},
{label: "创建时间", prop: "cjsj", fieldType: "ftDateTime"},
]
}
},
methods: {
/* 基础查询*/
query: QueryAppversion,
query: doQueryJcnr,
/* 基础增*/
apiAdd: AddAppversion,
apiAdd: doAddJcnr,
/* 基础更新*/
apiUpdate: UpdateAppversion,
apiUpdate: doUpdateJcnr,
/* 删除操作*/
apiDelete: DelAppversion,
apiDelete: doDeleteJcnr,
/* 初始化赋值操作*/
},
/* 注册组件*/
components: {
Edit
}
}
</script>
......
<template>
<RelDialog :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<!-- 填写表单内容,slot=form必写-->
<el-form slot="form" ref="form" :model="form" label-width="80px" :rules="rules">
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="标准ID" ref="mid" prop="mid">
<el-input :readonly="readonly" v-model="form.mid" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="检查内容" ref="nr" prop="nr">
<el-input type="textarea" :readonly="readonly" v-model="form.nr" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="检查分值" ref="jcfz" prop="jcfz">
<el-input :readonly="readonly" v-model="form.jcfz" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="备注" ref="bz" prop="bz">
<el-input :readonly="readonly" v-model="form.bz" ></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row :gutter="20">
<el-col :span="24">
<el-form-item label="系统版本" ref="sysversion" prop="sysversion">
<el-input :readonly="readonly" v-model="form.sysversion" ></el-input>
</el-form-item>
</el-col>
</el-row> -->
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {editMixin} from 'common'
export default {
mixins: [editMixin],
/* 存放index页面传递的额外参数*/
mounted() {
this.form.mid=this.app.queryParams.mid
},
/* 组件名称*/
name: "aqgl/fxykFxjcnrEdit",
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data() {
return {
/* 额外初始化,根据需求*/
systemType: [],
bmList: [],
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
id:'',
mid:'',
nr:'',
jcfz:'',
bz:'',
whrid:'',
whr:'',
whsj:new Date().getTime(),
cjrid:'',
cjr:'',
cjsj:new Date().getTime(),
sysversion:'',
},
/* form提交时的规则,具体规则参考官网*/
rules: {
}
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>
<template>
<div class="form-detail">
<el-form ref="form" label-width='auto' :model="form" >
<el-form v-if="details.hasOwnProperty('id')" ref="form" label-width='auto' >
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="部门或分厂">
<el-input >
<el-input :value="details.bmid" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="车间">
<el-input >
<el-input :value="details.cjid" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="岗位">
<el-input >
<el-input :value="details.gwid" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="地点">
<el-form-item :value="details.fxpcdd" label="地点">
<el-input >
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="作业活动设施风险点">
<el-input >
<el-input :value="details.fxd" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="事故类型">
<el-input >
<el-input :value="details.sglx" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="危险等级">
<el-input >
<el-input :value="details.wxdj" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="危险分值">
<el-input >
<el-input :value="details.fz" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label=" 风险类型">
<el-input >
<el-input :value="details.fxlx" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="管控措施落实后等级">
<el-input >
<el-input :value="details.lsdj" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="管理层级">
<el-input >
<el-input :value="details.glcj" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="拍照选项">
<el-input >
<el-input :value="details.pzxx" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="检查要点">
<el-input type="textarea">
<el-input :value="details.jcyd" type="textarea">
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="危害因素">
<el-input type="textarea" >
<el-input :value="details.whys" type="textarea" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="事故后果">
<el-input type="textarea">
<el-input :value="details.sghg" type="textarea">
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="检查措施描述">
<el-input type="textarea">
<el-input :value="details.jccsms" type="textarea">
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注">
<el-input type="textarea" >
<el-input :value="details.bz" type="textarea" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="序号">
<el-input >
<el-input :value="details.xh" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="图形编号">
<el-input >
<el-input :value="details.txcode" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="措施类型">
<el-input >
<el-input :value="details.cslx" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="基准精度">
<el-input >
<el-input :value="details.jzjd" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="基准维度">
<el-input >
<el-input :value="details.jzwd" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="责任人">
<el-input >
<el-input :value="details.zrrName" >
</el-input>
</el-form-item>
</el-col>
......@@ -154,13 +154,13 @@
export default {
data() {
return {
details:{}
}
},
methods: {
}
}
}
}
</script>
<style scoped>
......
......@@ -47,13 +47,13 @@
<!-- tabs -->
<el-tabs v-model="activeName" @tab-click="handleClick" >
<el-tab-pane label="详细" name="first" >
<Details />
<Details ref="Details" />
</el-tab-pane>
<el-tab-pane label="检查周期" name="second">
<Cycle />
</el-tab-pane>
<el-tab-pane label="检查内容" name="third">
<Content />
<Content ref="Content" />
</el-tab-pane>
<el-tab-pane label="责任人" name="fourth">
<PersonLiable />
......@@ -92,7 +92,6 @@
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
console.log(_)
},
data() {
return {
......@@ -103,7 +102,7 @@
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'kzzx/role',
baseUrl: '/aqgl/fxyk/fxbz',
/* 查询参数*/
queryParams: {
ksrq: '',
......@@ -111,125 +110,60 @@
},
/* 表格标题对应参数*/
tableTitle: [
{
prop: 'whsj',
label: '时间',
show:false,
fieldType:'ftDateTime',
width: '100',
align:'left'
},
{
prop: 'whsj',
label: '车间',
...this.$common('ftDateTime')
},
{
prop: 'whr',
label: '岗位',
width: '100'
},
{
prop: 'whr',
label: '地点',
width: '100'
},
{
prop: 'whr',
label: '作业活动设施风险点',
width: '100'
},
{
prop: 'whr',
label: '事故类型',
width: '100'
},
{
prop: 'whr',
label: '危险等级',
width: '100'
},
{
prop: 'whr',
label: '危险分值',
width: '100'
},
{
prop: 'whr',
label: '风险类型',
width: '100'
},
{
prop: 'whr',
label: '管控措施落实后等级',
width: '100'
},
{
prop: 'whr',
label: '管理层级',
width: '100'
},
{
prop: 'whr',
label: '拍照选项',
width: '100'
},
{
prop: 'whr',
label: '序号',
width: '100'
},
{
prop: 'whr',
label: '图形编号',
width: '100'
},
{
prop: 'whr',
label: '措施类型',
width: '100'
}
{label: "部门ID", prop: "bmid", fieldType: "ftString",width:192},
{label: "车间ID", prop: "cjid", fieldType: "ftString",width:192},
{label: "岗位ID", prop: "gwid", fieldType: "ftString",width:192},
{label: "风险地点", prop: "fxpcdd", fieldType: "ftString",width:300},
{label: "风险点", prop: "fxd", fieldType: "ftString",width:300},
{label: "事故类型", prop: "sglx", fieldType: "ftString",width:192},
{label: "危险等级", prop: "wxdj", fieldType: "ftString",width:160},
{label: "分值", prop: "fz", fieldType: "float"},
{label: "风险类型", prop: "fxlx", fieldType: "ftString",width:192},
{label: "管控落实后等级", prop: "lsdj", fieldType: "ftString",width:160},
{label: "管理层级", prop: "glcj", fieldType: "ftString",width:160},
{label: "拍照选项", prop: "pzxx", fieldType: "ftString",width:160},
{label: "序号", prop: "xh", fieldType: "int"},
{label: "图形编号", prop: "txcode", fieldType: "ftString",width:180},
{label: "措施类型", prop: "cslx", fieldType: "ftString",width:192},
// {label: "基准精度", prop: "jzjd", fieldType: "ftString",width:160},
// {label: "基准维度", prop: "jzwd", fieldType: "ftString",width:160},
// {label: "检查要点", prop: "jcyd", fieldType: "ftString",width:300},
// {label: "危害因素", prop: "whys", fieldType: "ftString",width:300},
// {label: "事故后果", prop: "sghg", fieldType: "ftString",width:300},
// {label: "检查措施描述", prop: "jccsms", fieldType: "ftString",width:300},
// {label: "备注", prop: "bz", fieldType: "ftString",width:300},
// {label: "责任人", prop: "zrr", fieldType: "ftString",width:300},
// {label: "维护人", prop: "whr", fieldType: "ftString"},
// {label: "维护时间", prop: "whsj", fieldType: "ftDateTime"},
// {label: "创建人", prop: "cjr", fieldType: "ftString"},
// {label: "创建时间", prop: "cjsj", fieldType: "ftDateTime"},
]
}
},
methods: {
handleClick(val){
console.log(val,'val')
},
/* 基础查询*/
query: QueryKzzxRole,
query: doQuery,
/* 基础增*/
apiAdd: AddKzzxRole,
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: UpdateKzzxRole,
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: DeleteKzzxRole,
apiDelete: doDelete,
/* 初始化赋值操作*/
init() {
},
/* 启用停用*/
setEnable(id) {
this.$confirm('是否启用/停用该角色, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {
id: id
}
QtKzzxRole(params).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.$refs['TablePager'].reLoad()
} else {
this.$error(res.message || '操作失败')
}
/* 重写点击事件*/
getRow: function(e) {
this.rowItem = e
this.$refs.Details.details=e
this.$refs.Content.queryParams.mid=e.id
this.$nextTick(()=>{
this.$refs.Content.$refs['TablePager'].pageQuery()
})
})
}
......
......@@ -88,13 +88,13 @@
methods: {
/* 基础查询*/
query: doQuery,
query: doQueryJcnr,
/* 基础增*/
apiAdd: doAdd,
apiAdd: doAddJcnr,
/* 基础更新*/
apiUpdate: doUpdate,
apiUpdate: doUpdateJcnr,
/* 删除操作*/
apiDelete: doDelete,
apiDelete: doDeleteJcnr,
/* 初始化赋值操作*/
init() {
......
......@@ -14,7 +14,6 @@
</div>
<!-- 按钮操作-->
<el-row class="tool-bar">
<PrintButton :app='app'></PrintButton>
<ViewButton ref="view" :app='app'></ViewButton>
<AddButton ref="add" :app='app'></AddButton>
<CopyButton ref="copy" :app='app'></CopyButton>
......
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