Переглянути джерело

宅基地纠纷调请

wulanhaote
zhao 3 роки тому
джерело
коміт
0f9808cc0a
9 змінених файлів з 2334 додано та 5 видалено
  1. +149
    -0
      src/api/onlineHome/homestead/arbitration.js
  2. +55
    -5
      src/router/index.js
  3. +623
    -0
      src/views/onlineHome/homestead/arbitration/arbitrationDetail.vue
  4. +426
    -0
      src/views/onlineHome/homestead/arbitration/arbitrationHandlerDetail.vue
  5. +199
    -0
      src/views/onlineHome/homestead/arbitration/arbitrationHandlerList.vue
  6. +224
    -0
      src/views/onlineHome/homestead/arbitration/arbitrationList.vue
  7. +451
    -0
      src/views/onlineHome/homestead/arbitration/arbitrationProcessDetail.vue
  8. +199
    -0
      src/views/onlineHome/homestead/arbitration/arbitrationProcessList.vue
  9. +8
    -0
      src/views/onlineHome/workbench.vue

+ 149
- 0
src/api/onlineHome/homestead/arbitration.js Переглянути файл

@@ -0,0 +1,149 @@
import request from '@/utils/request'

//查询列表
export function getArbitrationList(data){
return request({
url:'/house/mobile/arbitration/list',
method:'get',
params:data
})
}

// 新增
export function addArbitration(data){
return request({
url:'/house/arbitration/add',
method:'post',
data:data
})
}

// 查看
export function getArbitrationDetail(id, data){
return request({
url:`/house/arbitration/get/${id}`,
method:'get',
params:data
})
}

// 提交
export function submitArbitration(id, status, data){
return request({
url:`/house/arbitration/do/${id}/${status}`,
method:'get',
params:data
})
}

// 更新
export function editArbitration(data){
return request({
url:'/house/arbitration/edit',
method:'post',
data:data
})
}

// 删除
export function removeArbitration(id, data){
return request({
url: `/house/arbitration/remove/${id}`,
method:'get',
params:data
})
}

/* ************************* 处理过程 ************************* */

//查询处理过程列表
export function getArbitrationProcessList(data){
return request({
url:'/house/process/list',
method:'get',
params:data
})
}

// 新增处理过程
export function addArbitrationProcess(data){
return request({
url:'/house/process/add',
method:'post',
data:data
})
}

// 更新处理过程
export function editArbitrationProcess(data){
return request({
url:'/house/process/edit',
method:'post',
data:data
})
}

// 处理过程详情
export function getArbitrationProcessDetail(id, data){
return request({
url: `/house/process/get/${id}`,
method:'get',
params:data
})
}

// 删除处理过程
export function removeArbitrationProcess(id, data){
return request({
url: `/house/process/remove/${id}`,
method:'get',
params:data
})
}

/* ************************* 调解员 ************************* */

//查询调解员列表
export function getArbitrationHandlerList(data){
return request({
url:'/house/handler/list',
method:'get',
params:data
})
}

// 新增调解员
export function addArbitrationHandler(data){
return request({
url:'/house/handler/add',
method:'post',
data:data
})
}

// 更新调解员
export function editArbitrationHandler(data){
return request({
url:'/house/handler/edit',
method:'post',
data:data
})
}

// 处理调解员
export function getArbitrationHandlerDetail(id, data){
return request({
url: `/house/handler/get/${id}`,
method:'get',
params:data
})
}

// 删除调解员
export function removeArbitrationHandler(id, data){
return request({
url: `/house/handler/remove/${id}`,
method:'get',
params:data
})
}

+ 55
- 5
src/router/index.js Переглянути файл

@@ -2751,11 +2751,61 @@ export const constantRoutes = [
hidden: true,
},
component: (resolve) => require(['@/views/sunVillage/user/cooperative'], resolve)
}




},
{
path: '/onlineHome/arbitrationList',
name: 'arbitrationList',
meta: {
title: '纠纷调请',
hidden: true,
},
component: (resolve) => require(['@/views/onlineHome/homestead/arbitration/arbitrationList'], resolve)
},
{
path: '/onlineHome/arbitrationDetail',
name: 'arbitrationDetail',
meta: {
title: '纠纷调请',
hidden: true,
},
component: (resolve) => require(['@/views/onlineHome/homestead/arbitration/arbitrationDetail'], resolve)
},
{
path: '/onlineHome/arbitrationProcessList',
name: 'arbitrationProcessList',
meta: {
title: '纠纷处理',
hidden: true,
},
component: (resolve) => require(['@/views/onlineHome/homestead/arbitration/arbitrationProcessList'], resolve)
},
{
path: '/onlineHome/arbitrationProcessDetail',
name: 'arbitrationProcessDetail',
meta: {
title: '纠纷处理过程',
hidden: true,
},
component: (resolve) => require(['@/views/onlineHome/homestead/arbitration/arbitrationProcessDetail'], resolve)
},
{
path: '/onlineHome/arbitrationHandlerList',
name: 'arbitrationHandlerList',
meta: {
title: '调解/仲裁员',
hidden: true,
},
component: (resolve) => require(['@/views/onlineHome/homestead/arbitration/arbitrationHandlerList'], resolve)
},
{
path: '/onlineHome/arbitrationHandlerDetail',
name: 'arbitrationHandlerDetail',
meta: {
title: '纠纷处理员',
hidden: true,
},
component: (resolve) => require(['@/views/onlineHome/homestead/arbitration/arbitrationHandlerDetail'], resolve)
},
];




+ 623
- 0
src/views/onlineHome/homestead/arbitration/arbitrationDetail.vue Переглянути файл

@@ -0,0 +1,623 @@
<template>
<div class="app-container">
<van-nav-bar
title="纠纷调请"
left-arrow
fixed
placeholder
@click-left="goBack()"
z-index="998"
>
<template #right>
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="openMenu" v-if="!!id"/>
</template>
</van-nav-bar>

<div class="main" style="padding-bottom: 1rem;">
<van-form ref="form">
<div :class="formEnabled.baseFormEnabled ? '' : 'noModify'">
<p class="topTit">纠纷调请</p>
<template> <!-- 申请 基本信息 -->
<div>
<p class="main_title">基本信息</p>
<div class="main_box">
<van-field :readonly="true" v-model="arbitrationData.applicant" label="申请人" placeholder="申请人" input-align="right" required :rules="[{ required: true }]"/>
<van-field required :readonly="true" v-model="arbitrationData.applicantPhone" label="联系电话" placeholder="联系电话" input-align="right" type="digit" :rules="[{pattern: /(^\d{7}(\d{4})?$)/}]"/>
<field-select
v-model="arbitrationData.applyProposerId"
label="宅基地申请"
value-key="projectName"
data-key="id"
placeholder="选择宅基地申请"
:rules="[{ required: true }]"
required
:readonly="!formEnabled.baseFormEnabled"
:columns="userHouseApplyProposer"
/>
<van-field :readonly="!formEnabled.baseFormEnabled" v-model="arbitrationData.disputant" label="纠纷人" placeholder="纠纷人" input-align="right" required :rules="[{ required: true }]"/>
<field-date-picker
v-model="arbitrationData.applyTime"
label="申请时间"
placeholder="请选择申请时间"
:rules="[{ required: true }]"
formatter="yyyy-MM-dd"
required
:readonly="!formEnabled.baseFormEnabled"
/>
</div>
</div>

<div>
<p class="main_title">纠纷事项</p>
<div class="main_box">
<van-field
rows="3"
autosize
type="textarea"
placeholder="纠纷事项"
input-align="left"
v-model="arbitrationData.disputes"
:readonly="!formEnabled.baseFormEnabled"
:rules="[{ required: true }]" required
/>
</div>
</div>

<div>
<p class="main_title">备注说明</p>
<div class="main_box">
<van-field
rows="3"
autosize
type="textarea"
placeholder="备注说明"
input-align="left"
v-model="arbitrationData.remark"
:readonly="!formEnabled.baseFormEnabled"
:rules="[{ required: true }]" required
/>
</div>
</div>
</template>
</div>

</van-form>
</div>

<!-- 底部按钮 -->
<van-goods-action style="z-index: 999;" v-if="formVisible.editVisible || formVisible.operationVisible || formVisible.approvalVisible">
<template v-if="formVisible.editVisible">
<van-goods-action-button type="primary" text="保存" @click="onSubmit('add')" :disabled="!formEnabled.baseFormEnabled" v-if="formEnabled.baseFormEnabled"/>
<van-goods-action-button type="primary" :text="formEnabled.baseFormEnabled ? '保存并提交' : '提交'" @click="onSubmit(formEnabled.baseFormEnabled ? 'save_and_submit' : 'submit')" v-if="formEnabled.submitEnabled"/>
</template>
<template v-if="formVisible.approvalVisible">
<van-goods-action-button type="primary" text="受理" @click="onSubmit('agree')" :disabled="!formEnabled.approvalEnabled"/>
<van-goods-action-button type="danger" text="驳回" @click="onSubmit('reject')" v-if="formEnabled.rejectEnabled"/>
</template>
<template v-if="formVisible.operationVisible">
<van-goods-action-button type="primary" text="调解" @click="onSubmit('mediate')" v-if="formEnabled.mediateEnabled"/>
<van-goods-action-button type="danger" text="仲裁" @click="onSubmit('arbitrate')" v-if="formEnabled.arbitrateEnabled"/>
<van-goods-action-button type="primary" text="归档" @click="onSubmit('archive')" v-if="formEnabled.archiveEnabled"/>
</template>
</van-goods-action>

<van-popup
v-model="menuVisible"
closeable
position="bottom"
:close-on-click-overlay="true"
:lazy-render="false"
>
<van-cell title="菜单"></van-cell>

<van-cell-group inset>
<van-cell title="调解/冲裁员" is-link @click="openArbitrationHandlerPage()"/>
<van-cell title="处理过程" is-link @click="openArbitrationProcessPage()"/>
</van-cell-group>
</van-popup>
</div>
</template>

<script>

import FieldSelect from "@/components/form/FieldSelect";
import FieldDatePicker from "@/components/form/FieldDatePicker";
import {formatDate} from "element-ui/src/utils/date-util.js";
import {getInfo} from '@/api/login/index'
import {Notify} from "vant";
import { getList } from "@/api/onlineHome/homestead/application";
import { addArbitration, getArbitrationDetail, submitArbitration, editArbitration } from "@/api/onlineHome/homestead/arbitration";

// 意图
const INTENT_VIEW = 1;
const INTENT_EDIT = 2;
const INTENT_ADD = 3;

export default {
name: "ArbitrationDetail",
components: {
FieldDatePicker, FieldSelect},
data() {
return {
// 申请ID
id: '',
// 表单数据
arbitrationData: {
applicantPhone: '',
applyProposerId: '',
applicant: '',
disputant: '',
disputes: '',
remark: '',
applyTime: '',
deptName: '',
disputeStatus: '1',
},
// 表单意图
operationIntent: INTENT_ADD,
// 显示控制
formVisible: {
editVisible: false,
approvalVisible: false,
operationVisible: false,
finishVisible: false,
},
// 表单启用控制
formEnabled: {
baseFormEnabled: false,
submitEnabled: false,
approvalEnabled: false,
rejectEnabled: false,
mediateEnabled: false,
arbitrateEnabled: false,
archiveEnabled: false,
},
currentUserRole: null,
userHouseApplyProposer: [],
menuVisible: false,
};
},
created() {
this.id = this.$route.query.id;
this.type = this.$route.query.type;
this.getFormIntent();
this.getDetail();
this.getUserHouseApplyProposer();
},
methods: {
// 初始化当前数据, 有ID则查询, 否则新增
getDetail(){
this.reset();
if(this.id)
{
getArbitrationDetail(this.id).then(response => {
this.init(response.data);
});
}
else
{
this.init();
this.getApplyerDetail();
}
},
// 全局初始化
init(value) {
const role = this.$store.getters.roles;
this.currentUserRole = role[0];

// 默认状态
this.formVisible.editVisible = false;
this.formVisible.approvalVisible = false;
this.formVisible.operationVisible = false;

this.formEnabled.baseFormEnabled = false;
this.formEnabled.submitEnabled = false;
this.formEnabled.approvalEnabled = false;
this.formEnabled.rejectEnabled = false;
this.formEnabled.mediateEnabled = false;
this.formEnabled.arbitrateEnabled = false;
this.formEnabled.archiveEnabled = false;

switch (this.operationIntent) {
// 查看
case INTENT_VIEW:
this.arbitrationData = value;
switch(value.disputeStatus)
{
case '1': // 草稿
this.formEnabled.submitEnabled = true;
this.formVisible.editVisible = true;
break;
case '2': // 待审
this.formVisible.approvalVisible = true;
this.formEnabled.approvalEnabled = true;
this.formEnabled.rejectEnabled = true;
break;
case '3': // 受理
this.formVisible.operationVisible = true;
this.formEnabled.mediateEnabled = true;
this.formEnabled.arbitrateEnabled = true;
break;
case '4': // 驳回
this.formVisible.approvalVisible = true;
this.formEnabled.approvalEnabled = true;
break;
case '5': // 调解
this.formVisible.operationVisible = true;
this.formEnabled.arbitrateEnabled = true;
this.formEnabled.archiveEnabled = true;
break;
case '6': // 仲裁
this.formVisible.operationVisible = true;
this.formEnabled.archiveEnabled = true;
break;
case '7': // 归档
break;
default:
break;
}
break;

// 编辑/审批
case INTENT_EDIT:
this.arbitrationData = value;
this.formEnabled.baseFormEnabled = true;
this.formVisible.editVisible = true;
this.formEnabled.submitEnabled = true;
break;

// 新建
case INTENT_ADD:
this.formEnabled.baseFormEnabled = true;
this.formVisible.editVisible = true;
break;
}
},
// 获取query的意图
getFormIntent() {
console.log(this.type);
switch (this.type) {
case 'done':
case 'view':
this.operationIntent = INTENT_VIEW;
break;
case 'modify':
case 'audit':
case 'todo':
this.operationIntent = INTENT_EDIT;
break;
case 'add':
default:
this.operationIntent = INTENT_ADD;
break;
}
return this.operationIntent;
},
// 获取日期, yyyy-MM-dd
getDate(d) {
return formatDate(d ? d : new Date(), 'yyyy-MM-dd');
},
// 初始化基础表单
reset() {
this.$set(this.arbitrationData, 'applicantPhone', '');
this.$set(this.arbitrationData, 'applyProposerId', '');
this.$set(this.arbitrationData, 'applicant', '');
this.$set(this.arbitrationData, 'disputant', '');
this.$set(this.arbitrationData, 'disputes', '');
this.$set(this.arbitrationData, 'remark', '');
this.$set(this.arbitrationData, 'deptName', '');
this.$set(this.arbitrationData, 'disputeStatus', 1);
this.$set(this.arbitrationData, 'applyTime', this.getDate());
},
//返回上一步操作
goBack(){
this.$router.push({name: this.$router.back(-1)});
},
// 全局提交
onSubmit(intent){
console.log(this.arbitrationData, intent);
switch (intent) {
case 'add':
case 'modify':
this.saveArbitration();
break;
case 'submit':
this.submitArbitration();
break;
case 'save_and_submit':
this.saveArbitration(true);
break;
case 'agree':
this.agreeArbitration();
break;
case 'reject':
this.rejectArbitration();
break;
case 'mediate':
this.mediateArbitration();
break;
case 'arbitrate':
this.arbitrateArbitration();
break;
case 'archive':
this.archiveArbitration();
break;
default:
console.error('Unknown intent! ', intent);
break;
}
},
// 获取申请人信息
getApplyerDetail(){
getInfo().then(res => {
let user = res.user;
console.log(user);
this.$set(this.arbitrationData, 'applicantPhone', user.phonenumber);
this.$set(this.arbitrationData, 'applicant', user.nickName);
});
},
// 检查字符串, 不符合返回true
checkString(value, regexp) {
let res = value === undefined || value === null || value === '' || value.toString().trim().length === 0;
if(res)
return true;
if(regexp)
res = !value.match(regexp);
return res;
},
// 保存申请(是否提交)
saveArbitration(submit) {
this.$refs.form.validate().then(() => {
/*if(this.checkString(this.arbitrationData.tHouseApplyProposedSituation.theGeom))
{
this.notify("请标注宅基地位置!", 'danger');
return;
}*/
console.log("进行保存", this.arbitrationData);
(this.arbitrationData.id ? editArbitration : addArbitration)(this.arbitrationData).then((response) => {
if(submit && this.arbitrationData.id)
{
this.submitArbitration();
}
else
{
this.notify("保存成功", 'success');
this.goBack();
}
}).catch((e) => {
this.notify("保存失败!", 'danger');
}).finally(() => {
});
}).catch(e => {
this.notify('请填写完整表单', 'danger');
return;
});
},
submitArbitration() {
this.setArbitrationStatus('2', '提交');
},
agreeArbitration() {
this.setArbitrationStatus('3', '受理');
},
rejectArbitration() {
this.setArbitrationStatus('4', '驳回');
},
mediateArbitration() {
this.setArbitrationStatus('5', '调解');
},
arbitrateArbitration() {
this.setArbitrationStatus('6', '仲裁');
},
archiveArbitration() {
this.setArbitrationStatus('7', '归档');
},
setArbitrationStatus(status, reason) {
submitArbitration(this.arbitrationData.id, status).then((response) => {
this.notify(`${reason}成功`, 'success');
this.goBack();
}).catch((e) => {
this.notify(`${reason}成功失败!`, 'danger');
}).finally(() => {
});
},
// 请求结果提示工具函数
notify(message, type) {
Notify.clear();
Notify({ type: type || 'primary', message: message });
},
getUserHouseApplyProposer()
{
getList().then((resp) => {
this.userHouseApplyProposer = resp.rows;
});
},
openMenu() {
this.menuVisible = true;
},
openArbitrationProcessPage()
{
this.$router.push({name:'arbitrationProcessList', query: {
arbitrationId: this.arbitrationData.id,
}});
},
openArbitrationHandlerPage()
{
this.$router.push({name:'arbitrationHandlerList', query: {
arbitrationId: this.arbitrationData.id,
}});
},
},
watch: {
}
}
</script>

<style scoped lang="scss">
.app-container {
padding-bottom: 5%;
}
.examine_box{
background-color: #1D6FE9!important;
padding: 0.18rem!important;
padding-left: 0!important;
border-radius: 0.15rem!important;
margin-top: 0.3rem!important;
}
.examine_box .van-col:first-child{
color: #FFF!important;
font-size: 0.45rem!important;
text-align: center!important;
}
.examine_box .van-col:last-child{
background-color: #FFF!important;
border-radius: 0.15rem!important;
overflow: hidden!important;
.van-radio-group--horizontal{
padding: 0.2rem 0;
border-bottom: 1px solid #eee;
}
}
#mapWrap{
width: 96%;
margin: 0 auto;
border-bottom-left-radius: 12px;
border-bottom-right-radius: 12px;
overflow: hidden;
}
.mapBox{
position: relative;
.mapBox_button{
position: absolute;
top: 0.2rem;
right: 2%;
}
}
.van-steps{
padding: 2% 6% 0;
}
.topTit{
font-size: 0.45rem;
background-color: #1D6FE9;
color: #FFFFFF;
line-height: 58px;
text-align: center;
padding: 15px 0;
box-shadow: 0px 3px 6px 0px rgba(15,67,145,0.40);
}
.main_title{
font-size: 0.4rem;
color: #1D6FE9;
margin: 0.2rem 6%;
position: relative;
}
.main_box{
width: 96%;
margin: 0 auto;
border-radius: 6px;
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
overflow: hidden;
background-color: #FFF;
}
.collapse{
width: 96%;
margin: 0 auto;
border-radius: 6px;
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
overflow: hidden;
margin-bottom: 15px;
}
/deep/.van-radio--horizontal{
margin-left: 20px;
margin-right: 0;
}
.file-box{
padding: 2% 5% 0;
}
.submitButton{
width: 80%;
margin: 0 auto;
border-radius: 14px;
}
.timeTit{
text-align: center;
font-size: 16px;
line-height: 27px;
}
.action-box{
padding: 15px 0!important;
margin-top: 0.4rem;
}
.check-box{
margin-top: 0.4rem;
}
.addFamily{
position: absolute;
top: -2px;
right: 0;
border-radius: 50%;
display: inline-block;
width: 0.7rem;
height: 0.7rem;
}
.deleteFamily{
position: absolute;
top: -0.35rem;
right: 6%;
z-index: 9;
border-radius: 50%;
display: inline-block;
width: 0.7rem;
height: 0.7rem;
}
.familyList{
margin-top: 0.4rem;
position: relative;
}
.noModify{
.topTit{
background-color:#ABABAB ;
box-shadow: 0px 3px 6px 0px rgba(171,171,171,0.40);
}
.van-cell__title{
color: #B4B0B0;
}
}
.flow_main_box{
width: 96%;
margin: 0 auto;
border-radius: 6px;
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
overflow: hidden;
background-color: #FFF;
margin-top: 2%;
padding: 5% 1%;
.van-col{
text-align: center;
}
.tit{
background: #1d6fe9;
border-radius: 12px;
font-size: 0.4rem;
font-family: Source Han Sans CN, Source Han Sans CN-Regular;
font-weight: 400;
color: #ffffff;
line-height: 0.65rem;
letter-spacing: 0px;
width: 70%;
margin: 0 auto;
}
.van-step--vertical{
padding-right: 0;
text-align: left;
}
.van-step--vertical:not(:last-child)::after{
border: none;
}
.van-step--finish{
color: #1d6fe9;
}
}
.van-goods-action {
justify-content: center;
}
</style>

+ 426
- 0
src/views/onlineHome/homestead/arbitration/arbitrationHandlerDetail.vue Переглянути файл

@@ -0,0 +1,426 @@
<template>
<div class="app-container">
<van-nav-bar
title="纠纷调请"
left-arrow
fixed
placeholder
@click-left="goBack()"
z-index="998"
>
</van-nav-bar>

<div class="main" style="padding-bottom: 1rem;">
<van-form ref="form">
<div :class="formEnabled.baseFormEnabled ? '' : 'noModify'">
<p class="topTit">纠纷处理员</p>
<template> <!-- 申请 基本信息 -->
<div>
<p class="main_title">基本信息</p>
<div class="main_box">
<van-field :readonly="!formEnabled.baseFormEnabled" v-model="arbitrationData.handlerName" label="调解/仲裁员" placeholder="调解/仲裁员" input-align="right" required :rules="[{ required: true }]"/>
<field-radio
v-model="arbitrationData.handlerType"
label="身份类型"
value-key="dictLabel"
data-key="dictValue"
:rules="[{ required: true }]"
required
:readonly="!formEnabled.baseFormEnabled"
:columns="options.handler_type"
/>
<van-field :readonly="!formEnabled.baseFormEnabled" v-model="arbitrationData.handlerPost" label="职务" placeholder="职务" input-align="right" required :rules="[{ required: true }]"/>
<van-field :readonly="!formEnabled.baseFormEnabled" v-model="arbitrationData.handlerPhone" label="联系方式" placeholder="联系方式" input-align="right" required :rules="[{pattern: /(^\d{7}(\d{4})?$)/}]"/>
</div>
</div>
</template>
</div>

</van-form>
</div>

<!-- 底部按钮 -->
<van-goods-action style="z-index: 999;">
<van-goods-action-button type="primary" text="保存" @click="onSubmit('add')" v-if="formEnabled.baseFormEnabled" />
<van-goods-action-button type="danger" text="删除" @click="onSubmit('del')" v-if="formEnabled.removeEnabled" />
</van-goods-action>
</div>
</template>

<script>

import FieldDatePicker from "@/components/form/FieldDatePicker";
import FieldRadio from "@/components/form/FieldRadio";
import {formatDate} from "element-ui/src/utils/date-util.js";
import {Dialog, Notify} from "vant";
import { addArbitrationHandler, getArbitrationHandlerDetail, editArbitrationHandler, removeArbitrationHandler } from "@/api/onlineHome/homestead/arbitration";

// 意图
const INTENT_VIEW = 1;
const INTENT_EDIT = 2;
const INTENT_ADD = 3;

export default {
name: "ArbitrationHandlerDetail",
components: {
FieldRadio, FieldDatePicker,},
data() {
return {
// 申请ID
id: '',
// 表单数据
arbitrationData: {
arbitrationId: this.$route.query.arbitrationId,
handlerPhone: '',
handlerPost: '',
handlerType: '1',
handlerName: '',
},
// 表单意图
operationIntent: INTENT_ADD,
// 显示控制
formVisible: {
},
// 表单启用控制
formEnabled: {
baseFormEnabled: false,
removeEnabled: false,
},
currentUserRole: null,
options: {
handler_type: [],
},
};
},
created() {
this.id = this.$route.query.id;
this.type = this.$route.query.type;
this.getFormIntent();
this.initOptions();
this.getDetail();
},
methods: {
// 初始化当前数据, 有ID则查询, 否则新增
getDetail(){
this.reset();
if(this.id)
{
getArbitrationHandlerDetail(this.id).then(response => {
this.init(response.data);
});
}
else
{
this.init();
}
},
// 全局初始化
init(value) {
const role = this.$store.getters.roles;
this.currentUserRole = role[0];

// 默认状态
this.formEnabled.baseFormEnabled = false;
this.formEnabled.removeEnabled = false;

switch (this.operationIntent) {
// 查看
case INTENT_VIEW:
this.arbitrationData = value;
this.formEnabled.removeEnabled = true;
break;

// 编辑
case INTENT_EDIT:
this.arbitrationData = value;
this.formEnabled.baseFormEnabled = true;
this.formEnabled.removeEnabled = true;
break;

// 新建
case INTENT_ADD:
this.formEnabled.baseFormEnabled = true;
break;
}
},
// 获取query的意图
getFormIntent() {
console.log(this.type);
switch (this.type) {
case 'view':
this.operationIntent = INTENT_VIEW;
break;
case 'modify':
this.operationIntent = INTENT_EDIT;
break;
case 'add':
default:
this.operationIntent = INTENT_ADD;
break;
}
return this.operationIntent;
},
// 获取日期, yyyy-MM-dd
getDate(d) {
return formatDate(d ? d : new Date(), 'yyyy-MM-dd');
},
// 初始化基础表单
reset() {
this.$set(this.arbitrationData, 'handlerPhone', '');
this.$set(this.arbitrationData, 'arbitrationId', this.$route.query.arbitrationId);
this.$set(this.arbitrationData, 'handlerName', '');
this.$set(this.arbitrationData, 'handlerPost', '');
this.$set(this.arbitrationData, 'handlerType', '1');
},
//返回上一步操作
goBack(){
this.$router.push({name: this.$router.back(-1)});
},
// 全局提交
onSubmit(intent){
console.log(this.arbitrationData, intent);
switch (intent) {
case 'add':
case 'modify':
this.saveArbitrationHandler();
break;
case 'del':
this.removeArbitrationHandler();
break;
default:
console.error('Unknown intent! ', intent);
break;
}
},
// 检查字符串, 不符合返回true
checkString(value, regexp) {
let res = value === undefined || value === null || value === '' || value.toString().trim().length === 0;
if(res)
return true;
if(regexp)
res = !value.match(regexp);
return res;
},
// 保存申请(是否提交)
saveArbitrationHandler() {
this.$refs.form.validate().then(() => {
console.log("进行保存", this.arbitrationData);
(this.arbitrationData.id ? editArbitrationHandler : addArbitrationHandler)(this.arbitrationData).then((response) => {
this.notify("保存成功", 'success');
this.goBack();
}).catch((e) => {
this.notify("保存失败!", 'danger');
}).finally(() => {
});
}).catch(e => {
this.notify('请填写完整表单', 'danger');
return;
});
},
// 请求结果提示工具函数
notify(message, type) {
Notify.clear();
Notify({ type: type || 'primary', message: message });
},
initOptions() {
this.arbitrationData.arbitrationId = this.$route.query.arbitrationId;
for(let k in this.options)
{
this.houseGetDicts(k).then((res) => {
this.options[k] = res.data;
});
}
},
// 删除
removeArbitrationHandler() {
Dialog.confirm({
title: '警告',
message: '确定删除?',
})
.then(() => {
removeArbitrationHandler(this.arbitrationData.id).then((response) => {
this.notify("删除成功", 'success');
this.goBack();
}).catch((e) => {
this.notify("删除失败!", 'danger');
}).finally(() => {
});
})
.catch(() => {
});
},
},
watch: {
}
}
</script>

<style scoped lang="scss">
.app-container {
padding-bottom: 5%;
}
.examine_box{
background-color: #1D6FE9!important;
padding: 0.18rem!important;
padding-left: 0!important;
border-radius: 0.15rem!important;
margin-top: 0.3rem!important;
}
.examine_box .van-col:first-child{
color: #FFF!important;
font-size: 0.45rem!important;
text-align: center!important;
}
.examine_box .van-col:last-child{
background-color: #FFF!important;
border-radius: 0.15rem!important;
overflow: hidden!important;
.van-radio-group--horizontal{
padding: 0.2rem 0;
border-bottom: 1px solid #eee;
}
}
#mapWrap{
width: 96%;
margin: 0 auto;
border-bottom-left-radius: 12px;
border-bottom-right-radius: 12px;
overflow: hidden;
}
.mapBox{
position: relative;
.mapBox_button{
position: absolute;
top: 0.2rem;
right: 2%;
}
}
.van-steps{
padding: 2% 6% 0;
}
.topTit{
font-size: 0.45rem;
background-color: #1D6FE9;
color: #FFFFFF;
line-height: 58px;
text-align: center;
padding: 15px 0;
box-shadow: 0px 3px 6px 0px rgba(15,67,145,0.40);
}
.main_title{
font-size: 0.4rem;
color: #1D6FE9;
margin: 0.2rem 6%;
position: relative;
}
.main_box{
width: 96%;
margin: 0 auto;
border-radius: 6px;
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
overflow: hidden;
background-color: #FFF;
}
.collapse{
width: 96%;
margin: 0 auto;
border-radius: 6px;
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
overflow: hidden;
margin-bottom: 15px;
}
/deep/.van-radio--horizontal{
margin-left: 20px;
margin-right: 0;
}
.file-box{
padding: 2% 5% 0;
}
.submitButton{
width: 80%;
margin: 0 auto;
border-radius: 14px;
}
.timeTit{
text-align: center;
font-size: 16px;
line-height: 27px;
}
.action-box{
padding: 15px 0!important;
margin-top: 0.4rem;
}
.check-box{
margin-top: 0.4rem;
}
.addFamily{
position: absolute;
top: -2px;
right: 0;
border-radius: 50%;
display: inline-block;
width: 0.7rem;
height: 0.7rem;
}
.deleteFamily{
position: absolute;
top: -0.35rem;
right: 6%;
z-index: 9;
border-radius: 50%;
display: inline-block;
width: 0.7rem;
height: 0.7rem;
}
.familyList{
margin-top: 0.4rem;
position: relative;
}
.noModify{
.topTit{
background-color:#ABABAB ;
box-shadow: 0px 3px 6px 0px rgba(171,171,171,0.40);
}
.van-cell__title{
color: #B4B0B0;
}
}
.flow_main_box{
width: 96%;
margin: 0 auto;
border-radius: 6px;
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
overflow: hidden;
background-color: #FFF;
margin-top: 2%;
padding: 5% 1%;
.van-col{
text-align: center;
}
.tit{
background: #1d6fe9;
border-radius: 12px;
font-size: 0.4rem;
font-family: Source Han Sans CN, Source Han Sans CN-Regular;
font-weight: 400;
color: #ffffff;
line-height: 0.65rem;
letter-spacing: 0px;
width: 70%;
margin: 0 auto;
}
.van-step--vertical{
padding-right: 0;
text-align: left;
}
.van-step--vertical:not(:last-child)::after{
border: none;
}
.van-step--finish{
color: #1d6fe9;
}
}
.van-goods-action {
justify-content: center;
}
</style>

+ 199
- 0
src/views/onlineHome/homestead/arbitration/arbitrationHandlerList.vue Переглянути файл

@@ -0,0 +1,199 @@
<template>
<div>
<van-nav-bar
left-arrow
title="调解/仲裁员"
fixed
placeholder
@click-left="$router.back()"
>
<template #right>
<van-icon name="add" size="20" @click="addArbitrationHandler"/>
</template>
</van-nav-bar>

<van-pull-refresh v-model="refreshing" @refresh="getList()">
<van-list
v-model="loading"
:finished="finished"
:immediate-check="false"
finished-text="没有更多了"
@load="getList('+1')"
>
<van-swipe-cell v-for="(item,index) in list" :key="index" class="delegate">
<van-cell :title="item.disputes" center @click="viewItem(item)">
<template #label>
<p style="font-weight: bold;">{{item.handlerPost}} {{item.handlerPhone}}</p>
</template>
<template #title>
<p style="font-weight: bold;">{{item.handlerName}}</p>
</template>
<template #right-icon>
<p :style="{'font-weight': 'bold',
color: {
'1': '#00FF00',
'2': '#FF0000',
}[item.handlerType],
}">{{formatDict(options.handler_type, item.handlerType)}}</p>
</template>
</van-cell>
<template #right>
<van-row style="height: 100%;">
<van-col style="height: 100%;">
<van-button square text="编辑" type="info" style="height: 100%;" @click="editItem(item)"/>
</van-col>
<van-col style="height: 100%;">
<van-button square text="删除" type="danger" style="height: 100%;" @click="removeItem(item)"/>
</van-col>
</van-row>
</template>
</van-swipe-cell>
</van-list>
</van-pull-refresh>

<!-- <onlineHomeIndex :current="1"></onlineHomeIndex>-->

</div>
</template>

<script>
import {getArbitrationHandlerList, removeArbitrationHandler} from "@/api/onlineHome/homestead/arbitration";
import FieldSelect from "@/components/form/FieldSelect";
import { formatDate } from "element-ui/src/utils/date-util.js"
import {Dialog, ImagePreview, Notify} from 'vant';
import onlineHomeIndex from "@/views/onlineHomeIndex";
import FieldDatePicker from "@/components/form/FieldDatePicker";

export default {
components: {FieldSelect, onlineHomeIndex, FieldDatePicker},
name: "ArbitrationHandlerList",
data() {
return {
list: [],
total: 0,
queryParams: {
arbitrationId: null,
pageNum: 1,
pageSize: 10,
orderByColumn: 'createTime',
isAsc: 'desc',
},
refreshing: false,
loading: false,
finished: false,
options: {
handler_type: [],
},
}
},
created() {
this.initOptions();
this.getList();
},
methods: {
getList(target) {
if(this.loading) return;
let type = typeof (target);
console.log(type, target);
if (target === 0) {
this.refreshing = true;
this.finished = false;
this.total = 0;
this.queryParams.pageNum = 1;
this.list = [];
this.filterVisible = false;
}
else if (type === 'number')
this.queryParams.pageNum = target;
else if (type === 'string') {
this.queryParams.pageNum = eval(this.queryParams.pageNum + target)
}
else
{
this.refreshing = true;
this.finished = false;
this.total = 0;
this.queryParams.pageNum = 1;
this.list = []
}
getArbitrationHandlerList(this.queryParams).then((response) => {
console.log(response)
if (response.rows.length === 0) {
this.finished = true;
return;
}
response.rows.forEach((e) => {
this.list.push(e);
});
this.total += response.rows.length;
if (this.total >= response.total) {
this.finished = true;
}
}).finally(() => {
this.loading = false;
this.refreshing = false;
});
},
viewItem(item) {
this.$router.push({name:'arbitrationHandlerDetail', query: {
type: 'view',
id: item.id,
}});
},
editItem(item) {
this.$router.push({name:'arbitrationHandlerDetail', query: {
type: 'modify',
id: item.id,
}});
},
removeItem(item) {
Dialog.confirm({
title: '警告',
message: '确定删除?',
})
.then(() => {
removeArbitrationHandler(item.id).then((response) => {
this.notify("删除成功", 'success');
this.getList();
}).catch((e) => {
this.notify("删除失败!", 'danger');
}).finally(() => {
});
})
.catch(() => {
});
},
notify(message, type) {
Notify.clear();
Notify({ type: type || 'primary', message: message });
},
initOptions() {
this.queryParams.arbitrationId = this.$route.query.arbitrationId;
for(let k in this.options)
{
this.houseGetDicts(k).then((res) => {
this.options[k] = res.data;
});
}
},
formatDict(dict, value) {
return this.selectDictLabel(dict, value);
},
addArbitrationHandler() {
this.$router.push({name:'arbitrationHandlerDetail', query: {
arbitrationId: this.queryParams.arbitrationId,
}});
},
},
}
</script>

<style scoped>
.delegate {
width: 96%;
margin: 3% 2% 3% 2%;
border-radius: 0.18rem;
overflow: hidden;
box-shadow: 0.1rem 0.1rem 0.15rem 0.02rem rgba(0,0,0,0.16);
}
</style>

+ 224
- 0
src/views/onlineHome/homestead/arbitration/arbitrationList.vue Переглянути файл

@@ -0,0 +1,224 @@
<template>
<div>
<van-nav-bar
left-arrow
title="纠纷调请"
fixed
placeholder
@click-left="$router.back()"
>
<template #right>
<van-icon name="add" size="20" @click="addArbitration"/>
</template>
</van-nav-bar>

<van-pull-refresh v-model="refreshing" @refresh="getList()">
<van-list
v-model="loading"
:finished="finished"
:immediate-check="false"
finished-text="没有更多了"
@load="getList('+1')"
>
<van-swipe-cell v-for="(item,index) in list" :key="index" class="delegate">
<van-cell :title="item.disputes" center @click="viewItem(item)">
<template #label>
<p style="font-weight: bold;">{{item.applyTime}}</p>
</template>
<template #title>
<p style="font-weight: bold;">{{item.disputes}}</p>
</template>
<template #right-icon>
<p :style="{'font-weight': 'bold',
color: {
'1': '#000000',
'2': '#000000',
'3': '#00FF00',
'4': '#FF0000',
'5': '#00FF00',
'6': '#00FF00',
'7': '#00FF00',
}[item.dispute_status],
}">{{formatDict(options.dispute_status, item.disputeStatus)}}</p>
</template>
</van-cell>
<template #right>
<van-row style="height: 100%;">
<van-col style="height: 100%;">
<van-button v-if="item.disputeStatus == '1'" square text="编辑" type="info" style="height: 100%;" @click="editItem(item)"/>
</van-col>
<van-col style="height: 100%;">
<van-button v-if="item.disputeStatus == '1'" square text="提交" type="primary" style="height: 100%;" @click="submitItem(item)"/>
</van-col>
<van-col style="height: 100%;">
<van-button v-if="item.disputeStatus == '1'" square text="删除" type="danger" style="height: 100%;" @click="removeItem(item)"/>
</van-col>
</van-row>
</template>
</van-swipe-cell>
</van-list>
</van-pull-refresh>

<!-- <onlineHomeIndex :current="1"></onlineHomeIndex>-->

</div>
</template>

<script>
import {getArbitrationList, submitArbitration, removeArbitration} from "@/api/onlineHome/homestead/arbitration";
import { formatDate } from "element-ui/src/utils/date-util.js"
import {Dialog, ImagePreview, Notify} from 'vant';
import onlineHomeIndex from "@/views/onlineHomeIndex";

export default {
components: {onlineHomeIndex, },
name: "ArbitrationList",
data() {
return {
list: [],
total: 0,
queryParams: {
pageNum: 1,
pageSize: 10,
orderByColumn: 'createTime',
isAsc: 'desc',
disputeStatus: null,
},
refreshing: false,
loading: false,
finished: false,
options: {
dispute_status: [],
},
}
},
created() {
this.initOptions();
this.getList();
},
methods: {
getList(target) {
if(this.loading) return;
let type = typeof (target);
console.log(type, target);
if (target === 0) {
this.refreshing = true;
this.finished = false;
this.total = 0;
this.queryParams.pageNum = 1;
this.list = [];
this.filterVisible = false;
}
else if (type === 'number')
this.queryParams.pageNum = target;
else if (type === 'string') {
this.queryParams.pageNum = eval(this.queryParams.pageNum + target)
}
else
{
this.refreshing = true;
this.finished = false;
this.total = 0;
this.queryParams.pageNum = 1;
this.list = []
}
getArbitrationList(this.queryParams).then((response) => {
console.log(response)
if (response.rows.length === 0) {
this.finished = true;
return;
}
response.rows.forEach((e) => {
this.list.push(e);
});
this.total += response.rows.length;
if (this.total >= response.total) {
this.finished = true;
}
}).finally(() => {
this.loading = false;
this.refreshing = false;
});
},
viewItem(item) {
this.$router.push({name:'arbitrationDetail', query: {
type: 'view',
id: item.id,
}});
},
editItem(item) {
this.$router.push({name:'arbitrationDetail', query: {
type: 'modify',
id: item.id,
}});
},
submitItem(item) {
if(item.disputeStatus != '1')
{
this.notify('只有草稿才可提交', 'danger');
return;
}

submitArbitration(item.id, '2').then((response) => {
this.notify("提交成功", 'success');
this.getList();
}).catch((e) => {
this.notify("提交失败!", 'danger');
}).finally(() => {
});
},
notify(message, type) {
Notify.clear();
Notify({ type: type || 'primary', message: message });
},
initOptions() {
for(let k in this.options)
{
this.houseGetDicts(k).then((res) => {
this.options[k] = res.data;
});
}
},
formatDict(dict, value) {
return this.selectDictLabel(dict, value);
},
addArbitration() {
this.$router.push({name:'arbitrationDetail', query: {
type: 'add',
}});
},
removeItem(item) {
if(item.disputeStatus != '1')
{
this.notify("只允许删除草稿!", 'danger');
return;
}
Dialog.confirm({
title: '警告',
message: '确定删除?',
})
.then(() => {
removeArbitration(item.id).then((response) => {
this.notify("删除成功", 'success');
this.getList();
}).catch((e) => {
this.notify("删除失败!", 'danger');
}).finally(() => {
});
})
.catch(() => {
});
},
},
}
</script>

<style scoped>
.delegate {
width: 96%;
margin: 3% 2% 3% 2%;
border-radius: 0.18rem;
overflow: hidden;
box-shadow: 0.1rem 0.1rem 0.15rem 0.02rem rgba(0,0,0,0.16);
}
</style>

+ 451
- 0
src/views/onlineHome/homestead/arbitration/arbitrationProcessDetail.vue Переглянути файл

@@ -0,0 +1,451 @@
<template>
<div class="app-container">
<van-nav-bar
title="纠纷调请"
left-arrow
fixed
placeholder
@click-left="goBack()"
z-index="998"
>
</van-nav-bar>

<div class="main" style="padding-bottom: 1rem;">
<van-form ref="form">
<div :class="formEnabled.baseFormEnabled ? '' : 'noModify'">
<p class="topTit">纠纷处理过程</p>
<template> <!-- 申请 基本信息 -->
<div>
<p class="main_title">基本信息</p>
<div class="main_box">
<van-field :readonly="!formEnabled.baseFormEnabled" v-model="arbitrationData.handlerName" label="负责人" placeholder="负责人" input-align="right" required :rules="[{ required: true }]"/>
<field-date-picker
v-model="arbitrationData.handleTime"
label="申请时间"
placeholder="请选择申请时间"
:rules="[{ required: true }]"
formatter="yyyy-MM-dd"
required
:readonly="!formEnabled.baseFormEnabled"
/>

<field-radio
v-model="arbitrationData.handlerType"
label="处理方式"
value-key="dictLabel"
data-key="dictValue"
:rules="[{ required: true }]"
required
:readonly="!formEnabled.baseFormEnabled"
:columns="options.handler_type"
/>

</div>
</div>

<div>
<p class="main_title">处理结果</p>
<div class="main_box">
<van-field
rows="3"
autosize
type="textarea"
placeholder="请输入处理结果"
input-align="left"
v-model="arbitrationData.handleResult"
:readonly="!formEnabled.baseFormEnabled"
:rules="[{ required: true }]" required
/>
</div>
</div>
</template>
</div>

</van-form>
</div>

<!-- 底部按钮 -->
<van-goods-action style="z-index: 999;">
<van-goods-action-button type="primary" text="保存" @click="onSubmit('add')" v-if="formEnabled.baseFormEnabled" />
<van-goods-action-button type="danger" text="删除" @click="onSubmit('del')" v-if="formEnabled.removeEnabled" />
</van-goods-action>
</div>
</template>

<script>

import FieldDatePicker from "@/components/form/FieldDatePicker";
import FieldRadio from "@/components/form/FieldRadio";
import {formatDate} from "element-ui/src/utils/date-util.js";
import {Dialog, Notify} from "vant";
import { addArbitrationProcess, getArbitrationProcessDetail, editArbitrationProcess, removeArbitrationProcess } from "@/api/onlineHome/homestead/arbitration";

// 意图
const INTENT_VIEW = 1;
const INTENT_EDIT = 2;
const INTENT_ADD = 3;

export default {
name: "ArbitrationProcessDetail",
components: {
FieldRadio, FieldDatePicker,},
data() {
return {
// 申请ID
id: '',
// 表单数据
arbitrationData: {
arbitrationId: this.$route.query.arbitrationId,
handleResult: '',
handleTime: '',
handlerType: '1',
handlerName: '',
},
// 表单意图
operationIntent: INTENT_ADD,
// 显示控制
formVisible: {
},
// 表单启用控制
formEnabled: {
baseFormEnabled: false,
removeEnabled: false,
},
currentUserRole: null,
options: {
handler_type: [],
},
};
},
created() {
this.id = this.$route.query.id;
this.type = this.$route.query.type;
this.getFormIntent();
this.initOptions();
this.getDetail();
},
methods: {
// 初始化当前数据, 有ID则查询, 否则新增
getDetail(){
this.reset();
if(this.id)
{
getArbitrationProcessDetail(this.id).then(response => {
this.init(response.data);
});
}
else
{
this.init();
}
},
// 全局初始化
init(value) {
const role = this.$store.getters.roles;
this.currentUserRole = role[0];

// 默认状态
this.formEnabled.baseFormEnabled = false;
this.formEnabled.removeEnabled = false;

switch (this.operationIntent) {
// 查看
case INTENT_VIEW:
this.arbitrationData = value;
this.formEnabled.removeEnabled = true;
break;

// 编辑
case INTENT_EDIT:
this.arbitrationData = value;
this.formEnabled.baseFormEnabled = true;
this.formEnabled.removeEnabled = true;
break;

// 新建
case INTENT_ADD:
this.formEnabled.baseFormEnabled = true;
break;
}
},
// 获取query的意图
getFormIntent() {
console.log(this.type);
switch (this.type) {
case 'view':
this.operationIntent = INTENT_VIEW;
break;
case 'modify':
this.operationIntent = INTENT_EDIT;
break;
case 'add':
default:
this.operationIntent = INTENT_ADD;
break;
}
return this.operationIntent;
},
// 获取日期, yyyy-MM-dd
getDate(d) {
return formatDate(d ? d : new Date(), 'yyyy-MM-dd');
},
// 初始化基础表单
reset() {
this.$set(this.arbitrationData, 'handleResult', '');
this.$set(this.arbitrationData, 'arbitrationId', this.$route.query.arbitrationId);
this.$set(this.arbitrationData, 'handlerName', '');
this.$set(this.arbitrationData, 'handlerType', '1');
this.$set(this.arbitrationData, 'handleTime', this.getDate());
},
//返回上一步操作
goBack(){
this.$router.push({name: this.$router.back(-1)});
},
// 全局提交
onSubmit(intent){
console.log(this.arbitrationData, intent);
switch (intent) {
case 'add':
case 'modify':
this.saveArbitrationProcess();
break;
case 'del':
this.removeArbitrationProcess();
break;
default:
console.error('Unknown intent! ', intent);
break;
}
},
// 检查字符串, 不符合返回true
checkString(value, regexp) {
let res = value === undefined || value === null || value === '' || value.toString().trim().length === 0;
if(res)
return true;
if(regexp)
res = !value.match(regexp);
return res;
},
// 保存申请(是否提交)
saveArbitrationProcess() {
this.$refs.form.validate().then(() => {
console.log("进行保存", this.arbitrationData);
(this.arbitrationData.id ? editArbitrationProcess : addArbitrationProcess)(this.arbitrationData).then((response) => {
this.notify("保存成功", 'success');
this.goBack();
}).catch((e) => {
this.notify("保存失败!", 'danger');
}).finally(() => {
});
}).catch(e => {
this.notify('请填写完整表单', 'danger');
return;
});
},
// 请求结果提示工具函数
notify(message, type) {
Notify.clear();
Notify({ type: type || 'primary', message: message });
},
initOptions() {
this.arbitrationData.arbitrationId = this.$route.query.arbitrationId;
for(let k in this.options)
{
this.houseGetDicts(k).then((res) => {
this.options[k] = res.data;
});
}
},
// 删除
removeArbitrationProcess() {
Dialog.confirm({
title: '警告',
message: '确定删除?',
})
.then(() => {
removeArbitrationProcess(this.arbitrationData.id).then((response) => {
this.notify("删除成功", 'success');
this.goBack();
}).catch((e) => {
this.notify("删除失败!", 'danger');
}).finally(() => {
});
})
.catch(() => {
});
},
},
watch: {
}
}
</script>

<style scoped lang="scss">
.app-container {
padding-bottom: 5%;
}
.examine_box{
background-color: #1D6FE9!important;
padding: 0.18rem!important;
padding-left: 0!important;
border-radius: 0.15rem!important;
margin-top: 0.3rem!important;
}
.examine_box .van-col:first-child{
color: #FFF!important;
font-size: 0.45rem!important;
text-align: center!important;
}
.examine_box .van-col:last-child{
background-color: #FFF!important;
border-radius: 0.15rem!important;
overflow: hidden!important;
.van-radio-group--horizontal{
padding: 0.2rem 0;
border-bottom: 1px solid #eee;
}
}
#mapWrap{
width: 96%;
margin: 0 auto;
border-bottom-left-radius: 12px;
border-bottom-right-radius: 12px;
overflow: hidden;
}
.mapBox{
position: relative;
.mapBox_button{
position: absolute;
top: 0.2rem;
right: 2%;
}
}
.van-steps{
padding: 2% 6% 0;
}
.topTit{
font-size: 0.45rem;
background-color: #1D6FE9;
color: #FFFFFF;
line-height: 58px;
text-align: center;
padding: 15px 0;
box-shadow: 0px 3px 6px 0px rgba(15,67,145,0.40);
}
.main_title{
font-size: 0.4rem;
color: #1D6FE9;
margin: 0.2rem 6%;
position: relative;
}
.main_box{
width: 96%;
margin: 0 auto;
border-radius: 6px;
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
overflow: hidden;
background-color: #FFF;
}
.collapse{
width: 96%;
margin: 0 auto;
border-radius: 6px;
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
overflow: hidden;
margin-bottom: 15px;
}
/deep/.van-radio--horizontal{
margin-left: 20px;
margin-right: 0;
}
.file-box{
padding: 2% 5% 0;
}
.submitButton{
width: 80%;
margin: 0 auto;
border-radius: 14px;
}
.timeTit{
text-align: center;
font-size: 16px;
line-height: 27px;
}
.action-box{
padding: 15px 0!important;
margin-top: 0.4rem;
}
.check-box{
margin-top: 0.4rem;
}
.addFamily{
position: absolute;
top: -2px;
right: 0;
border-radius: 50%;
display: inline-block;
width: 0.7rem;
height: 0.7rem;
}
.deleteFamily{
position: absolute;
top: -0.35rem;
right: 6%;
z-index: 9;
border-radius: 50%;
display: inline-block;
width: 0.7rem;
height: 0.7rem;
}
.familyList{
margin-top: 0.4rem;
position: relative;
}
.noModify{
.topTit{
background-color:#ABABAB ;
box-shadow: 0px 3px 6px 0px rgba(171,171,171,0.40);
}
.van-cell__title{
color: #B4B0B0;
}
}
.flow_main_box{
width: 96%;
margin: 0 auto;
border-radius: 6px;
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
overflow: hidden;
background-color: #FFF;
margin-top: 2%;
padding: 5% 1%;
.van-col{
text-align: center;
}
.tit{
background: #1d6fe9;
border-radius: 12px;
font-size: 0.4rem;
font-family: Source Han Sans CN, Source Han Sans CN-Regular;
font-weight: 400;
color: #ffffff;
line-height: 0.65rem;
letter-spacing: 0px;
width: 70%;
margin: 0 auto;
}
.van-step--vertical{
padding-right: 0;
text-align: left;
}
.van-step--vertical:not(:last-child)::after{
border: none;
}
.van-step--finish{
color: #1d6fe9;
}
}
.van-goods-action {
justify-content: center;
}
</style>

+ 199
- 0
src/views/onlineHome/homestead/arbitration/arbitrationProcessList.vue Переглянути файл

@@ -0,0 +1,199 @@
<template>
<div>
<van-nav-bar
left-arrow
title="纠纷处理"
fixed
placeholder
@click-left="$router.back()"
>
<template #right>
<van-icon name="add" size="20" @click="addArbitrationProcess"/>
</template>
</van-nav-bar>

<van-pull-refresh v-model="refreshing" @refresh="getList()">
<van-list
v-model="loading"
:finished="finished"
:immediate-check="false"
finished-text="没有更多了"
@load="getList('+1')"
>
<van-swipe-cell v-for="(item,index) in list" :key="index" class="delegate">
<van-cell :title="item.disputes" center @click="viewItem(item)">
<template #label>
<p style="font-weight: bold;">{{item.handleTime}}</p>
</template>
<template #title>
<p style="font-weight: bold;">{{item.handlerName}}</p>
</template>
<template #right-icon>
<p :style="{'font-weight': 'bold',
color: {
'1': '#00FF00',
'2': '#FF0000',
}[item.handlerType],
}">{{formatDict(options.handler_type, item.handlerType)}}</p>
</template>
</van-cell>
<template #right>
<van-row style="height: 100%;">
<van-col style="height: 100%;">
<van-button square text="编辑" type="info" style="height: 100%;" @click="editItem(item)"/>
</van-col>
<van-col style="height: 100%;">
<van-button square text="删除" type="danger" style="height: 100%;" @click="removeItem(item)"/>
</van-col>
</van-row>
</template>
</van-swipe-cell>
</van-list>
</van-pull-refresh>

<!-- <onlineHomeIndex :current="1"></onlineHomeIndex>-->

</div>
</template>

<script>
import {getArbitrationProcessList, removeArbitrationProcess} from "@/api/onlineHome/homestead/arbitration";
import FieldSelect from "@/components/form/FieldSelect";
import { formatDate } from "element-ui/src/utils/date-util.js"
import {Dialog, ImagePreview, Notify} from 'vant';
import onlineHomeIndex from "@/views/onlineHomeIndex";
import FieldDatePicker from "@/components/form/FieldDatePicker";

export default {
components: {FieldSelect, onlineHomeIndex, FieldDatePicker},
name: "ArbitrationProcessList",
data() {
return {
list: [],
total: 0,
queryParams: {
arbitrationId: null,
pageNum: 1,
pageSize: 10,
orderByColumn: 'createTime',
isAsc: 'desc',
},
refreshing: false,
loading: false,
finished: false,
options: {
handler_type: [],
},
}
},
created() {
this.initOptions();
this.getList();
},
methods: {
getList(target) {
if(this.loading) return;
let type = typeof (target);
console.log(type, target);
if (target === 0) {
this.refreshing = true;
this.finished = false;
this.total = 0;
this.queryParams.pageNum = 1;
this.list = [];
this.filterVisible = false;
}
else if (type === 'number')
this.queryParams.pageNum = target;
else if (type === 'string') {
this.queryParams.pageNum = eval(this.queryParams.pageNum + target)
}
else
{
this.refreshing = true;
this.finished = false;
this.total = 0;
this.queryParams.pageNum = 1;
this.list = []
}
getArbitrationProcessList(this.queryParams).then((response) => {
console.log(response)
if (response.rows.length === 0) {
this.finished = true;
return;
}
response.rows.forEach((e) => {
this.list.push(e);
});
this.total += response.rows.length;
if (this.total >= response.total) {
this.finished = true;
}
}).finally(() => {
this.loading = false;
this.refreshing = false;
});
},
viewItem(item) {
this.$router.push({name:'arbitrationProcessDetail', query: {
type: 'view',
id: item.id,
}});
},
editItem(item) {
this.$router.push({name:'arbitrationProcessDetail', query: {
type: 'modify',
id: item.id,
}});
},
removeItem(item) {
Dialog.confirm({
title: '警告',
message: '确定删除?',
})
.then(() => {
removeArbitrationProcess(item.id).then((response) => {
this.notify("删除成功", 'success');
this.getList();
}).catch((e) => {
this.notify("删除失败!", 'danger');
}).finally(() => {
});
})
.catch(() => {
});
},
notify(message, type) {
Notify.clear();
Notify({ type: type || 'primary', message: message });
},
initOptions() {
this.queryParams.arbitrationId = this.$route.query.arbitrationId;
for(let k in this.options)
{
this.houseGetDicts(k).then((res) => {
this.options[k] = res.data;
});
}
},
formatDict(dict, value) {
return this.selectDictLabel(dict, value);
},
addArbitrationProcess() {
this.$router.push({name:'arbitrationProcessDetail', query: {
arbitrationId: this.queryParams.arbitrationId,
}});
},
},
}
</script>

<style scoped>
.delegate {
width: 96%;
margin: 3% 2% 3% 2%;
border-radius: 0.18rem;
overflow: hidden;
box-shadow: 0.1rem 0.1rem 0.15rem 0.02rem rgba(0,0,0,0.16);
}
</style>

+ 8
- 0
src/views/onlineHome/workbench.vue Переглянути файл

@@ -547,6 +547,14 @@
</div>
<p style="margin-top: 5px;color: #666666;">违法监管</p>
</van-grid-item>
<van-grid-item text="纠纷调请" :to="{name:'arbitrationList'}" >
<div slot="default">
<div class="icon" style="background:#1D6FE9;">
<img src="../../../static/images/onlineHome/icon_Z12.png" alt />
</div>
</div>
<p style="margin-top: 5px;color: #666666;">纠纷调请</p>
</van-grid-item>
</van-grid>
</van-row>



Завантаження…
Відмінити
Зберегти