Commit 6ec5a05c authored by 李苏's avatar 李苏 💬

过五关

parent c1f250de
This diff is collapsed.
......@@ -42,13 +42,12 @@
<script>
/* 引入需要的接口*/
import {
QueryKzzxRole,
QueryApptype,
AddKzzxRole,
DeleteKzzxRole,
UpdateKzzxRole,
QtKzzxRole
} from "common/src/api/system/dmgSystem.js";
doQuery,
doAdd,
doUpdate,
doDelete
} from '@/api/threeViolations/enterTV.js';
/* edit页面*/
/* edit页面*/
import Edit from './edit'
import {
......@@ -71,7 +70,7 @@
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'kzzx/role',
baseUrl: '/aqgl/swgl/swjl',
/* 查询参数*/
queryParams: {
ksrq: '',
......@@ -79,79 +78,58 @@
},
/* 表格标题对应参数*/
tableTitle: [
{
prop: 'whsj',
label: '人员工号',
...this.$common('ftDateTime')
},
{
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'
}
{label: "部门", prop: "bmName", fieldType: "ftString",width:192},
{label: "班组", prop: "bzName", fieldType: "ftString",width:192},
// {label: "违规人ID", prop: "userid", fieldType: "ftString",width:192},
{label: "违章人", prop: "wzr", fieldType: "ftString",width:192},
{label: "手机", prop: "phone", fieldType: "ftString",width:192},
{label: "违章日期", prop: "wzrq", fieldType: "ftDateTime"},
{label: "违章行为", prop: "wzxw", fieldType: "ftString",width:300},
// {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"},
// {label: "状态", prop: "zt", fieldType: "ftString",width:6},
// {label: "工作流状态", prop: "wfpname", fieldType: "ftString",width:300},
// {label: "状态", prop: "zt", fieldType: "ftString",width:6},
// {label: "曝光内容", prop: "bgcont", fieldType: "ftString",width:300},
// {label: "安全教育人", prop: "aqjyrid", fieldType: "ftString",width:192},
// {label: "安全教育时间", prop: "aqjysj", fieldType: "ftDateTime"},
// {label: "安全教育内容", prop: "aqcont", fieldType: "ftString",width:300},
// {label: "反思内容", prop: "fscont", fieldType: "ftString",width:300},
// {label: "谈话层级", prop: "ldglcj", fieldType: "ftString",width:60},
// {label: "教育人编码", prop: "ldjyrid", fieldType: "ftString",width:192},
// {label: "被教育人编码", prop: "ldbjyrid", fieldType: "ftString",width:192},
// {label: "领导教育时间", prop: "ldjysj", fieldType: "ftDateTime"},
// {label: "领导教育内容", prop: "ldcont", fieldType: "ftString",width:300},
// {label: "家属教育人", prop: "jsjyr", fieldType: "ftString",width:180},
// {label: "家属教育时间", prop: "jsjysj", fieldType: "ftDateTime"},
// {label: "家属教育内容", prop: "jscont", fieldType: "ftString",width:300},
// {label: "纠正措施", prop: "jzcs", fieldType: "ftString",width:300},
// {label: "纠正结果", prop: "jzjg", fieldType: "ftString",width:300},
// {label: "纠正验证人编码", prop: "jzyzrid", fieldType: "ftString",width:192},
// {label: "纠正验证时间", prop: "jzyzsj", fieldType: "ftDateTime"},
// {label: "处罚标志", prop: "cfbz", fieldType: "ftString",width:60},
// {label: "处罚金额", prop: "cfje", fieldType: "float"},
]
}
},
methods: {
/* 基础查询*/
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 || '操作失败')
}
})
})
}
},
......
<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="12">
<el-form-item label="序号" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="三维内容" ref="roleid" prop="roleid">
<el-input :readonly="readonly" type="textarea" v-model="form.roleid"></el-input>
<el-form-item label="三违内容" ref="content" prop="content">
<el-input type='textarea' :readonly="readonly" v-model="form.content" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="三维类型">
<el-select placeholder="请选择" style="width: 100%;" >
</el-select>
<el-form-item label="履职分类" ref="wglx" prop="wglx">
<RelSelect style="width: 100%;" src='/aqgl/swgl/swcgbz/init/wglx' clearable :match="{value:'id',label:'name'}" v-model='form.wglx' ></RelSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="罚款(元)">
<el-select placeholder="请选择" style="width: 100%;" >
</el-select>
<el-form-item label="考核分数" ref="khfs" prop="khfs">
<el-input type='number' :readonly="readonly" v-model="form.khfs" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="考核分数">
<el-input></el-input>
<el-form-item label="罚款金额下限" ref="fkjexx" prop="fkjexx">
<el-input type='number' :readonly="readonly" v-model="form.fkjexx" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="内容">
<el-input></el-input>
<el-form-item label="罚款金额上限" ref="fkjesx" prop="fkjesx">
<el-input type='number' :readonly="readonly" v-model="form.fkjesx" ></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-form>
<!-- 按钮重写, -->
<!-- <div slot="reFooter">
<span slot="footer">
重写按钮写在这里,根据需要重写 slot(reFooter,foorer) 节点样式 重写方法需要在此页重新定义
</span>
</div> -->
</RelDialog>
</template>
<script>
......@@ -55,9 +49,10 @@
mixins: [editMixin],
/* 存放index页面传递的额外参数*/
mounted() {
},
/* 组件名称*/
name: 'roleManagementEdit',
name: "maintainTVEdit",
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data() {
......@@ -66,22 +61,44 @@
/* 额外初始化,根据需求*/
systemType: [],
bmList: [],
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
roleid: '',
rolename: '',
bz: "",
//ID
id:'',
//序号
xh:'',
//三违内容
content:'',
//类型
wglx:'',
//考核分数
khfs:'',
//罚款金额下限
fkjexx:'',
//罚款金额上限
fkjesx:'',
//备注
bz:'',
//维护人编码
whrid:'',
//维护人
whr:'',
//维护时间
whsj:new Date().getTime(),
//创建人编码
cjrid:'',
//创建人
cjr:'',
//创建时间
cjsj:new Date().getTime(),
//系统版本
sysversion:'',
},
/* form提交时的规则,具体规则参考官网*/
rules: {
roleid: [{
required: true,
trigger: 'blur'
}, ],
rolename: [{
required: true,
trigger: 'blur'
}, ]
}
}
},
......
......@@ -40,15 +40,14 @@
</template>
<script>
/* 引入需要的接口*/
/* 引入需要的接口*/
import {
QueryKzzxRole,
QueryApptype,
AddKzzxRole,
DeleteKzzxRole,
UpdateKzzxRole,
QtKzzxRole
} from "common/src/api/system/dmgSystem.js";
doQuery,
doAdd,
doUpdate,
doDelete
} from '@/api/threeViolations/maintainTV';
/* edit页面*/
import Edit from './edit'
import {
......@@ -71,7 +70,7 @@
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'kzzx/role',
baseUrl: '/aqgl/swgl/swcfbz',
/* 查询参数*/
queryParams: {
ksrq: '',
......@@ -79,64 +78,36 @@
},
/* 表格标题对应参数*/
tableTitle: [
{
prop: 'whsj',
label: '三违内容',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '三违类型',
...this.$common('ftDateTime')
},
{
prop: 'whr',
label: '罚款',
width: '100'
},
{
prop: 'whr',
label: '考核分数',
width: '100'
}
{label: "序号", prop: "xh", fieldType: "int"},
{label: "三违内容", prop: "content", fieldType: "ftString",width:300},
{label: "类型", prop: "wglx", fieldType: "ftString",width:100,transform:{
url:'/aqgl/swgl/swcgbz/init/wglx',label:'name',value:'id'
}},
{label: "考核分数", prop: "khfs", fieldType: "int"},
{label: "罚款金额下限", prop: "fkjexx", fieldType: "float"},
{label: "罚款金额上限", prop: "fkjesx", 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: 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 || '操作失败')
}
})
})
}
},
......
<template>
<div class="form-detail">
<el-form ref="form" label-width='80px' :model="form" >
<el-row class="tool-bar">
<AttachFileButton :params="{childPath:'BGLX'}" :app='vMain'></AttachFileButton>
<el-button size='mini' @click.native="readonly=false;$success('开启编辑')" type="primary">编辑</el-button>
<el-button size='mini' @click.native="save()" type="primary">保存</el-button>
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<br>
<el-form ref="form" label-width='80px' >
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="通报内容">
<el-input type="textarea" rows="5" >
<el-input v-model="vMain.rowItem.bgcont" :readonly="readonly" type="textarea" rows="15" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="附件">
<el-upload
action="https://jsonplaceholder.typicode.com/posts/"
list-type="picture-card"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
</el-form-item>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</el-col>
</el-row>
</el-form>
......@@ -35,19 +30,36 @@
export default {
data() {
return {
readonly:true,
}
},
props:['vMain'],
methods: {
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
save(){
let params=this.vMain.rowItem
this.vMain.apiUpdate(params).then(res => {
if (res.success) {
this.$success('更新成功')
this.readonly=true
this.vMain.$refs['TablePager'].reLoad()
let tableData=this.vMain.$refs['TablePager'].tableData
let nowIndex=false
tableData.forEach((data,index)=>{
if(data.id==params.master.id){
nowIndex=index
}
})
if(nowIndex!==false){
this.vMain.$refs['TablePager'].tableData.splice(nowIndex,1,params.master)
this.vMain.$refs['TablePager'].setCurrent(params.master)
}
} else {
this.$error(res.message || '更新失败')
}
})
}}
}
</script>
......
<template>
<div class="form-detail">
<el-row class="tool-bar">
<AttachFileButton :params="{childPath:'JSXG'}" :app='vMain'></AttachFileButton>
<el-button size='mini' @click.native="readonly=false;$success('开启编辑')" type="primary">编辑</el-button>
<el-button size='mini' @click.native="save()" type="primary">保存</el-button>
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<br>
<el-form ref="form" label-width='80px' :model="form" >
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="教育人">
<el-input rows="5" >
<el-input v-model="vMain.rowItem.jsjyr" :readonly="readonly" rows="5" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="教育时间">
<el-date-picker></el-date-picker>
<el-date-picker v-model="vMain.rowItem.jsjysj" :readonly="readonly" ></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="教育内容">
<el-input type="textarea" rows="5" >
<el-input v-model="vMain.rowItem.jscont" :readonly="readonly" type="textarea" rows="5" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="附件">
<el-upload
action="https://jsonplaceholder.typicode.com/posts/"
list-type="picture-card"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
</el-form-item>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</el-col>
</el-row>
</el-form>
......@@ -46,20 +42,38 @@
export default {
data() {
return {
readonly:true,
}
},
props:['vMain'],
methods: {
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
save(){
let params=this.vMain.rowItem
this.vMain.apiUpdate(params).then(res => {
if (res.success) {
this.$success('更新成功')
this.readonly=true
this.vMain.$refs['TablePager'].reLoad()
let tableData=this.vMain.$refs['TablePager'].tableData
let nowIndex=false
tableData.forEach((data,index)=>{
if(data.id==params.master.id){
nowIndex=index
}
})
if(nowIndex!==false){
this.vMain.$refs['TablePager'].tableData.splice(nowIndex,1,params.master)
this.vMain.$refs['TablePager'].setCurrent(params.master)
}
} else {
this.$error(res.message || '更新失败')
}
})
}
}}
</script>
<style scoped>
......
......@@ -9,13 +9,25 @@
<el-row :gutter="20" class="search-row-1">
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">岗位:</span>
<span class="search-span">事务类型:</span>
<el-input style="width:60% ;"></el-input>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">设备设施风险点:</span>
<span class="search-span">人员工号:</span>
<el-input></el-input>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">开始时间:</span>
<el-input></el-input>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">结束时间:</span>
<el-input></el-input>
</div>
</el-col>
......@@ -41,27 +53,26 @@
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
</TablePager>
</div>
</div>
<div class="min_full" style="height: 60%;padding: 10px;">
<!-- tabs -->
<el-tabs v-model="activeName" @tab-click="handleClick" >
<el-tabs v-model="activeName" @tab-click="handleClick" v-show='rowItem.id' >
<el-tab-pane label="曝光亮相关" name="first" >
<Exposure />
<Exposure :vMain='this' />
</el-tab-pane>
<el-tab-pane label="安全补课关" name="second">
<SafetyCourse />
<SafetyCourse :vMain='this' />
</el-tab-pane>
<el-tab-pane label="反思检查关" name="third">
<Reflect />
<Reflect :vMain='this' />
</el-tab-pane>
<el-tab-pane label="领导谈话关" name="fourth">
<Leadership />
<Leadership :vMain='this' />
</el-tab-pane>
<el-tab-pane label="家属协管关" name="fifth">
<Family />
<Family :vMain='this' />
</el-tab-pane>
</el-tabs>
</div>
......@@ -72,13 +83,11 @@
<script>
/* 引入需要的接口*/
import {
QueryKzzxRole,
QueryApptype,
AddKzzxRole,
DeleteKzzxRole,
UpdateKzzxRole,
QtKzzxRole
} from "common/src/api/system/dmgSystem.js";
doQuery,
doAdd,
doUpdate,
doDelete
} from '@/api/threeViolations/enterTV.js';
/* edit页面*/
import Edit from './edit'
import Exposure from './exposure.vue'
......@@ -94,11 +103,13 @@
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
console.log(_)
this.$refs['TablePager'].pageQuery({setFirstCurrent:true})
},
data() {
return {
rowItem: {
id:''
},
activeName: 'first',
/*需要的额外参数 */
showDialog: false,
......@@ -106,7 +117,7 @@
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'kzzx/role',
baseUrl: '/aqgl/swgl/swjl',
/* 查询参数*/
queryParams: {
ksrq: '',
......@@ -114,86 +125,40 @@
},
/* 表格标题对应参数*/
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: "部门", prop: "bmName", fieldType: "ftString",width:192},
{label: "班组", prop: "bzName", fieldType: "ftString",width:192},
// {label: "违规人ID", prop: "userid", fieldType: "ftString",width:192},
{label: "违章人", prop: "wzr", fieldType: "ftString",width:192},
{label: "手机", prop: "phone", fieldType: "ftString",width:192},
{label: "违章日期", prop: "wzrq", fieldType: "ftDateTime"},
{label: "违章行为", prop: "wzxw", fieldType: "ftString",width:300},
// {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"},
// {label: "状态", prop: "zt", fieldType: "ftString",width:6},
// {label: "工作流状态", prop: "wfpname", fieldType: "ftString",width:300},
// {label: "状态", prop: "zt", fieldType: "ftString",width:6},
// {label: "曝光内容", prop: "bgcont", fieldType: "ftString",width:300},
// {label: "安全教育人", prop: "aqjyrid", fieldType: "ftString",width:192},
// {label: "安全教育时间", prop: "aqjysj", fieldType: "ftDateTime"},
// {label: "安全教育内容", prop: "aqcont", fieldType: "ftString",width:300},
// {label: "反思内容", prop: "fscont", fieldType: "ftString",width:300},
// {label: "谈话层级", prop: "ldglcj", fieldType: "ftString",width:60},
// {label: "教育人编码", prop: "ldjyrid", fieldType: "ftString",width:192},
// {label: "被教育人编码", prop: "ldbjyrid", fieldType: "ftString",width:192},
// {label: "领导教育时间", prop: "ldjysj", fieldType: "ftDateTime"},
// {label: "领导教育内容", prop: "ldcont", fieldType: "ftString",width:300},
// {label: "家属教育人", prop: "jsjyr", fieldType: "ftString",width:180},
// {label: "家属教育时间", prop: "jsjysj", fieldType: "ftDateTime"},
// {label: "家属教育内容", prop: "jscont", fieldType: "ftString",width:300},
// {label: "纠正措施", prop: "jzcs", fieldType: "ftString",width:300},
// {label: "纠正结果", prop: "jzjg", fieldType: "ftString",width:300},
// {label: "纠正验证人编码", prop: "jzyzrid", fieldType: "ftString",width:192},
// {label: "纠正验证时间", prop: "jzyzsj", fieldType: "ftDateTime"},
// {label: "处罚标志", prop: "cfbz", fieldType: "ftString",width:60},
// {label: "处罚金额", prop: "cfje", fieldType: "float"},
]
}
},
......@@ -202,37 +167,17 @@
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 || '操作失败')
}
})
})
}
......
<template>
<div class="form-detail">
<el-form ref="form" label-width='80px' :model="form" >
<el-row class="tool-bar">
<AttachFileButton :params="{childPath:'LDTH'}" :app='vMain'></AttachFileButton>
<el-button size='mini' @click.native="readonly=false;$success('开启编辑')" type="primary">编辑</el-button>
<el-button size='mini' @click.native="save()" type="primary">保存</el-button>
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<br>
<el-form ref="form" label-width='80px' >
<el-row style="width: 100%;" :gutter="20">
<el-col :span="12">
<el-form-item label="谈话层级">
<el-input rows="5" >
<el-input v-model="vMain.rowItem.ldglcj" :readonly="readonly" rows="5" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="教育人">
<el-input></el-input>
<el-input :readonly="readonly" v-model="vMain.rowItem.ldjyr" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被教育人">
<el-input rows="5" >
<el-input :readonly="readonly" v-model="vMain.rowItem.ldbjyr" rows="5" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="教育时间">
<el-date-picker></el-date-picker>
<el-date-picker :readonly="readonly" v-model="vMain.rowItem.ldjysj" style="width: 100%;"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="谈话内容">
<el-input type="textarea" rows="5" >
<el-input :readonly="readonly" v-model="vMain.rowItem.ldcont" type="textarea" rows="10" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="附件">
<el-upload
action="https://jsonplaceholder.typicode.com/posts/"
list-type="picture-card"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
</el-form-item>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</el-col>
</el-row>
</el-form>
......@@ -57,19 +53,36 @@
export default {
data() {
return {
readonly:true,
}
},
props:['vMain'],
methods: {
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
save(){
let params=this.vMain.rowItem
this.vMain.apiUpdate(params).then(res => {
if (res.success) {
this.$success('更新成功')
this.readonly=true
this.vMain.$refs['TablePager'].reLoad()
let tableData=this.vMain.$refs['TablePager'].tableData
let nowIndex=false
tableData.forEach((data,index)=>{
if(data.id==params.master.id){
nowIndex=index
}
})
if(nowIndex!==false){
this.vMain.$refs['TablePager'].tableData.splice(nowIndex,1,params.master)
this.vMain.$refs['TablePager'].setCurrent(params.master)
}
} else {
this.$error(res.message || '更新失败')
}
})
}}
}
</script>
......
<template>
<div class="form-detail">
<el-row class="tool-bar">
<AttachFileButton :params="{childPath:'FSJC'}" :app='this'></AttachFileButton>
<el-button size='mini' @click.native="readonly=false;$success('开启编辑')" type="primary">编辑</el-button>
<el-button size='mini' @click.native="save()" type="primary">保存</el-button>
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<br>
<el-form ref="form" label-width='80px' :model="form" >
<el-row style="width: 100%;" :gutter="20">
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="教育人">
<el-input rows="5" >
<el-input v-model="vMain.rowItem.fsjyr" :readonly="readonly" rows="5" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="教育时间">
<el-date-picker></el-date-picker>
<el-date-picker v-model="vMain.rowItem.fsjysj" :readonly="readonly" ></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="教育内容">
<el-input type="textarea" rows="5" >
<el-input v-model="vMain.rowItem.fscont" type="textarea" :readonly="readonly" rows="10" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="附件">
<el-upload
action="https://jsonplaceholder.typicode.com/posts/"
list-type="picture-card"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
</el-form-item>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</el-col>
</el-row>
</el-form>
......@@ -46,19 +41,35 @@
export default {
data() {
return {
readonly:true,
}
},
props:['vMain'],
methods: {
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
save(){
let params=this.vMain.rowItem
this.vMain.apiUpdate(params).then(res => {
if (res.success) {
this.$success('更新成功')
this.readonly=true
this.vMain.$refs['TablePager'].reLoad()
let tableData=this.vMain.$refs['TablePager'].tableData
let nowIndex=false
tableData.forEach((data,index)=>{
if(data.id==params.master.id){
nowIndex=index
}
})
if(nowIndex!==false){
this.vMain.$refs['TablePager'].tableData.splice(nowIndex,1,params.master)
this.vMain.$refs['TablePager'].setCurrent(params.master)
}
} else {
this.$error(res.message || '更新失败')
}
})
}}
}
</script>
......
<template>
<div class="form-detail">
<el-form ref="form" label-width='80px' :model="form" >
<el-row class="tool-bar">
<AttachFileButton :params="{childPath:'AQBK'}" :app='this'></AttachFileButton>
<el-button size='mini' @click.native="readonly=false;$success('开启编辑')" type="primary">编辑</el-button>
<el-button size='mini' @click.native="save()" type="primary">保存</el-button>
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<br>
<el-form ref="form" label-width='80px' >
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="教育人">
<el-input rows="5" >
<el-input v-model="vMain.rowItem.aqjyr" :readonly="readonly" rows="5" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="教育时间">
<el-date-picker></el-date-picker>
<el-date-picker v-model="vMain.rowItem.aqjysj" :readonly="readonly" ></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="教育内容">
<el-input type="textarea" rows="5" >
<el-input v-model="vMain.rowItem.aqcont" type="textarea" :readonly="readonly" rows="10" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="附件">
<el-upload
action="https://jsonplaceholder.typicode.com/posts/"
list-type="picture-card"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
</el-form-item>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</el-col>
</el-row>
</el-form>
......@@ -46,19 +41,35 @@
export default {
data() {
return {
readonly:true,
}
},
props:['vMain'],
methods: {
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
save(){
let params=this.vMain.rowItem
this.vMain.apiUpdate(params).then(res => {
if (res.success) {
this.$success('更新成功')
this.readonly=true
this.vMain.$refs['TablePager'].reLoad()
let tableData=this.vMain.$refs['TablePager'].tableData
let nowIndex=false
tableData.forEach((data,index)=>{
if(data.id==params.master.id){
nowIndex=index
}
})
if(nowIndex!==false){
this.vMain.$refs['TablePager'].tableData.splice(nowIndex,1,params.master)
this.vMain.$refs['TablePager'].setCurrent(params.master)
}
} else {
this.$error(res.message || '更新失败')
}
})
}}
}
</script>
......
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