按钮权限

This commit is contained in:
hanchaobo
2024-02-06 15:36:34 +08:00
parent e00184fc1d
commit 408cdcedd5
4 changed files with 115 additions and 42 deletions
+28 -20
View File
@@ -89,35 +89,43 @@ export function queryCaseFlowInfo(data) {
// 根据机构id查询模板 // 根据机构id查询模板
export function getTemplate(data) { export function getTemplate(data) {
return request({ return request({
url: `/deptIdentify/getTemplate`, url: `/deptIdentify/getTemplate`,
method: 'get', method: 'get',
params: data params: data
}) })
} }
// 根据身份证获取生日和性别 // 根据身份证获取生日和性别
export function getInfoByIdCard(query) { export function getInfoByIdCard(query) {
return request({ return request({
url: '/caseApplication/getInfoByIdCard', url: '/caseApplication/getInfoByIdCard',
method: 'get', method: 'get',
params: query params: query
}) })
} }
/** 新增案件 */ /** 新增案件 */
export function caseApplicationInsert(data) { export function caseApplicationInsert(data) {
return request({ return request({
url: '/caseApplication/insert', url: '/caseApplication/insert',
method: 'post', method: 'post',
data: data data: data
}) })
} }
// 修改立案申请接口 // 修改立案申请接口
export function updateComfire(data) { export function updateComfire(data) {
return request({ return request({
url: "/caseApplication/update", url: "/caseApplication/update",
method: "post", method: "post",
data: data, data: data,
}) })
}
//提交案件
export function caseAppSubmit(data) {
return request({
'url': `/caseApplication/submit`,
method: 'post',
data: data
})
} }
+63 -15
View File
@@ -43,7 +43,8 @@
<view class="btn" v-if="sysType == 2"> <view class="btn" v-if="sysType == 2">
<!-- <button class="btnItem" type="primary" size="mini" @tap="clickPay">申请人缴费</button> <!-- <button class="btnItem" type="primary" size="mini" @tap="clickPay">申请人缴费</button>
<button class="btnItem" type="primary" size="mini" @tap="caseDetail">选择调解员</button> --> <button class="btnItem" type="primary" size="mini" @tap="caseDetail">选择调解员</button> -->
<button class="btnItem" type="primary" size="mini" v-for="(item) in buttonList" :key="item.id" <button class="btnItem" type="primary" @tap="clickType(item.id)" size="mini" v-for="(item) in buttonList"
:key="item.id"
v-if="item.id == defalutVal.caseFlowId && checkPermi([item.buttonAuthFlag])">{{ item.nodeName }}</button> v-if="item.id == defalutVal.caseFlowId && checkPermi([item.buttonAuthFlag])">{{ item.nodeName }}</button>
<!-- <button class="btnItem" type="primary" size="mini" @tap="confirmationEvidence">确认证据</button> <!-- <button class="btnItem" type="primary" size="mini" @tap="confirmationEvidence">确认证据</button>
<button class="btnItem" type="primary" size="mini" @tap="isAssignrbitrators">是否指派仲裁员</button> <button class="btnItem" type="primary" size="mini" @tap="isAssignrbitrators">是否指派仲裁员</button>
@@ -55,12 +56,13 @@
<script> <script>
import { import {
queryCaseFlowInfo queryCaseFlowInfo,
caseAppSubmit
} from '@/api/handlecase/index.js' } from '@/api/handlecase/index.js'
export default { export default {
data() { data() {
return { return {
buttonList: []
} }
}, },
props: { props: {
@@ -71,9 +73,57 @@
sysType: { sysType: {
type: Number, type: Number,
default: () => {} default: () => {}
},
buttonList: {
type: Array,
default: () => {}
} }
}, },
methods: { methods: {
/**点击列表按钮*/
clickType(type) {
if (type == 1) {
// 提交案件
this.onsubmitRow()
} else if (type == 2) {
// 缴费
this.clickPay()
} else if (type == 3 || type == 45) {
// 确认缴费
} else if (type == 4) {
// 受理分配
} else if (type == 5) {
// 选择调解员
this.caseDetail()
} else if (type == 6) {
// 核实调解员
} else if (type == 7) {
// 确认调解员
} else if (type == 8) {
// 确定调解时间
} else if (type == 9) {
// 调解
} else if (type == 10) {
// 确认调解书
} else if (type == 11) {
// 签名
} else if (type == 12) {
// 用印申请
} else if (type == 13) {
// 用印
} else if (type == 14) {
// 归档
} else if (type == 15) {
// 申请人签收
} else if (type == 16) {
// 被申请人签收
} else if (type == 17) {
//结束
} else if (type == 44) {
// 被申请人缴费
this.clickPay()
}
},
// 案件详情以及操作 // 案件详情以及操作
caseDetail() { caseDetail() {
uni.navigateTo({ uni.navigateTo({
@@ -85,22 +135,20 @@
url: `/pages/handlecase/component/payList?id=${this.defalutVal.id}` url: `/pages/handlecase/component/payList?id=${this.defalutVal.id}`
}) })
}, },
/**查询按钮列表 */ /**提交案件*/
getButtonList() { onsubmitRow() {
queryCaseFlowInfo({ caseAppSubmit().then(res => {
pageNum: 1, uni.showToast({
pageSize: 100000 title: '成功',
}).then(res => { icon: 'none',
res.rows.forEach(item => { duration: 1000
if (item.id != 11 && item.id != 17) { })
this.buttonList.push(item) this.$emit("getList");
}
});
}) })
}, },
}, },
created() { created() {
this.getButtonList() // this.getButtonList()
} }
} }
</script> </script>
+4 -4
View File
@@ -6,11 +6,11 @@
<uni-easyinput :inputBorder="false" :disabled='true' v-model="formData.caseNum" placeholder="" /> <uni-easyinput :inputBorder="false" :disabled='true' v-model="formData.caseNum" placeholder="" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="申请人:" name="applicantName" label-width="120px" required> <uni-forms-item label="申请人:" name="applicantName" label-width="120px" required>
<uni-easyinput :inputBorder="false" :disabled='true' v-model="formData.applicantName" <uni-easyinput :inputBorder="false" :disabled='true' v-model="formData.affiliate.applicationName"
placeholder="" /> placeholder="" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="被申请人:" name="respondentName" label-width="120px" required> <uni-forms-item label="被申请人:" name="respondentName" label-width="120px" required>
<uni-easyinput :inputBorder="false" :disabled='true' v-model="formData.respondentName" <uni-easyinput :inputBorder="false" :disabled='true' v-model="formData.affiliate.respondentName"
placeholder="" /> placeholder="" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="案件标的:" name="caseSubjectAmount" label-width="120px" required> <uni-forms-item label="案件标的:" name="caseSubjectAmount" label-width="120px" required>
@@ -25,7 +25,7 @@
<uni-forms-item label="缴费方式"> <uni-forms-item label="缴费方式">
<uni-data-checkbox v-model="payType" :localdata="payTypes" @change="changeType" /> <uni-data-checkbox v-model="payType" :localdata="payTypes" @change="changeType" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="缴费平台"> <uni-forms-item label="缴费平台" v-if="payType == 0">
<uni-data-checkbox v-model="payPlatform" :localdata="payPlatforms" @change="changePayType" /> <uni-data-checkbox v-model="payPlatform" :localdata="payPlatforms" @change="changePayType" />
</uni-forms-item> </uni-forms-item>
<div class="payImg" v-if="payType == 0"> <div class="payImg" v-if="payType == 0">
@@ -114,7 +114,7 @@
}, },
/**选择缴费方式*/ /**选择缴费方式*/
changeType(val) { changeType(val) {
this.submitForm.payType = val; this.submitForm.payType = val.detail.value;
}, },
/**文件上传*/ /**文件上传*/
select(e) { select(e) {
+20 -3
View File
@@ -3,7 +3,8 @@
<view class="" v-if="sysType == 2"> <view class="" v-if="sysType == 2">
<button type="primary" @tap="newlyAddedCases">新增案件</button> <button type="primary" @tap="newlyAddedCases">新增案件</button>
</view> </view>
<List class="caseList" v-for="(item,index) in caseList" :defalutVal='item' :key="index" :sysType='sysType'> <List class="caseList" v-for="(item,index) in caseList" :defalutVal='item' :buttonList='buttonList' :key="index"
:sysType='sysType'>
</List> </List>
<view class="emptyBox" v-if="caseList.length == 0"> <view class="emptyBox" v-if="caseList.length == 0">
<luanqing-empty :show="true" textColor="#000"></luanqing-empty> <luanqing-empty :show="true" textColor="#000"></luanqing-empty>
@@ -15,7 +16,8 @@
import List from './component/list.vue' import List from './component/list.vue'
import { import {
respondentList, respondentList,
caseApplicationTj caseApplicationTj,
queryCaseFlowInfo
} from '../../api/handlecase/index.js' } from '../../api/handlecase/index.js'
import LuanqingEmpty from "@/components/luanqing-empty.vue" import LuanqingEmpty from "@/components/luanqing-empty.vue"
export default { export default {
@@ -30,9 +32,23 @@
pageSize: 10, pageSize: 10,
sysType: null, sysType: null,
total: null, total: null,
buttonList: []
} }
}, },
methods: { methods: {
/**查询按钮列表 */
getButtonList() {
queryCaseFlowInfo({
pageNum: 1,
pageSize: 100000
}).then(res => {
res.rows.forEach(item => {
if (item.id != 11 && item.id != 17) {
this.buttonList.push(item)
}
});
})
},
getList(parms) { getList(parms) {
if (this.sysType == 1) { if (this.sysType == 1) {
respondentList(parms).then(res => { respondentList(parms).then(res => {
@@ -154,7 +170,7 @@
this.getList(obj) this.getList(obj)
} }
}, },
onShow() { onLoad() {
this.sysType = uni.getStorageSync('sysType'); this.sysType = uni.getStorageSync('sysType');
let obj = {} let obj = {}
if (this.sysType == 1) { if (this.sysType == 1) {
@@ -170,6 +186,7 @@
} }
} }
this.getList(obj) this.getList(obj)
this.getButtonList()
}, },
// onLoad() { // onLoad() {
// let obj = { // let obj = {