Commit dee527fb authored by dingyoujian's avatar dingyoujian

保存等按钮,存在允许多次点击的bug,优先修复

parent e1631e00
import request from 'common/src/utils/request'
/* 查询 */
export function doQuery(query) {
return request({
url: '/aqgl/rcgl/wxzybz/query',
method: 'post',
data: query||{}
})
}
/* 更新 */
export function doUpdate(query) {
return request({
url: '/aqgl/rcgl/wxzybz/update',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/aqgl/rcgl/wxzybz/add',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/aqgl/rcgl/wxzybz/delete',
method: 'post',
data: query||{}
})
}
......@@ -45,7 +45,7 @@
doAdd,
doUpdate,
doDelete
} from '@/api/daily/classification';
} from '@/api/daily/classification.js';
/* edit页面*/
import Edit from './edit'
import {
......
......@@ -5,7 +5,7 @@
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="履职分类" ref="flid" prop="flid">
<RelSelect src='/aqgl/daily/lzfl/query' clearable :match="{value:'id',label:'name'}" v-model='form.flid' ></RelSelect>
<RelSelect src='/aqgl/rcgl/lzfl/query' clearable :match="{value:'id',label:'name'}" v-model='form.flid' ></RelSelect>
</el-form-item>
</el-col>
</el-row>
......
<template>
<div class="min_full">
<!-- 查询条件-->
<div class="search" v-condition>
<SearchButton :app='app'></SearchButton>
......@@ -44,21 +43,13 @@
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
<template slot="tabCustom">
<el-table-column label="启用/停用" width="90" header-align="center" >
<template slot-scope="scope">
<el-switch @click.native="setEnable(scope.row.id)" :value='tybz(scope)' style="width: 80px;justify-content: center;"
active-color="#13ce66" inactive-color="#eee">
</el-switch>
</template>
</el-table-column>
</template>
</TablePager>
</div>
</div>
</template>
<script>
/* 引入需要的接口*/
import {
......@@ -74,7 +65,7 @@
} from 'common'
export default {
mixins: [tableMixin],
name: 'duty',
name: 'aqgl/rcglLzrw',
/* 初始额外赋值*/
async mounted() {
......@@ -95,59 +86,30 @@
},
/* 表格标题对应参数*/
tableTitle: [
// {label: "履职分类", prop: "flid", fieldType: "ftString",width:192},
{label: "履职分类", prop: "flName", fieldType: "ftString",width:192},
{label: "履职内容", prop: "content", fieldType: "ftString",width:300},
{label: "履职人员", prop: "ryid", fieldType: "ftString",width:192},
{label: "单据来源", prop: "djly", fieldType: "ftString",width:48},
{label: "状态", prop: "zt", fieldType: "ftString",width:48},
// {label: "附件数", prop: "attachcount", fieldType: "int"},
{label: "履职人员", prop: "ryName", fieldType: "ftString",width:192},
{label: "单据来源", prop: "lyName", fieldType: "ftString",width:48},
{label: "状态", prop: "ztName", fieldType: "ftString",width:48},
{label: "维护人", prop: "whr", fieldType: "ftString"},
{label: "维护时间", prop: "whsj", fieldType: "ftDateTime"}
]
}
},
methods: {
tybz(a) {
let nTy = false
nTy = (a.row.tybz == 'N' ? true : false)
return nTy
},
/* 基础查询*/
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 || '操作失败')
}
})
})
}
},
components: {
Edit,
......@@ -160,3 +122,4 @@
<style scoped>
</style>
<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="flid" prop="flid">
<el-input :readonly="readonly" v-model="form.flid" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="履职内容" ref="content" prop="content">
<el-input :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="履职人员" ref="ryid" prop="ryid">
<el-input :readonly="readonly" v-model="form.ryid" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="单据来源" ref="djly" prop="djly">
<el-input :readonly="readonly" v-model="form.djly" ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {editMixin} from 'common'
export default {
mixins: [editMixin],
/* 存放index页面传递的额外参数*/
mounted() {
},
/* 组件名称*/
name: "aqgl/rcglLzrwEdit",
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data() {
return {
/* 额外初始化,根据需求*/
systemType: [],
bmList: [],
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
//ID
id:'',
//履职分类
flid:'',
//履职内容
content:'',
//履职人员
ryid:'',
//单据来源
djly:'',
//状态
zt:'',
//附件数
attachcount:'',
//维护人编码
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="min_full">
<!-- 查询条件-->
<div class="search" v-condition>
<SearchButton :app='app'></SearchButton>
<el-row :gutter="20" class="search-row-1">
<el-col :span="12" class="search-col">
<div class="search-item">
<span class="search-span">名称:</span>
<el-input v-model="queryParams.info"></el-input>
</div>
</el-col>
</el-row>
</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>
<EditButton ref="edit" :app='app'></EditButton>
<AttachFileButton :app='app' ></AttachFileButton>
<FieldButton :app='app'></FieldButton>
<ExcelButton :app='app'></ExcelButton>
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
</TablePager>
</div>
</div>
</template>
<script>
/* 引入需要的接口*/
import {
doQuery,
doAdd,
doUpdate,
doDelete
} from '@/api/daily/duty.js';
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'aqgl/rcglLzrw',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: '/aqgl/rcgl/lzrw',
/* 查询参数*/
queryParams: {
info: ''
},
/* 表格标题对应参数*/
tableTitle: [
{label: "履职分类", prop: "flid", fieldType: "ftString",width:192},
{label: "履职内容", prop: "content", fieldType: "ftString",width:300},
{label: "履职人员", prop: "ryid", fieldType: "ftString",width:192},
{label: "单据来源", prop: "djly", fieldType: "ftString",width:48},
{label: "状态", prop: "zt", fieldType: "ftString",width:48},
{label: "附件数", prop: "attachcount", fieldType: "int"},
{label: "维护人", prop: "whr", fieldType: "ftString"},
{label: "维护时间", prop: "whsj", fieldType: "ftDateTime"}
]
}
},
methods: {
/* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
/* 初始化赋值操作*/
init() {
}
},
components: {
Edit,
}
}
</script>
<style scoped>
</style>
......@@ -5,7 +5,7 @@
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="分类" ref="flid" prop="flid">
<RelSelect src='/aqgl/daily/lzfl/query' clearable :match="{value:'id',label:'name'}" v-model='form.flid' ></RelSelect>
<RelSelect src='/aqgl/rcgl/lzfl/query' clearable :match="{value:'id',label:'name'}" v-model='form.flid' ></RelSelect>
</el-form-item>
</el-col>
</el-row>
......
......@@ -45,7 +45,7 @@
doAdd,
doUpdate,
doDelete
} from '@/api/daily/maintenanceDuty';
} from '@/api/daily/maintenanceDuty.js';
/* edit页面*/
import Edit from './edit'
import {
......
......@@ -4,52 +4,53 @@
<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 label="序号" ref="xh" prop="xh">
<el-input :readonly="readonly" v-model="form.xh" ></el-input>
</el-form-item>
</el-col>
<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 label="部门" ref="bmid" prop="bmid">
<el-input :readonly="readonly" v-model="form.bmid" ></el-input>
</el-form-item>
</el-col>
</el-row>
<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 label="填报人" ref="tbrid" prop="tbrid">
<el-input :readonly="readonly" v-model="form.tbrid" ></el-input>
</el-form-item>
</el-col>
<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 label="管控项目" ref="gkxm" prop="gkxm">
<el-input :readonly="readonly" v-model="form.gkxm" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="活动内容">
<el-input type="textarea"></el-input>
<el-col :span="12">
<el-form-item label="工作要求" ref="gzyq" prop="gzyq">
<el-input :readonly="readonly" v-model="form.gzyq" ></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="活动结论">
<el-input type="textarea"></el-input>
<el-col :span="12">
<el-form-item label="扣分细则" ref="kfxz" prop="kfxz">
<el-input :readonly="readonly" v-model="form.kfxz" ></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="改进措施">
<el-input type="textarea"></el-input>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="备注" ref="bz" prop="bz">
<el-input :readonly="readonly" v-model="form.bz" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<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-form>
<!-- 按钮重写, -->
<!-- <div slot="reFooter">
<span slot="footer">
重写按钮写在这里,根据需要重写 slot(reFooter,foorer) 节点样式 重写方法需要在此页重新定义
</span>
</div> -->
</RelDialog>
</template>
<script>
......@@ -58,9 +59,10 @@
mixins: [editMixin],
/* 存放index页面传递的额外参数*/
mounted() {
},
/* 组件名称*/
name: 'roleManagementEdit',
name: "maintenanceStandardsEdit",
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data() {
......@@ -69,22 +71,44 @@
/* 额外初始化,根据需求*/
systemType: [],
bmList: [],
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
roleid: '',
rolename: '',
bz: "",
//ID
id:'',
//序号
xh:'',
//部门
bmid:'',
//填报人
tbrid:'',
//管控项目
gkxm:'',
//工作要求
gzyq:'',
//扣分细则
kfxz:'',
//备注
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'
}, ]
}
}
},
......@@ -97,3 +121,5 @@
<style scoped lang="scss">
</style>
<template>
<div class="min_full">
<!-- 查询条件-->
<div class="search" v-condition>
<SearchButton :app='app'></SearchButton>
<el-row :gutter="20" class="search-row-1">
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">分类:</span>
<el-select></el-select>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">开始日期:</span>
<el-date-picker></el-date-picker>
</div>
</el-col>
<el-col :span="6" class="search-col">
<el-col :span="12" class="search-col">
<div class="search-item">
<span class="search-span">结束日期:</span>
<el-date-picker></el-date-picker>
<span class="search-span">名称:</span>
<el-input v-model="queryParams.info"></el-input>
</div>
</el-col>
</el-row>
......@@ -44,31 +31,21 @@
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
<template slot="tabCustom">
<el-table-column label="启用/停用" width="90" header-align="center" >
<template slot-scope="scope">
<el-switch @click.native="setEnable(scope.row.id)" :value='tybz(scope)' style="width: 80px;justify-content: center;"
active-color="#13ce66" inactive-color="#eee">
</el-switch>
</template>
</el-table-column>
</template>
</TablePager>
</div>
</div>
</template>
<script>
/* 引入需要的接口*/
import {
QueryKzzxRole,
QueryApptype,
AddKzzxRole,
DeleteKzzxRole,
UpdateKzzxRole,
QtKzzxRole
} from "common/src/api/system/dmgSystem.js";
doQuery,
doAdd,
doUpdate,
doDelete
} from '@/api/daily/maintenanceStandards';
/* edit页面*/
import Edit from './edit'
import {
......@@ -76,7 +53,7 @@
} from 'common'
export default {
mixins: [tableMixin],
name: 'appVersion',
name: 'maintenanceStandards',
/* 初始额外赋值*/
async mounted() {
......@@ -84,100 +61,45 @@
},
data() {
return {
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'kzzx/role',
baseUrl: '/aqgl/rcgl/wxzybz',
/* 查询参数*/
queryParams: {
ksrq: '',
jsrq: ''
info: ''
},
/* 表格标题对应参数*/
tableTitle: [
{
prop: 'whsj',
label: '分类',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '填报单位',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '填报角色',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '管控项目',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '工作要求',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '扣分细则',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '备注',
...this.$common('ftDateTime')
}
{label: "序号", prop: "xh", fieldType: "int"},
{label: "部门", prop: "bmName", fieldType: "ftString",width:192},
{label: "填报人", prop: "tbrName", fieldType: "ftString",width:192},
{label: "管控项目", prop: "gkxm", fieldType: "ftString",width:300},
{label: "工作要求", prop: "gzyq", fieldType: "ftString",width:300},
{label: "扣分细则", prop: "kfxz", fieldType: "ftString",width:300},
{label: "备注", prop: "bz", fieldType: "ftString",width:300},
{label: "维护人", prop: "whr", fieldType: "ftString"},
{label: "维护时间", prop: "whsj", fieldType: "ftDateTime"}
]
}
},
methods: {
tybz(a) {
let nTy = false
nTy = (a.row.tybz == 'N' ? true : false)
return nTy
},
/* 基础查询*/
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 || '操作失败')
}
})
})
}
},
components: {
Edit,
......@@ -190,3 +112,4 @@
<style scoped>
</style>
......@@ -45,7 +45,7 @@
doAdd,
doUpdate,
doDelete
} from '@/api/aqgl/rcgl/fcgzy.js';
} from '@/api/daily/nroa.js';
/* edit页面*/
import Edit from './edit'
import {
......
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