71caab04 by xiaomiao

Merge branch 'dev'

2 parents f042a339 2344ae34
Showing 307 changed files with 2229 additions and 1248 deletions
#
# @Description: 项目的编码规范
# @Autor: renchao
# @LastEditTime: 2023-07-20 15:13:34
#
# https://editorconfig.org
root = true
......
/*
* @Description: 定义Babel在转换JavaScript代码
* @Autor: renchao
* @LastEditTime: 2023-07-20 15:12:44
*/
module.exports = {
presets: [
// https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
......
......@@ -83,4 +83,4 @@
"type": "git",
"url": "git+https://github.com/PanJiaChen/vue-element-admin.git"
}
}
}
\ No newline at end of file
......
/*
* @Description: CSS处理和移动端适配方案
* @Autor: renchao
* @LastEditTime: 2023-07-20 14:40:12
*/
module.exports = {
plugins: {
autoprefixer: {}
......
/*
* @Description:
* @Description: 不动产权证
* @Autor: renchao
* @LastEditTime: 2023-05-16 14:04:18
*/
......@@ -130,4 +130,4 @@ export function bdcqzPreview (data) {
data,
responseType: 'blob'
})
}
\ No newline at end of file
}
......
/*
* @Description: 业务办理
* @Autor: renchao
* @LastEditTime: 2023-07-19 14:53:41
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
/**
* @description: 业务办理-获取收藏业务集合
* @author: renchao
*/
export function getCollectBiz () {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/BusinessApply/getCollectBiz',
method: 'post'
})
}
/**
* @description: 业务办理-获取左侧菜单
* @author: renchao
*/
export function getleftMenu () {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/BusinessApply/getleftMenu',
method: 'post'
})
}
/**
* @description: 登记簿补录
* @author: renchao
*/
export function getRepairBiz () {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/BusinessApply/getRepairBiz',
method: 'post'
})
}
/**
* @description: 一并申请业务
* @author: renchao
*/
export function getTogetherBiz () {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/BusinessApply/getTogetherBiz',
method: 'post'
})
}
/**
* @description: 业务办理-获取下个节点内容
* @param {*} bsmSqyw
* @author: renchao
*/
export function getNextNode (bsmSqyw) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/BusinessApply/getNextNode?parentid=' + bsmSqyw,
method: 'post'
})
}
/**
* @description: 业务办理-业务申请-添加收藏业务
* @param {*} bsmSqyw
* @author: renchao
*/
export function addCollectBiz (bsmSqyw) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/BusinessApply/addCollectBiz?bsmSqyw=' + bsmSqyw,
method: 'post'
})
}
/**
* @description: 业务办理-业务申请-取消收藏业务
* @param {*} bsmSqyw
* @author: renchao
*/
export function deleteCollectBiz (bsmSqyw) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/BusinessApply/deleteCollectBiz?bsmSqyw=' + bsmSqyw,
method: 'post'
})
}
/*
* @Description:
* @Description: 材料信息
* @Autor: renchao
* @LastEditTime: 2023-05-16 14:04:42
*/
......
/*
* @Description: 字典接口
* @Autor: renchao
* @LastEditTime: 2023-05-16 16:06:51
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
/**
* @description: 获取全部字典数据
* @author: renchao
*/
export function getAllDict () {
return request({
url: SERVER.SERVERAPI + '/rest/sys/dict/getAllDict',
method: 'post'
})
}
/**
* @description: getQlxxDictList
* @param {*} data
* @author: renchao
*/
export function getQlxxDictList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/sys/dict/getQlxxDictList',
method: 'post',
data
})
}
/**
* @description: 获取字典子级列表
* @param {*} bsmDict
* @author: renchao
*/
export function getChildDictList (bsmDict) {
return request({
url: SERVER.SERVERAPI + '/rest/sys/dict/getChildDictList',
method: 'get',
params: {
bsmDict: bsmDict
}
})
}
/**
* @description: 编辑字典数据
* @param {*} data
* @author: renchao
*/
export function editDictNode (data) {
return request({
url: SERVER.SERVERAPI + '/rest/sys/dict/editDictNode',
method: 'post',
data
})
}
/**
* @description: 刷新字典缓存
* @author: renchao
*/
export function refreshDictCache () {
return request({
url: SERVER.SERVERAPI + '/rest/sys/dict/refreshDictCache',
method: 'get'
})
}
......@@ -18,7 +18,18 @@ export function getDjbfm (data) {
params: data
})
}
/**
* @description: 获取权利类型数组
* @param {*} params
* @author: renchao
*/
export function getQllxByBdcdyid (params) {
return request({
url: SERVER.SERVERAPI + '/rest/djbDetail/getQllxByBdcdyid',
method: 'get',
params
})
}
/**
* @description: 获取登记目录
* @param {*} data
......
......@@ -49,7 +49,7 @@ export function deleteRepairRecord (params) {
*/
export function init (params) {
return request({
url: SERVER.SERVERAPI + '/rest/djbRepair/init?bsmRepair='+params,
url: SERVER.SERVERAPI + '/rest/djbRepair/init?bsmRepair='+params.bsmRepair+'&isEdit='+params.isEdit,
method: 'get',
})
}
......@@ -66,31 +66,45 @@ export function leftMenubl (params) {
params
})
}
/**
* @description: 获取权利类型数组
* @param {*} params
* @description: 保存数据
* @param {*} data
* @author: renchao
*/
export function save (data) {
return request({
url: SERVER.SERVERAPI + '/rest/djbRepair/save',
method: 'post',
data
})
}
/**
* @description: 获取上手信息
* @param {*} data
* @author: renchao
*/
export function getQllxByBdcdyid (params) {
export function getSsQlxx (params) {
return request({
url: SERVER.SERVERAPI + '/rest/djbDetail/getQllxByBdcdyid',
url: SERVER.SERVERAPI + '/rest/djbRepair/getSsQlxx',
method: 'get',
params
})
}
/**
* @description: 保存数据
* @description: 获取主体信息
* @param {*} data
* @author: renchao
*/
export function save (data) {
export function getZtQlxx (params) {
return request({
url: SERVER.SERVERAPI + '/rest/djbRepair/save',
method: 'post',
data
url: SERVER.SERVERAPI + '/rest/djbRepair/getZtQlxx',
method: 'get',
params
})
}
/**
* @description: 发起业务申请流程
* @param {*} data
......@@ -103,3 +117,28 @@ export function save (data) {
data
})
}
/**
* @description: 添加审核意见
* @param {*} data
* @author: renchao
*/
export function addidea (data) {
return request({
url: SERVER.SERVERAPI + '/rest/djbRepair/sh',
method: 'post',
data
})
}
/**
* @description: 添加审核意见
* @param {*} data
* @author: renchao
*/
export function getShList (data) {
console.log(data);
return request({
url: SERVER.SERVERAPI + '/rest/djbRepair/getShList?bsmRepair='+data.bsmRepair,
method: 'post',
data
})
}
......
/*
* @Description:
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-05-16 13:36:44
*/
......@@ -8,3 +8,16 @@ let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('Ap
export function uploadUrl () {
return process.env.VUE_APP_BASE_API + SERVER.SERVERAPI + '/file/upload'
}
/**
* @description: 上传单个文件
* @param {*} data
* @author: renchao
*/
export function upload (data) {
return request({
url: SERVER.SERVERAPI + '/rest/file/upload',
method: 'post',
data
})
}
......
// 封装axios请求
import axios from "axios";
// 创建axios的对象
const instance = axios.create({
baseURL: "http://192.168.2.235/management/rest/users",
})
export const getusername = (data) => instance({
url: '', // 请求地址
method: 'get',
params:{
queryOptions: {
conditionGroup: {
conditions: [
{
property: "loginName",
value:data,
operator: "IN",
},
],
queryRelation: "AND",
},
orderBys:[{"property":"sort","direction":"desc"}]
},
},
})
/*
* @Description:
* @Description: 家庭房产信息
* @Autor: renchao
* @LastEditTime: 2023-05-16 14:05:25
*/
......
/*
* @Description:
* @Description: 楼盘表查询
* @Autor: renchao
* @LastEditTime: 2023-06-16 16:06:39
* @LastEditTime: 2023-07-19 15:00:43
*/
import request from "@/utils/request";
let SERVER = window.config
? window.config
: JSON.parse(localStorage.getItem("ApiUrl"));
const url = SERVER.SERVERAPI + "/rest/zhcx/lpcx/";
//
/**
* @description:楼盘查询- 根据条件进行列表查询
* @param {*} data
* @author: renchao
*/
export function getLpZrz(data) {
export function getLpZrz (data) {
return request({
url: "service-lpb-zq/rest/zhcx/lpcx/getLpZrz",
url: "service-lpb/rest/zhcx/lpcx/getLpZrz",
method: "post",
data: data,
});
......@@ -27,9 +26,9 @@ export function getLpZrz(data) {
* @param {*} zrzbsm
* @author: renchao
*/
export function getLpb(zrzbsm) {
export function getLpb (zrzbsm) {
return request({
url: "service-lpb-zq/rest/zhcx/lpcx/getLpb?scyclx=0&zrzbsm=" + zrzbsm,
url: "service-lpb/rest/zhcx/lpcx/getLpb?scyclx=0&zrzbsm=" + zrzbsm,
method: "get",
});
}
......@@ -38,10 +37,10 @@ export function getLpb(zrzbsm) {
* @param {*} zrzbsm
* @author: renchao
*/
export function getLpbFwytAndQlxz(zrzbsm) {
export function getLpbFwytAndQlxz (zrzbsm) {
return request({
url:
"service-lpb-zq/rest/zhcx/lpcx/getLpbFwytAndQlxz?scyclx=0&zrzbsm=" +
"service-lpb/rest/zhcx/lpcx/getLpbFwytAndQlxz?scyclx=0&zrzbsm=" +
zrzbsm,
method: "get",
});
......@@ -51,9 +50,9 @@ export function getLpbFwytAndQlxz(zrzbsm) {
* @param {*} zrzbsm
* @author: renchao
*/
export function getLpbQsxtj(zrzbsm) {
export function getLpbQsxtj (zrzbsm) {
return request({
url: "service-lpb-zq/rest/zhcx/lpcx/getLpbQsxtj?scyclx=0&zrzbsm=" + zrzbsm,
url: "service-lpb/rest/zhcx/lpcx/getLpbQsxtj?scyclx=0&zrzbsm=" + zrzbsm,
method: "get",
});
}
......@@ -65,9 +64,9 @@ export function getLpbQsxtj(zrzbsm) {
* scyclx 实测预测类型 0预测,1实测
* @return {*}
*/
export function getLpbTj(zrzbsm) {
export function getLpbTj (zrzbsm) {
return request({
url: "service-lpb-zq/rest/zhcx/lpcx/getLpbTj?scyclx=0&zrzbsm=" + zrzbsm,
url: "service-lpb/rest/zhcx/lpcx/getLpbTj?scyclx=0&zrzbsm=" + zrzbsm,
method: "get",
});
}
......
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-05-16 13:49:57
* @LastEditTime: 2023-05-16 14:01:26
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
/**
* @description: 获取自然幢下其他户
* @description: 获取审批意见
* @param {*} data
* @author: renchao
*/
export function selectOtherH (data) {
export function getSpyjList (data) {
return request({
url: 'ywbl/ywsq/selectOtherH',
url: SERVER.SERVERAPI + '/rest/ywbl/opinion/getSpyjList',
method: 'post',
data
})
}
/**
* @description: 业务办理-选择抵押权信息-根据条件进行列表查询
* @description: 保存审批意见
* @param {*} data
* @author: renchao
*/
export function selectDiyaq (data) {
export function saveSpyj (data) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/ywsq/selectDiyaq',
url: SERVER.SERVERAPI + '/rest/ywbl/opinion/saveSpyj',
method: 'post',
data
})
}
/**
* @description: 业务办理-选择查封信息-根据条件进行列表查询
* @description: 根据受理申请保存审批意见
* @param {*} data
* @author: renchao
*/
export function selectCfdj (data) {
export function saveSpyjBySlsq (data) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/ywsq/selectCfdj',
url: SERVER.SERVERAPI + '/rest/ywbl/opinion/saveSpyjBySlsq',
method: 'post',
data
})
}
/**
* @description: 业务办理-业务申请-添加收藏业务
* @param {*} bsmSqyw
* @description: 获取用户常用意见
* @param {*} data
* @author: renchao
*/
export function deleteCollectBiz (bsmSqyw) {
export function getUserCommonOpinion (data) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/BusinessApply/deleteCollectBiz?bsmSqyw=' + bsmSqyw,
method: 'post'
url: SERVER.SERVERAPI + '/rest/ywbl/opinion/getUserCommonOpinion',
method: 'post',
data
})
}
/**
* @description: 国有建设用地使用权/房屋使用权 -选择不动产单元
* @param {*} data
* @description: 新增用户常用意见
* @param {*} params
* @author: renchao
*/
export function choiceBdcdy (data) {
export function addUserCommonOpinion (params) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/choiceBdcdy',
method: 'post',
data
url: SERVER.SERVERAPI + '/rest/ywbl/opinion/addUserCommonOpinion',
method: 'get',
params
})
}
/**
* @description: 选择补录权利信息
* @param {*} data
* @description: 删除常用意见
* @param {*} params
* @author: renchao
*/
export function selectRepairQlxx (data) {
export function delUserCommonOpinion (params) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/ywsq/selectRepairQlxx',
method: 'post',
data
url: SERVER.SERVERAPI + '/rest/ywbl/opinion/delUserCommonOpinion',
method: 'get',
params
})
}
......
/*
* @Description: 模板管理
* @Autor: renchao
* @LastEditTime: 2023-05-16 16:02:32
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
/**
* @description: 获取打印模板列表
* @param {*} data
* @author: renchao
*/
export function selectPrintTemplateList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/print/selectPrintTemplateList',
method: 'post',
data
})
}
/**
* @description: 新增打印模板列表
* @param {*} data
* @author: renchao
*/
export function addPrintTemplate (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/print/addPrintTemplate',
method: 'post',
data
})
}
/**
* @description: 编辑打印模板列表
* @param {*} data
* @author: renchao
*/
export function editPrintTemplate (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/print/editPrintTemplate',
method: 'post',
data
})
}
/**
* @description: 删除打印模板列表
* @param {*} params
* @author: renchao
*/
export function delPrintTemplate (params) {
return request({
url: SERVER.SERVERAPI + '/rest/system/print/delPrintTemplate',
method: 'get',
params: params
})
}
/**
* @description: 根据模板编号获取打印模板
* @param {*} params
* @author: renchao
*/
export function getPrintTemplateByCode (params) {
return request({
url: SERVER.SERVERAPI + '/rest/system/print/getPrintTemplateByCode',
method: 'get',
params: params
})
}
/*
* @Description:
* @Description: 平台接口
* @Autor: renchao
* @LastEditTime: 2023-05-16 15:56:15
*/
......
/*
* @Description: 综合查询
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:23:50
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
/**
* @description: 根据条件进行列表查询
* @param {*} data
* @author: renchao
*/
export function getDjbBysearch (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/search/qlxx/getDjbBysearch',
method: 'post',
data: data
})
}
/**
* @description: 进度查询列表
* @param {*} data
* @author: renchao
*/
export function getJdcxBysearch (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/search/getJdcxBysearch',
method: 'post',
data
})
}
/**
* @description: 证书领取查询
* @param {*} data
* @author: renchao
*/
export function getBdcqzReceiveList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/search/getBdcqzReceiveList',
method: 'post',
data
})
}
/**
* @description: 在建工程抵押查询
* @param {*} data
* @author: renchao
*/
export function getZjgcdyList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/search/getZjgcdyList',
method: 'post',
data
})
}
/**
* @description:楼盘查询- 根据bsmSlsq查询自然幢标识码
* @param {*} data
* @author: renchao
*/
export function getZrzbsmList(bsm) {
return request({
url: SERVER.SERVERAPI + "/rest/zhcx/search/getZrzbsmList?bsmSlsq=" + bsm,
method: "post",
data: bsm,
});
}
/*
* @Description: 系统通知
* @Autor: renchao
* @LastEditTime: 2023-05-16 16:02:32
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
/**
* @description: 新增系统通知
* @param {*} data
* @author: renchao
*/
export function addSysNotice (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysNotice/addSysNotice',
method: 'post',
data
})
}
/**
* @description: 编辑系统通知
* @param {*} data
* @author: renchao
*/
export function updateSysNotice (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysNotice/updateSysNotice',
method: 'post',
data
})
}
// 获取通知列表
/**
* @description:
* @param {*} data
* @author: renchao
*/
export function getSysNoticeList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysNotice/getSysNoticeList',
method: 'post',
data
})
}
/**
* @description: 获取法律法规列表
* @param {*} data
* @author: renchao
*/
export function getSysPolicyList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysNotice/getSysPolicyList',
method: 'post',
data
})
}
/**
* @description: 删除系统通知
* @param {*} params
* @author: renchao
*/
export function deleteSysNotice (params) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysNotice/deleteSysNotice',
method: 'get',
params: params
})
}
/**
* @description: 发布通知
* @param {*} params
* @author: renchao
*/
export function publishNotice (params) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysNotice/publishNotice',
method: 'get',
params: params
})
}
/**
* @description: 取消发布通知
* @param {*} params
* @author: renchao
*/
export function unPublishNotice (params) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysNotice/unPublishNotice',
method: 'get',
params: params
})
}
/**
* @description: 设置已读状态
* @param {*} params
* @author: renchao
*/
export function setReadStatus (params) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysNotice/setReadStatus',
method: 'get',
params: params
})
}
/**
* @description: 一键设置已读
* @author: renchao
*/
export function setAllRead () {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysNotice/setAllRead',
method: 'get'
})
}
/*
* @Description: 数据推送
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:23:50
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
/**
* @description: 数据上报推送查询
* @param {*} data
* @author: renchao
*/
export function list (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysPushRecord/list',
method: 'post',
data
})
}
/**
* @description: 数据上报推送
* @param {*} data
* @author: renchao
*/
export function push (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysPushRecord/push',
method: 'post',
data
})
}
/**
* @description: 数据上报推送
* @param {*} bsm
* @author: renchao
*/
export function detail (bsm) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysPushRecord/detail?bsm=' + bsm,
method: 'get'
})
}
/*
* @Description: 系统序列号设置
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:24:24
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
/**
* @description: 证书管理-获取序列号
* @param {*} params
* @author: renchao
*/
export function getSysSerialSingle (params) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysSerial/getSysSerialSingle',
method: 'get',
params: params
})
}
/*
* @Description: 系统管理
* @Description: 申请登记业务规则
* @Autor: renchao
* @LastEditTime: 2023-05-16 16:02:32
*/
......@@ -8,19 +8,6 @@ import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
/**
* @description: 上传单个文件
* @param {*} data
* @author: renchao
*/
export function upload (data) {
return request({
url: SERVER.SERVERAPI + '/rest/file/upload',
method: 'post',
data
})
}
/**
* @description: 申请业务规则API-根据条件进行列表查询
* @param {*} data
* @author: renchao
......@@ -81,222 +68,3 @@ export function saveSqdjyw (data) {
data
})
}
/**
* @description: 其他及附记模板-列表详情
* @param {*} data
* @author: renchao
*/
export function sysSqywmbszSearch (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysSqywmbsz/search',
method: 'post',
data
})
}
/**
* @description: 其他及附记模板-读取明细
* @param {*} id
* @author: renchao
*/
export function getSysSqywmbszDetailById (id) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysSqywmbsz/getSysSqywmbszDetailById?id=' + id,
method: 'get'
})
}
/**
* @description: 其他及附记模板-修改申请业务模板设置
* @param {*} data
* @author: renchao
*/
export function updateSysSqywmbsz (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysSqywmbsz/updateSysSqywmbsz',
method: 'put',
data
})
}
/**
* @description: 新增系统通知
* @param {*} data
* @author: renchao
*/
export function addSysNotice (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysNotice/addSysNotice',
method: 'post',
data
})
}
/**
* @description: 编辑系统通知
* @param {*} data
* @author: renchao
*/
export function updateSysNotice (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysNotice/updateSysNotice',
method: 'post',
data
})
}
// 获取通知列表
/**
* @description:
* @param {*} data
* @author: renchao
*/
export function getSysNoticeList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysNotice/getSysNoticeList',
method: 'post',
data
})
}
/**
* @description: 获取法律法规列表
* @param {*} data
* @author: renchao
*/
export function getSysPolicyList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysNotice/getSysPolicyList',
method: 'post',
data
})
}
/**
* @description: 删除系统通知
* @param {*} params
* @author: renchao
*/
export function deleteSysNotice (params) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysNotice/deleteSysNotice',
method: 'get',
params: params
})
}
/**
* @description: 发布通知
* @param {*} params
* @author: renchao
*/
export function publishNotice (params) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysNotice/publishNotice',
method: 'get',
params: params
})
}
/**
* @description: 取消发布通知
* @param {*} params
* @author: renchao
*/
export function unPublishNotice (params) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysNotice/unPublishNotice',
method: 'get',
params: params
})
}
/**
* @description: 设置已读状态
* @param {*} params
* @author: renchao
*/
export function setReadStatus (params) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysNotice/setReadStatus',
method: 'get',
params: params
})
}
/**
* @description: 一键设置已读
* @author: renchao
*/
export function setAllRead () {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysNotice/setAllRead',
method: 'get'
})
}
/**
* @description: 获取打印模板列表
* @param {*} data
* @author: renchao
*/
export function selectPrintTemplateList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/print/selectPrintTemplateList',
method: 'post',
data
})
}
/**
* @description: 新增打印模板列表
* @param {*} data
* @author: renchao
*/
export function addPrintTemplate (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/print/addPrintTemplate',
method: 'post',
data
})
}
/**
* @description: 编辑打印模板列表
* @param {*} data
* @author: renchao
*/
export function editPrintTemplate (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/print/editPrintTemplate',
method: 'post',
data
})
}
/**
* @description: 删除打印模板列表
* @param {*} params
* @author: renchao
*/
export function delPrintTemplate (params) {
return request({
url: SERVER.SERVERAPI + '/rest/system/print/delPrintTemplate',
method: 'get',
params: params
})
}
/**
* @description: 根据模板编号获取打印模板
* @param {*} params
* @author: renchao
*/
export function getPrintTemplateByCode (params) {
return request({
url: SERVER.SERVERAPI + '/rest/system/print/getPrintTemplateByCode',
method: 'get',
params: params
})
}
......
/*
* @Description: 申请业务模板设置
* @Autor: renchao
* @LastEditTime: 2023-05-16 16:02:32
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
/**
* @description: 其他及附记模板-列表详情
* @param {*} data
* @author: renchao
*/
export function sysSqywmbszSearch (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysSqywmbsz/search',
method: 'post',
data
})
}
/**
* @description: 其他及附记模板-读取明细
* @param {*} id
* @author: renchao
*/
export function getSysSqywmbszDetailById (id) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysSqywmbsz/getSysSqywmbszDetailById?id=' + id,
method: 'get'
})
}
/**
* @description: 其他及附记模板-修改申请业务模板设置
* @param {*} data
* @author: renchao
*/
export function updateSysSqywmbsz (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysSqywmbsz/updateSysSqywmbsz',
method: 'put',
data
})
}
......@@ -28,61 +28,3 @@ export function getMenuInfo () {
method: 'get',
})
}
/**
* @description: 获取全部字典数据
* @author: renchao
*/
export function getAllDict () {
return request({
url: SERVER.SERVERAPI + '/rest/sys/dict/getAllDict',
method: 'post'
})
}
export function getQlxxDictList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/sys/dict/getQlxxDictList',
method: 'post',
data
})
}
/**
* @description: 获取字典子级列表
* @param {*} bsmDict
* @author: renchao
*/
export function getChildDictList (bsmDict) {
return request({
url: SERVER.SERVERAPI + '/rest/sys/dict/getChildDictList',
method: 'get',
params: {
bsmDict: bsmDict
}
})
}
/**
* @description: 编辑字典数据
* @param {*} data
* @author: renchao
*/
export function editDictNode (data) {
return request({
url: SERVER.SERVERAPI + '/rest/sys/dict/editDictNode',
method: 'post',
data
})
}
/**
* @description: 刷新字典缓存
* @author: renchao
*/
export function refreshDictCache () {
return request({
url: SERVER.SERVERAPI + '/rest/sys/dict/refreshDictCache',
method: 'get'
})
}
\ No newline at end of file
......
/*
* @Description:
* @Description: 系统监控
* @Autor: renchao
* @LastEditTime: 2023-05-16 16:07:10
*/
......@@ -17,8 +17,6 @@ export function getErrorLogList (data) {
data
})
}
/**
* @description: 系统监控 -获取操作日志列表
* @param {*} data
......@@ -31,7 +29,6 @@ export function getOperationLogList (data) {
data
})
}
/**
* @description: 系统监控 -主机监控
* @author: renchao
......
/*
* @Description:
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-05-16 14:01:26
* @LastEditTime: 2023-05-17 10:24:24
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
/**
* @description: 流程图
* @param {*} bsmSlsq
* @param {*} bestepid
* @author: renchao
*/
export function getWorkFlowImage (bsmSlsq, bestepid) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/getWorkFlowImage',
method: 'get',
params: {
bsmSlsq: bsmSlsq,
bestepid: bestepid
}
})
}
/**
* @description: 转出
* @param {*} data
* @author: renchao
*/
export function completeTask (data) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/completeTask',
method: 'post',
data
})
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/completeTask',
method: 'post',
data
})
}
/**
* @description: 回退表格数据
......@@ -23,11 +39,11 @@ export function completeTask (data) {
* @author: renchao
*/
export function getTaskBackNode (params) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/getTaskBackNode',
method: 'get',
params: params
})
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/getTaskBackNode',
method: 'get',
params: params
})
}
/**
* @description: 退回确认接口
......@@ -35,11 +51,11 @@ export function getTaskBackNode (params) {
* @author: renchao
*/
export function sendBackTask (data) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/sendBackTask',
method: 'post',
data
})
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/sendBackTask',
method: 'post',
data
})
}
/**
* @description: 获取左侧列表
......@@ -47,11 +63,11 @@ export function sendBackTask (data) {
* @author: renchao
*/
export function leftMenu (data) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/leftMenu',
method: 'post',
data
})
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/leftMenu',
method: 'post',
data
})
}
/**
......@@ -60,11 +76,11 @@ export function leftMenu (data) {
* @author: renchao
*/
export function getNextLinkInfo (params) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/getNextLinkInfo',
method: 'get',
params: params
});
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/getNextLinkInfo',
method: 'get',
params: params
});
}
/**
......@@ -73,11 +89,23 @@ export function getNextLinkInfo (params) {
* @author: renchao
*/
export function getStepFormInfo (data) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/getStepFormInfo',
method: 'post',
data
});
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/getStepFormInfo',
method: 'post',
data
});
}
/**
* @description: 获取单元对应的环节表单信息
* @param {*} data
* @author: renchao
*/
export function getBlYbxStepFormInfo (data) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/getBlYbxStepFormInfo',
method: 'post',
data
});
}
/**
* @description: 环节扩展信息
......@@ -85,134 +113,145 @@ export function getStepFormInfo (data) {
* @author: renchao
*/
export function stepExpandInfo (data) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/stepExpandInfo',
method: 'post',
data
})
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/stepExpandInfo',
method: 'post',
data
})
}
/**
* @description: 获取审批意见
* @description: 登簿接口
* @param {*} data
* @author: renchao
*/
export function getSpyjList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/opinion/getSpyjList',
method: 'post',
data
})
export function record (data) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/record',
method: 'post',
data
})
}
// 终止任务
export function stopTask (data) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/stopTask',
method: 'post',
data
})
}
/**
* @description: 保存审批意见
* @param {*} data
* @description: 获取用户任务权限
* @param {*} params
* @author: renchao
*/
export function saveSpyj (data) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/opinion/saveSpyj',
method: 'post',
data
})
export function judgeUserTaskPermission (params) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/judgeUserTaskPermission',
method: 'get',
params
})
}
/**
* @description: 根据受理申请保存审批意见
* @description: 获取申请书数据
* @param {*} data
* @author: renchao
*/
export function saveSpyjBySlsq (data) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/opinion/saveSpyjBySlsq',
method: 'post',
data
})
export function getPrintApplicationInfo (data) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/getPrintApplicationInfo',
method: 'post',
data
})
}
/**
* @description: 获取用户常用意见
* @description: 国有建设用地使用权/房屋使用权 -选择不动产单元
* @param {*} data
* @author: renchao
*/
export function getUserCommonOpinion (data) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/opinion/getUserCommonOpinion',
method: 'post',
data
})
export function choiceBdcdy (data) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/choiceBdcdy',
method: 'post',
data
})
}
/**
* @description: 新增用户常用意见
* @param {*} params
* @description: 待办箱/不动产单元删除接口
* @param {*} data
* @author: renchao
*/
export function addUserCommonOpinion (params) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/opinion/addUserCommonOpinion',
method: 'get',
params
})
export function deleteFlow (data) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/deleteFlow',
method: 'post',
data
})
}
/**
* @description: 删除常用意见
* @param {*} params
* @description: 业务办理-发起业务申请流程
* @param {*} data
* @author: renchao
*/
export function delUserCommonOpinion (params) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/opinion/delUserCommonOpinion',
method: 'get',
params
})
export function startBusinessFlow (data) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/startBusinessFlow',
method: 'post',
data
})
}
/**
* @description: 登簿接口
* @description: 业务办理-发起补录申请流程
* @param {*} data
* @author: renchao
*/
export function record (data) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/record',
method: 'post',
data
})
export function startRepairFlow (data) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/startRepairFlow',
method: 'post',
data
})
}
// 终止任务
export function stopTask (data) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/stopTask',
method: 'post',
data
})
/**
* @description: 申请列表删除
* @param {*} data
* @author: renchao
*/
export function deleteSlbdcdy (data) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/deleteSlbdcdy',
method: 'post',
data
})
}
/**
* @description: 获取用户任务权限
* @param {*} params
* @description: 认领任务
* @param {*} bsmSlsq
* @param {*} bestepid
* @author: renchao
*/
export function judgeUserTaskPermission (params) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/judgeUserTaskPermission',
method: 'get',
params
})
export function claimTask (bsmSlsq, bestepid) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/claimTask?bsmSlsq=' + bsmSlsq + '&bestepid=' + bestepid,
method: 'get',
})
}
/**
* @description: 获取申请书数据
* @param {*} data
* @description: 取消认领任务
* @param {*} bsmSlsq
* @param {*} bestepid
* @author: renchao
*/
export function getPrintApplicationInfo (data) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/getPrintApplicationInfo',
method: 'post',
data
})
export function unClaimTask (bsmSlsq, bestepid) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/unClaimTask?bsmSlsq=' + bsmSlsq + '&bestepid=' + bestepid,
method: 'get',
})
}
......
/*
* @Description:
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:25:58
*/
......@@ -31,6 +31,11 @@ export function BatchInit (data) {
})
}
/**
* @description: 初始化
* @param {*} data
* @author: renchao
*/
export function Init (data) {
let apiUrl = "";
switch (data.get("djlx")) {
......
/*
* @Description:
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:30:47
*/
......@@ -56,20 +56,3 @@ export function saveData (data, djlx) {
data
})
}
/**
* @description: 流程图
* @param {*} bsmSlsq
* @param {*} bestepid
* @author: renchao
*/
export function getWorkFlowImage (bsmSlsq, bestepid) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/getWorkFlowImage',
method: 'get',
params: {
bsmSlsq: bsmSlsq,
bestepid: bestepid
}
})
}
......
/*
* @Description:
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:31:23
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
// 初始化内容
/**
* @description: 初始化
* @param {*} data
* @author: renchao
*/
export function Init (data) {
let apiUrl = "";
switch (data.get("djlx")) {
......@@ -50,20 +54,3 @@ export function saveData (data) {
data
})
}
/**
* @description: 流程图
* @param {*} bsmSlsq
* @param {*} bestepid
* @author: renchao
*/
export function getWorkFlowImage (bsmSlsq, bestepid) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/getWorkFlowImage',
method: 'get',
params: {
bsmSlsq: bsmSlsq,
bestepid: bestepid
}
})
}
......
/*
* @Description:
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:32:29
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
// 初始化内容
/**
* @description: 初始化
* @param {*} data
* @author: renchao
*/
export function Init (data) {
let apiUrl = "";
switch (data.get("djlx")) {
......@@ -39,7 +43,11 @@ export function Init (data) {
})
}
// 初始化内容
/**
* @description: 保存数据
* @param {*} data
* @author: renchao
*/
export function saveData (data) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/nydsyqlr/saveData',
......
/*
* @Description: 待办已办箱
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:13:24
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
/**
* @description: 待办箱列表查询接口
* @param {*} data
* @author: renchao
*/
export function searchTaskToDo (data) {
return request({
url: SERVER.SERVERAPI + '/rest/workBox/search/searchTaskToDo',
method: 'post',
data
})
}
/**
* @description: 已办箱列表查询接口
* @param {*} data
* @author: renchao
*/
export function searchTaskDone (data) {
return request({
url: SERVER.SERVERAPI + '/rest/workBox/search/searchTaskDone',
method: 'post',
data
})
}
......@@ -6,7 +6,11 @@
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
// 初始化内容
/**
* @description: 初始化
* @param {*} data
* @author: renchao
*/
export function Init (data) {
let apiUrl = "";
switch (data.get("djlx")) {
......@@ -50,20 +54,3 @@ export function saveData (data) {
data
})
}
/**
* @description: 流程图
* @param {*} bsmSlsq
* @param {*} bestepid
* @author: renchao
*/
export function getWorkFlowImage (bsmSlsq, bestepid) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/getWorkFlowImage',
method: 'get',
params: {
bsmSlsq: bsmSlsq,
bestepid: bestepid
}
})
}
......
/*
* @Description:
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:32:37
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
// 初始化内容
/**
* @description: 初始化
* @param {*} data
* @author: renchao
*/
export function Init (data) {
let apiUrl = "";
switch (data.get("djlx")) {
......@@ -37,7 +41,11 @@ export function Init (data) {
data
})
}
// 初始化内容
/**
* @description: 保存数据
* @param {*} data
* @author: renchao
*/
export function saveData (data) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/ygmmdj/saveData',
......
/*
* @Description:
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:32:41
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
// 初始化内容
/**
* @description: 初始化
* @param {*} data
* @author: renchao
*/
export function Init (data) {
let apiUrl = "";
switch (data.get("djlx")) {
......@@ -37,7 +41,11 @@ export function Init (data) {
data
})
}
// 初始化内容
/**
* @description: 保存数据
* @param {*} data
* @author: renchao
*/
export function saveData (data) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/ygdydj/saveData',
......
/*
* @Description:
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:32:45
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
// 初始化内容
/**
* @description: 初始化
* @param {*} data
* @author: renchao
*/
export function Init (data) {
return request({
url: SERVER.SERVERAPI + "/rest/ywbl/zjgcdy/init",
......@@ -14,7 +18,11 @@ export function Init (data) {
data
})
}
// 批量初始化内容
/**
* @description: 批量初始化
* @param {*} data
* @author: renchao
*/
export function bacthInit (data) {
let apiUrl = "";
switch (data.get("djlx")) {
......@@ -46,7 +54,11 @@ export function bacthInit (data) {
data
})
}
// 受理信息保存
/**
* @description: 保存数据
* @param {*} data
* @author: renchao
*/
export function saveData (data, djlx) {
let apiUrl = "/rest/ywbl/zjgcdy/saveData";
if (djlx == "400") {
......@@ -59,7 +71,11 @@ export function saveData (data, djlx) {
})
}
// 受理信息保存
/**
* @description: 批量保存
* @param {*} data
* @author: renchao
*/
export function saveBatchData (data, djlx) {
return request({
url: SERVER.SERVERAPI + "/rest/ywbl/zjgcdy/saveBatchData",
......@@ -68,18 +84,11 @@ export function saveBatchData (data, djlx) {
})
}
// 流程图
export function getWorkFlowImage (bsmSlsq, bestepid) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/getWorkFlowImage',
method: 'get',
params: {
bsmSlsq: bsmSlsq,
bestepid: bestepid
}
})
}
// 上传单个文件
/**
* @description: 上传当个文件
* @param {*} data
* @author: renchao
*/
export function sjClmxUpload (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/sjClmx/upload',
......@@ -87,7 +96,12 @@ export function sjClmxUpload (data) {
data
})
}
// 删除上传文件
/**
* @description: 删除多个文件
* @param {*} data
* @author: renchao
*/
export function sjClmxDelete (bsmClmx) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/sjClmx/delete?bsmClmx=' + bsmClmx,
......
/*
* @Description: 综合查询-登记簿查询
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:23:50
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
/**
* @description: 根据条件进行列表查询
* @param {*} data
* @author: renchao
*/
export function getDjbBysearch (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/search/qlxx/getDjbBysearch',
method: 'post',
data: data
})
}
/**
* @description: 获取登记封面
* @param {*} qlbsm
* @author: renchao
*/
export function getDjbfm (qlbsm) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/djbfm/' + qlbsm,
method: 'get'
})
}
/**
* @description: 获取登记目录
* @param {*} data
* @author: renchao
*/
export function getBdcqldjmlByBdcdyid (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getBdcqldjmlByBdcdyid',
method: 'get',
params: data
})
}
/**
* @description: 获取宗地信息
* @param {*} qlbsm
* @author: renchao
*/
export function getZdjbxx (qlbsm) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/zdjbxx/' + qlbsm,
method: 'get'
})
}
/**
* @description: 获取宗地信息
* @param {*} data
* @author: renchao
*/
export function getZdjjxxBybdcdyid (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getZdjjxxBybdcdyid',
method: 'get',
params: data
})
}
/**
* @description: 获取宗地信息
* @param {*} data
* @author: renchao
*/
export function getZdjjxxBySLdy (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getZdjjxxBybdcdyid',
method: 'get',
params: data
})
}
/**
* @description: 获取不动产权利及其他事项
* @param {*} data
* @author: renchao
*/
export function getBdcqljqtsx (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getBdcqljqtsx',
method: 'get',
params: data
})
}
/**
* @description: 获取不动产权利及其他事项页面信息
* @param {*} qlbsm
* @author: renchao
*/
export function getQlname (qlbsm) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/qlname/' + qlbsm,
method: 'get'
})
}
/**
* @description: 获取权利详细信息
* @param {*} qlbsm
* @author: renchao
*/
export function getDetail (qlbsm) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/detail/' + qlbsm,
method: 'get'
})
}
/**
* @description: 获取建设用地使用权
* @param {*} data
* @author: renchao
*/
export function getJsydsyqList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getJsydsyqList',
method: 'post',
data
})
}
/**
* @description: 获取抵押权
* @param {*} data
* @author: renchao
*/
export function getDiyaqList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getDiyaqList',
method: 'post',
data
})
}
/**
* @description: 获取地役权
* @param {*} data
* @author: renchao
*/
export function getDiyiqList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getDiyiqList',
method: 'post',
data
})
}
/**
* @description: 获取预告登记
* @param {*} data
* @author: renchao
*/
export function getYgdjList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getYgdjList',
method: 'post',
data
})
}
/**
* @description: 获取异议登记
* @param {*} data
* @author: renchao
*/
export function getYydjList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getYydjList',
method: 'post',
data
})
}
/**
* @description: 获取查封登记
* @param {*} data
* @author: renchao
*/
export function getCfdjList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getCfdjList',
method: 'post',
data
})
}
/**
* @description: 进度查询列表
* @param {*} data
* @author: renchao
*/
export function getJdcxBysearch (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/search/getJdcxBysearch',
method: 'post',
data
})
}
/**
* @description: 证书领取查询
* @param {*} data
* @author: renchao
*/
export function getBdcqzReceiveList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/search/getBdcqzReceiveList',
method: 'post',
data
})
}
/**
* @description: 在建工程抵押查询
* @param {*} data
* @author: renchao
*/
export function getZjgcdyList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/search/getZjgcdyList',
method: 'post',
data
})
}
// 数据上报推送查询
export function getSjsbPushList (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysPushRecord/list',
method: 'post',
data
})
}
// 数据上报推送
export function pushSjsbRecord (data) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysPushRecord/push',
method: 'post',
data
})
}
// 数据上报推送
export function detail (bsm) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysPushRecord/detail?bsm=' + bsm,
method: 'get'
})
}
/*
* @Description:
* @Description: 证书管理
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:24:24
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
/**
* @description: 证书管理-获取序列号
* @param {*} params
* @author: renchao
*/
export function getSysSerialSingle (params) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysSerial/getSysSerialSingle',
method: 'get',
params: params
})
}
/**
* @description: 证书管理-证书入库列表
* @param {*} data
......@@ -162,4 +151,4 @@ export function getZsglInfo (params) {
method: 'get',
params
})
}
\ No newline at end of file
}
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-20 10:22:20
-->
<template>
<label class="el-checkbox" :class="[
border && checkboxSize ? 'el-checkbox--' + checkboxSize : '',
......@@ -26,169 +31,217 @@
</label>
</template>
<script>
import Emitter from 'element-ui/src/mixins/emitter';
import Emitter from 'element-ui/src/mixins/emitter';
export default {
name: 'ElCheckbox',
export default {
name: 'ElCheckbox',
mixins: [Emitter],
mixins: [Emitter],
inject: {
elForm: {
default: ''
inject: {
elForm: {
default: ''
},
elFormItem: {
default: ''
}
},
elFormItem: {
default: ''
}
},
componentName: 'ElCheckbox',
componentName: 'ElCheckbox',
data () {
return {
selfModel: false,
focus: false,
isLimitExceeded: false
};
},
data () {
return {
selfModel: false,
focus: false,
isLimitExceeded: false
};
},
computed: {
model: {
get () {
return this.isGroup
? this.store : this.value !== undefined
? this.value : this.selfModel;
computed: {
model: {
/**
* @description: get
* @author: renchao
*/
get () {
return this.isGroup
? this.store : this.value !== undefined
? this.value : this.selfModel;
},
/**
* @description: set
* @param {*} val
* @author: renchao
*/
set (val) {
if (this.isGroup) {
this.isLimitExceeded = false;
(this._checkboxGroup.min !== undefined &&
val.length < this._checkboxGroup.min &&
(this.isLimitExceeded = true));
(this._checkboxGroup.max !== undefined &&
val.length > this._checkboxGroup.max &&
(this.isLimitExceeded = true));
this.isLimitExceeded === false &&
this.dispatch('ElCheckboxGroup', 'input', [val]);
} else {
this.$emit('input', val);
this.selfModel = val;
}
}
},
set (val) {
if (this.isGroup) {
this.isLimitExceeded = false;
(this._checkboxGroup.min !== undefined &&
val.length < this._checkboxGroup.min &&
(this.isLimitExceeded = true));
(this._checkboxGroup.max !== undefined &&
val.length > this._checkboxGroup.max &&
(this.isLimitExceeded = true));
this.isLimitExceeded === false &&
this.dispatch('ElCheckboxGroup', 'input', [val]);
} else {
this.$emit('input', val);
this.selfModel = val;
/**
* @description: isChecked
* @author: renchao
*/
isChecked () {
if ({}.toString.call(this.model) === '[object Boolean]') {
return this.model;
} else if (Array.isArray(this.model)) {
return this.model.indexOf(this.label) > -1;
} else if (this.model !== null && this.model !== undefined) {
return this.model === this.trueLabel;
}
},
/**
* @description: isGroup
* @author: renchao
*/
isGroup () {
let parent = this.$parent;
while (parent) {
if (parent.$options.componentName !== 'ElCheckboxGroup') {
parent = parent.$parent;
} else {
this._checkboxGroup = parent;
return true;
}
}
return false;
},
/**
* @description: store
* @author: renchao
*/
store () {
return this._checkboxGroup ? this._checkboxGroup.value : this.value;
},
/**
* @description: isLimitDisabled
* @author: renchao
*/
isLimitDisabled () {
const { max, min } = this._checkboxGroup;
return !!(max || min) &&
(this.model.length >= max && !this.isChecked) ||
(this.model.length <= min && this.isChecked);
},
/**
* @description: isDisabled
* @author: renchao
*/
isDisabled () {
return this.isGroup
? this._checkboxGroup.disabled || this.disabled || (this.elForm || {}).disabled || this.isLimitDisabled
: this.disabled || (this.elForm || {}).disabled;
},
/**
* @description: _elFormItemSize
* @author: renchao
*/
_elFormItemSize () {
return (this.elFormItem || {}).elFormItemSize;
},
/**
* @description: checkboxSize
* @author: renchao
*/
checkboxSize () {
const temCheckboxSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
return this.isGroup
? this._checkboxGroup.checkboxGroupSize || temCheckboxSize
: temCheckboxSize;
}
},
isChecked () {
if ({}.toString.call(this.model) === '[object Boolean]') {
return this.model;
} else if (Array.isArray(this.model)) {
return this.model.indexOf(this.label) > -1;
} else if (this.model !== null && this.model !== undefined) {
return this.model === this.trueLabel;
}
props: {
value: {},
label: {},
indeterminate: Boolean,
disabled: Boolean,
checked: Boolean,
name: String,
trueLabel: [String, Number],
falseLabel: [String, Number],
id: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
controls: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
border: Boolean,
size: String
},
isGroup () {
let parent = this.$parent;
while (parent) {
if (parent.$options.componentName !== 'ElCheckboxGroup') {
parent = parent.$parent;
methods: {
/**
* @description: addToStore
* @author: renchao
*/
addToStore () {
if (
Array.isArray(this.model) &&
this.model.indexOf(this.label) === -1
) {
this.model.push(this.label);
} else {
this._checkboxGroup = parent;
return true;
this.model = this.trueLabel || true;
}
},
/**
* @description: handleChange
* @author: renchao
*/
handleChange (ev) {
if (this.isLimitExceeded) return;
let value;
if (ev.target.checked) {
value = this.trueLabel === undefined ? true : this.trueLabel;
} else {
value = this.falseLabel === undefined ? false : this.falseLabel;
}
this.$emit('change', value, ev);
this.$nextTick(() => {
if (this.isGroup) {
this.dispatch('ElCheckboxGroup', 'change', [this._checkboxGroup.value]);
}
});
}
return false;
},
store () {
return this._checkboxGroup ? this._checkboxGroup.value : this.value;
},
/* used to make the isDisabled judgment under max/min props */
isLimitDisabled () {
const { max, min } = this._checkboxGroup;
return !!(max || min) &&
(this.model.length >= max && !this.isChecked) ||
(this.model.length <= min && this.isChecked);
},
isDisabled () {
return this.isGroup
? this._checkboxGroup.disabled || this.disabled || (this.elForm || {}).disabled || this.isLimitDisabled
: this.disabled || (this.elForm || {}).disabled;
},
_elFormItemSize () {
return (this.elFormItem || {}).elFormItemSize;
/**
* @description: created
* @author: renchao
*/
created () {
this.checked && this.addToStore();
},
checkboxSize () {
const temCheckboxSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
return this.isGroup
? this._checkboxGroup.checkboxGroupSize || temCheckboxSize
: temCheckboxSize;
}
},
props: {
value: {},
label: {},
indeterminate: Boolean,
disabled: Boolean,
checked: Boolean,
name: String,
trueLabel: [String, Number],
falseLabel: [String, Number],
id: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
controls: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
border: Boolean,
size: String
},
methods: {
addToStore () {
if (
Array.isArray(this.model) &&
this.model.indexOf(this.label) === -1
) {
this.model.push(this.label);
} else {
this.model = this.trueLabel || true;
/**
* @description: mounted
* @author: renchao
*/
mounted () { // 为indeterminate元素 添加aria-controls 属性
if (this.indeterminate) {
this.$el.setAttribute('aria-controls', this.controls);
}
},
handleChange (ev) {
if (this.isLimitExceeded) return;
let value;
if (ev.target.checked) {
value = this.trueLabel === undefined ? true : this.trueLabel;
} else {
value = this.falseLabel === undefined ? false : this.falseLabel;
/**
* @description: watch
* @author: renchao
*/
watch: {
value (value) {
this.dispatch('ElFormItem', 'el.form.change', value);
}
this.$emit('change', value, ev);
this.$nextTick(() => {
if (this.isGroup) {
this.dispatch('ElCheckboxGroup', 'change', [this._checkboxGroup.value]);
}
});
}
},
created () {
this.checked && this.addToStore();
},
mounted () { // 为indeterminate元素 添加aria-controls 属性
if (this.indeterminate) {
this.$el.setAttribute('aria-controls', this.controls);
}
},
watch: {
value (value) {
this.dispatch('ElFormItem', 'el.form.change', value);
}
}
};
};
</script>
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-20 13:33:07
-->
<template>
<el-dialog :visible.sync="dialogVisible" v-if="dialogVisible" :width="width" :fullscreen="fullscreen" top="0"
:append-to-body="appendToBody" :lock-scroll="true" :close-on-click-modal="false" @close="closeDialog" :key="key"
......@@ -23,105 +28,117 @@
</el-dialog>
</template>
<script>
export default {
props: {
value: { type: Boolean, default: false },
isMain: {
type: Boolean,
default: false
},
appendToBody: {
type: Boolean,
default: true
},
isButton: {
type: Boolean,
default: true,
},
width: {
type: String,
default: '70%',
},
title: {
type: String,
default: '',
},
isFullscreen: {
type: Boolean,
default: true,
},
isSave: {
type: Boolean,
default: true,
},
saveButton: {
type: String,
default: '提交',
},
isReset: {
type: Boolean,
default: true,
},
saveloding: {
type: Boolean,
default: false,
export default {
props: {
value: { type: Boolean, default: false },
isMain: {
type: Boolean,
default: false
},
appendToBody: {
type: Boolean,
default: true
},
isButton: {
type: Boolean,
default: true,
},
width: {
type: String,
default: '70%',
},
title: {
type: String,
default: '',
},
isFullscreen: {
type: Boolean,
default: true,
},
isSave: {
type: Boolean,
default: true,
},
saveButton: {
type: String,
default: '提交',
},
isReset: {
type: Boolean,
default: true,
},
saveloding: {
type: Boolean,
default: false,
},
btnDisabled: {
type: Boolean,
default: false
},
height: {
type: String,
default: ''
}
},
btnDisabled: {
type: Boolean,
default: false
data () {
return {
key: 0,
dialogVisible: false,
fullscreen: false,
scrollerHeight: ''
}
},
height: {
type: String,
default: ''
}
},
data () {
return {
key: 0,
dialogVisible: false,
fullscreen: false,
scrollerHeight: ''
}
},
watch: {
value (val) {
this.$nextTick(() => {
this.dialogVisible = val
})
this.height && (this.scrollerHeight = this.height + 'px')
}
},
methods: {
handleFullscreen () {
this.fullscreen = !this.fullscreen
if (!this.fullscreen) {
this.scrollerHeight = ''
} else {
this.scrollerHeight = (window.innerHeight - 120) + 'px'
watch: {
value (val) {
this.$nextTick(() => {
this.dialogVisible = val
})
this.height && (this.scrollerHeight = this.height + 'px')
}
},
submitForm () {
if (this.isButton) {
this.$emit('submitForm');
methods: {
/**
* @description: handleFullscreen
* @author: renchao
*/
handleFullscreen () {
this.fullscreen = !this.fullscreen
if (!this.fullscreen) {
this.scrollerHeight = ''
} else {
this.scrollerHeight = (window.innerHeight - 120) + 'px'
}
},
/**
* @description: submitForm
* @author: renchao
*/
submitForm () {
if (this.isButton) {
this.$emit('submitForm');
}
},
/**
* @description: closeDialog
* @author: renchao
*/
closeDialog () {
this.key++
this.$emit('input', false)
this.$emit('closeDialog')
}
},
closeDialog () {
this.key++
this.$emit('input', false)
this.$emit('closeDialog')
}
},
}
}
</script>
<style rel="stylesheet/scss" lang="scss" >
@import "~@/styles/mixin.scss";
@import "~@/styles/dialogBox.scss";
@import "~@/styles/mixin.scss";
@import "~@/styles/dialogBox.scss";
</style>
<style rel="stylesheet/scss" scoped lang="scss" >
/deep/.is-fullscreen {
position: absolute;
top: 50% !important;
left: 50% !important;
transform: translate(-50%, -50%) !important;
}
</style>
\ No newline at end of file
/deep/.is-fullscreen {
position: absolute;
top: 50% !important;
left: 50% !important;
transform: translate(-50%, -50%) !important;
}
</style>
......
......@@ -106,6 +106,11 @@
components: {
LbColumn,
},
/**
* @description: data
* @author: renchao
*/
data () {
return {
tableHeight: 'auto',
......@@ -114,6 +119,10 @@
selected: ''
}
},
/**
* @description: created
* @author: renchao
*/
created () {
this.getMergeArr(this.data, this.merge)
this.getHeight()
......@@ -124,17 +133,33 @@
},
},
methods: {
// 单选
/**
* @description: 单选
* @param {*} row
* @author: renchao
*/
singleElection (row) {
this.selected = this.data.indexOf(row);
<<<<<<< HEAD
this.$emit('row-click', row)
=======
// this.$emit('row-click', row)
>>>>>>> dev
},
/**
* @description: tableRowClassName
* @author: renchao
*/
tableRowClassName ({ row, rowIndex }) {
if (rowIndex % 2 === 1) {
return 'interlaced';
}
},
/**
* @description: getHeight
* @author: renchao
*/
getHeight () {
if (!this.heightNumSetting) {
let _this = this
......@@ -170,6 +195,12 @@
})
}
},
/**
* @description: calcHeightx
* @param {*} value
* @param {*} wappered
* @author: renchao
*/
calcHeightx (value, wappered = true) {
//项目自定义的公共header部分的高度,可忽略
let header = document.querySelector(".from-clues-header").offsetHeight;
......@@ -195,36 +226,89 @@
}
return res;
},
/**
* @description: clearSelection
* @author: renchao
*/
clearSelection () {
this.$refs.elTable.clearSelection()
},
/**
* @description: toggleRowSelection
* @author: renchao
*/
toggleRowSelection (row, selected) {
this.$refs.elTable.toggleRowSelection(row, selected)
},
/**
* @description: toggleAllSelection
* @author: renchao
*/
toggleAllSelection () {
this.$refs.elTable.toggleAllSelection()
},
/**
* @description: toggleRowExpansion
* @param {*} row
* @param {*} bsm
* @author: renchao
*/
toggleRowExpansion (row, expanded) {
this.$refs.elTable.toggleRowExpansion(row, expanded)
},
/**
* @description: setCurrentRow
* @param {*} row
* @author: renchao
*/
setCurrentRow (row) {
this.$refs.elTable.setCurrentRow(row)
},
/**
* @description: setCurrentRow
* @author: renchao
*/
clearSort () {
this.$refs.elTable.clearSort()
},
/**
* @description: clearFilter
* @param {*} columnKey
* @author: renchao
*/
clearFilter (columnKey) {
this.$refs.elTable.clearFilter(columnKey)
},
/**
* @description: doLayout
* @author: renchao
*/
doLayout () {
this.$refs.elTable.doLayout()
},
/**
* @description: sort
* @param {*} prop
* @param {*} order
* @author: renchao
*/
sort (prop, order) {
this.$refs.elTable.sort(prop, order)
},
/**
* @description: paginationCurrentChange
* @param {*} val
* @author: renchao
*/
paginationCurrentChange (val) {
this.$emit('p-current-change', val)
},
/**
* @description: getMergeArr
* @param {*} tableData
* @param {*} merge
* @author: renchao
*/
getMergeArr (tableData, merge) {
if (!merge) return
this.mergeLine = {}
......@@ -247,6 +331,10 @@
})
})
},
/**
* @description: mergeMethod
* @author: renchao
*/
mergeMethod ({ row, column, rowIndex, columnIndex }) {
const index = this.merge.indexOf(column.property)
if (index > -1) {
......@@ -260,9 +348,17 @@
},
},
watch: {
/**
* @description: merge
* @author: renchao
*/
merge () {
this.getMergeArr(this.data, this.merge)
},
/**
* @description: dataLength
* @author: renchao
*/
dataLength () {
this.getMergeArr(this.data, this.merge)
}
......
......@@ -6,6 +6,11 @@ import afterLeave from 'element-ui/src/utils/after-leave';
const Mask = Vue.extend(Loading);
const loadingDirective = {};
/**
* @description: install
* @author: renchao
*/
loadingDirective.install = Vue => {
if (Vue.prototype.$isServer) return;
const toggleLoading = (el, binding) => {
......@@ -110,14 +115,24 @@ loadingDirective.install = Vue => {
binding.value && toggleLoading(el, binding);
},
/**
* @description: update
* @param {*} el
* @param {*} binding
* @author: renchao
*/
update: function (el, binding) {
el.instance.setText(el.getAttribute('element-loading-text'));
if (binding.oldValue !== binding.value) {
toggleLoading(el, binding);
}
},
/**
* @description: unbind
* @param {*} el
* @param {*} binding
* @author: renchao
*/
unbind: function (el, binding) {
if (el.domInserted) {
el.mask &&
......
......@@ -20,6 +20,10 @@ let fullscreenLoading;
LoadingConstructor.prototype.originalPosition = '';
LoadingConstructor.prototype.originalOverflow = '';
/**
* @description: close
* @author: renchao
*/
LoadingConstructor.prototype.close = function() {
if (this.fullscreen) {
fullscreenLoading = undefined;
......@@ -38,6 +42,13 @@ LoadingConstructor.prototype.close = function() {
this.visible = false;
};
/**
* @description: addStyle
* @param {*} options
* @param {*} parent
* @param {*} instance
* @author: renchao
*/
const addStyle = (options, parent, instance) => {
let maskStyle = {};
if (options.fullscreen) {
......@@ -64,6 +75,10 @@ const addStyle = (options, parent, instance) => {
});
};
/**
* @description: Loading
* @author: renchao
*/
const Loading = (options = {}) => {
if (Vue.prototype.$isServer) return;
options = merge({}, defaults, options);
......
......@@ -43,6 +43,11 @@ const MessageBoxConstructor = Vue.extend(msgboxVue);
let currentMsg, instance;
let msgQueue = [];
/**
* @description: defaultCallback
* @author: renchao
*/
const defaultCallback = action => {
if (currentMsg) {
let callback = currentMsg.callback;
......@@ -56,6 +61,10 @@ const defaultCallback = action => {
}
};
/**
* @description: initInstance
* @author: renchao
*/
const initInstance = () => {
instance = new MessageBoxConstructor({
el: document.createElement('div')
......@@ -64,6 +73,10 @@ const initInstance = () => {
instance.callback = defaultCallback;
};
/**
* @description: showNextMsg
* @author: renchao
*/
const showNextMsg = () => {
if (!instance) {
initInstance();
......@@ -109,6 +122,10 @@ const showNextMsg = () => {
}
};
/**
* @description: MessageBox
* @author: renchao
*/
const MessageBox = function (options, callback) {
if (Vue.prototype.$isServer) return;
if (typeof options === 'string' || isVNode(options)) {
......@@ -143,10 +160,18 @@ const MessageBox = function (options, callback) {
}
};
/**
* @description: setDefaults
* @author: renchao
*/
MessageBox.setDefaults = defaults => {
MessageBox.defaults = defaults;
};
/**
* @description: alert
* @author: renchao
*/
MessageBox.alert = (title, message, options) => {
if (typeof title === 'object') {
options = title;
......@@ -163,6 +188,10 @@ MessageBox.alert = (title, message, options) => {
}, options));
};
/**
* @description: close
* @author: renchao
*/
MessageBox.close = () => {
instance.doClose();
instance.visible = false;
......
......@@ -97,6 +97,10 @@ export default {
},
methods: {
/**
* @description: getSafeClose
* @author: renchao
*/
getSafeClose () {
const currentId = this.uid;
return () => {
......@@ -105,6 +109,10 @@ export default {
});
};
},
/**
* @description: doClose
* @author: renchao
*/
doClose () {
if (!this.visible) return;
this.visible = false;
......@@ -122,18 +130,31 @@ export default {
});
},
/**
* @description: handleWrapperClick
* @author: renchao
*/
handleWrapperClick () {
if (this.closeOnClickModal) {
this.handleAction(this.distinguishCancelAndClose ? 'close' : 'cancel');
}
},
/**
* @description: handleInputEnter
* @author: renchao
*/
handleInputEnter () {
if (this.inputType !== 'textarea') {
return this.handleAction('confirm');
}
},
/**
* @description: handleAction
* @param {*} action
* @author: renchao
*/
handleAction (action) {
if (this.$type === 'prompt' && action === 'confirm' && !this.validate()) {
return;
......@@ -147,6 +168,10 @@ export default {
}
},
/**
* @description: validate
* @author: renchao
*/
validate () {
if (this.$type === 'prompt') {
const inputPattern = this.inputPattern;
......@@ -174,15 +199,27 @@ export default {
removeClass(this.getInputElement(), 'invalid');
return true;
},
/**
* @description: getFirstFocus
* @author: renchao
*/
getFirstFocus () {
const btn = this.$el.querySelector('.el-message-box__btns .el-button');
const title = this.$el.querySelector('.el-message-box__btns .el-message-box__title');
return btn || title;
},
/**
* @description: getInputElement
* @author: renchao
*/
getInputElement () {
const inputRefs = this.$refs.input.$refs;
return inputRefs.input || inputRefs.textarea;
},
/**
* @description: handleClose
* @author: renchao
*/
handleClose () {
this.handleAction('close');
}
......@@ -200,6 +237,11 @@ export default {
}
},
/**
* @description: visible
* @param {*} val
* @author: renchao
*/
visible (val) {
if (val) {
this.uid++;
......@@ -222,6 +264,10 @@ export default {
}
},
/**
* @description: mounted
* @author: renchao
*/
mounted () {
this.$nextTick(() => {
if (this.closeOnHashChange) {
......@@ -230,6 +276,10 @@ export default {
});
},
/**
* @description: beforeDestroy
* @author: renchao
*/
beforeDestroy () {
if (this.closeOnHashChange) {
window.removeEventListener('hashchange', this.close);
......@@ -298,4 +348,4 @@ export default {
/deep/.el-message-box__content {
padding-top: 0;
}
</style>
\ No newline at end of file
</style>
......
......@@ -49,10 +49,18 @@ export default {
}
},
methods: {
/**
* @description: handleNotice
* @param {*} item
* @author: renchao
*/
handleNotice (item) {
this.$alertMes(item.noticeTitle, item.noticeContent)
},
// 获取数据
/**
* @description: 获取数据
* @author: renchao
*/
getData () {
let style = document.styleSheets[0];
let text = this.$refs.text;
......@@ -72,13 +80,19 @@ export default {
this.changeState();
}, 300);
},
// 用速度计算时间(想要保持速度一样,2种状态时间不同需算出)
/**
* @description: 用速度计算时间(想要保持速度一样,2种状态时间不同需算出)
* @author: renchao
*/
ComputationTime () {
this.firstAnimationTime = this.wordLength / this.speed;
this.secondAnimationTime =
(this.wordLength + this.backWidth) / this.speed;
},
// 根据状态切换动画
/**
* @description: 根据状态切换动画
* @author: renchao
*/
changeState () {
let text = this.$refs.text;
if (this.state == 1) {
......@@ -88,6 +102,10 @@ export default {
text.style.animation = `secondAnimation ${this.secondAnimationTime}s linear infinite`;
}
},
/**
* @description: Listener
* @author: renchao
*/
Listener () {
let text = this.$refs.text;
text.addEventListener(
......@@ -98,10 +116,18 @@ export default {
false
)
},
/**
* @description: mouseOver
* @author: renchao
*/
mouseOver () {
let text = this.$refs.text;
text.style.animationPlayState = 'paused'
},
/**
* @description: mouseLeave
* @author: renchao
*/
mouseLeave () {
let text = this.$refs.text;
text.style.animationPlayState = ''
......@@ -151,4 +177,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
......
......@@ -188,6 +188,10 @@
this.$img = this.$refs["img"];
},
methods: {
/**
* @description: imgLoaded
* @author: renchao
*/
imgLoaded () {
let imgInfo = this.$img.getBoundingClientRect();
if (JSON.stringify(this.imgInfo) != JSON.stringify(imgInfo)) {
......@@ -200,6 +204,10 @@
this.$emit("created", imgInfo);
}
},
/**
* @description: mouseMove
* @author: renchao
*/
mouseMove (e) {
if (!this.hideZoom && this.imgLoadedFlag) {
this.imgLoaded();
......@@ -225,6 +233,11 @@
selector.bgTop = addWidth - y * scale;
}
},
/**
* @description: initSelectorProperty
* @param {*} selectorWidth
* @author: renchao
*/
initSelectorProperty (selectorWidth) {
const selectorHalfWidth = selectorWidth / 2;
const selector = this.selector;
......@@ -236,12 +249,20 @@
selector.absoluteLeft = left + selectorHalfWidth + scrollLeft;
selector.absoluteTop = top + selectorHalfWidth + scrollTop;
},
/**
* @description: mouseLeave
* @author: renchao
*/
mouseLeave () {
this.hideSelector = true;
if (this.outShow) {
this.hideOutShow = true;
}
},
/**
* @description: reset
* @author: renchao
*/
reset () {
Object.assign(this.selector, {
top: 0,
......@@ -251,9 +272,18 @@
});
this.resetOutShowInitPosition();
},
/**
* @description: resetOutShowInitPosition
* @author: renchao
*/
resetOutShowInitPosition () {
this.outShowInitTop = 0;
},
/**
* @description: resetOutShowInitPosition
* @param {*} e
* @author: renchao
*/
imgerrorfun (e) {
// let img = require('@/assets/vehicle_img/blank_vehicle.jpg')
// this.url = img
......@@ -326,4 +356,4 @@
top: 50%;
transform: translateY(-50%);
}
</style>
\ No newline at end of file
</style>
......
......@@ -2,6 +2,15 @@ import Vue from 'vue'
import Popup from './index.vue'
const PopupBox = Vue.extend(Popup)
/**
* @description: install
* @param {*} title
* @param {*} editItem
* @param {*} data
* @param {*} formData
* @author: renchao
*/
Popup.install = function (title, editItem, data, formData) {
data.title = title
data.editItem = editItem
......
......@@ -55,7 +55,10 @@ export default {
}
},
mounted () {
// 计算滚动条高度
/**
* @description: 计算滚动条高度
* @author: renchao
*/
setTimeout(() => {
if (this.btnShow) {
if (this.height == 'auto') {
......@@ -73,10 +76,18 @@ export default {
}, 300)
},
methods: {
/**
* @description: onCancel
* @author: renchao
*/
onCancel () {
this.isShow = false
this.cancel()
},
/**
* @description: onConfirm
* @author: renchao
*/
onConfirm () {
this.loading = true
let res = new Promise((resolve, reject) => {
......@@ -87,9 +98,19 @@ export default {
this.isShow = false
}
},
/**
* @description: loadingFn
* @param {*} e
* @author: renchao
*/
loadingFn (e) { //加载状态
this.loading = e
},
/**
* @description: loadViewFn
* @param {*} view
* @author: renchao
*/
loadViewFn (view) {
return (r) =>
require.ensure([], () =>
......
/*
* @Description:
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-06-14 15:05:38
*/
......@@ -8,6 +8,10 @@ import Popup from './index.vue'
const PopupBox = Vue.extend(Popup)
let popuping = undefined
/**
* @description: close
* @author: renchao
*/
PopupBox.prototype.close = function () {
// 如果Popup 有引用,则去掉引用
if (popuping) {
......@@ -23,7 +27,14 @@ PopupBox.prototype.close = function () {
}
}, 300)
}
/**
* @description: Popup1
* @param {*} title
* @param {*} editItem
* @param {*} data
* @param {*} formData
* @author: renchao
*/
const Popup1 = (title, editItem, data, formData) => {
// 如果组件已渲染,则返回即可
if (popuping) {
......
......@@ -21,170 +21,183 @@
</transition>
</template>
<script>
import Popup1 from './index'
export default {
name: 'index',
data () {
return {
title: '标题',
editItem: "",
isMain: false,
formData: undefined,//父组件传递的参数 负责传给子组件
btnShow: false,
cancel: function () { },
confirm: function () { },
cancelText: '取消',
confirmText: '确认',
isSync: false,
isShow: false,
myShow: false,
titleStyle: 'center',
width: "75%",
height: "auto",
contentHeight: "",
iconClass: "",
key: 0
}
},
watch: {
isShow (newValue) {
this.$nextTick(() => {
this.editItem = this.loadViewFn(this.editItem)
document.body.appendChild(this.$el);
this.myShow = newValue
})
}
},
mounted () {
// 计算滚动条高度
setTimeout(() => {
if (this.btnShow) {
if (this.height == 'auto') {
this.contentHeight = (this.$refs.contentRef.offsetHeight) + 'px'
import Popup1 from './index'
export default {
name: 'index',
data () {
return {
title: '标题',
editItem: "",
isMain: false,
formData: undefined,//父组件传递的参数 负责传给子组件
btnShow: false,
cancel: function () { },
confirm: function () { },
cancelText: '取消',
confirmText: '确认',
isSync: false,
isShow: false,
myShow: false,
titleStyle: 'center',
width: "75%",
height: "auto",
contentHeight: "",
iconClass: "",
key: 0
}
},
watch: {
isShow (newValue) {
this.$nextTick(() => {
this.editItem = this.loadViewFn(this.editItem)
document.body.appendChild(this.$el);
this.myShow = newValue
})
}
},
mounted () {
/**
* @description: 计算滚动条高度
* @author: renchao
*/
setTimeout(() => {
if (this.btnShow) {
if (this.height == 'auto') {
this.contentHeight = (this.$refs.contentRef.offsetHeight) + 'px'
} else {
this.contentHeight = this.height
}
} else {
this.contentHeight = this.height
if (this.height == 'auto') {
this.contentHeight = (this.$refs.contentRef.offsetHeight) + 'px'
} else {
this.contentHeight = this.height
}
}
} else {
if (this.height == 'auto') {
this.contentHeight = (this.$refs.contentRef.offsetHeight) + 'px'
} else {
this.contentHeight = this.height
}, 300)
},
methods: {
/**
* @description: onCancel
* @author: renchao
*/
onCancel () {
Popup1().close()
},
/**
* @description: onConfirm
* @author: renchao
*/
onConfirm () {
let res = new Promise((resolve, reject) => {
this.confirm()
resolve(true)
})
if (res) {
this.isShow = false
}
},
/**
* @description: loadViewFn
* @param {*} view
* @author: renchao
*/
loadViewFn (view) {
return (r) =>
require.ensure([], () =>
r(require(`@/views/${view}.vue`))
)
}
}, 300)
},
methods: {
onCancel () {
Popup1().close()
},
onConfirm () {
let res = new Promise((resolve, reject) => {
this.confirm()
resolve(true)
})
if (res) {
this.isShow = false
destroyed () {
if (this.appendToBody && this.$el && this.$el.parentNode) {
this.$el.parentNode.removeChild(this.$el);
}
},
loadViewFn (view) {
return (r) =>
require.ensure([], () =>
r(require(`@/views/${view}.vue`))
)
}
},
destroyed () {
if (this.appendToBody && this.$el && this.$el.parentNode) {
this.$el.parentNode.removeChild(this.$el);
}
}
}
</script>
<style scoped lang="scss" >
@import "~@/styles/mixin.scss";
@import "~@/styles/dialogBox.scss";
.ls-mask {
width: 100%;
height: 100%;
z-index: 500;
position: fixed;
left: 0;
top: 0;
background: rgba(0, 0, 0, 0.3);
}
@import "~@/styles/mixin.scss";
@import "~@/styles/dialogBox.scss";
.ls-mask-window {
background: white;
position: relative;
left: 50%;
top: 50%;
min-height: 200px;
transform: translate(-50%, -50%);
border-radius: 5px;
overflow: hidden;
}
.ls-mask {
width: 100%;
height: 100%;
z-index: 500;
position: fixed;
left: 0;
top: 0;
background: rgba(0, 0, 0, 0.3);
}
.ls-mask-window b {
padding-left: 5px;
}
.ls-mask-window {
background: white;
position: relative;
left: 50%;
top: 50%;
min-height: 200px;
transform: translate(-50%, -50%);
border-radius: 5px;
overflow: hidden;
}
.ls-title {
padding: 16px;
color: #ffffff;
background: linear-gradient(3deg, #409EFF, #a7cbee);
font-size: 16px;
}
.ls-mask-window b {
padding-left: 5px;
}
.ls-title .svg-icon {
font-size: 18px;
}
.ls-title {
padding: 16px;
color: #ffffff;
background: linear-gradient(3deg, #409eff, #a7cbee);
font-size: 16px;
}
.mask-content {
padding: 20px;
width: 100%;
min-height: 30%;
max-height: 90vh;
overflow-y: scroll;
}
.ls-title .svg-icon {
font-size: 18px;
}
.ls-mask-footer {
height: 50px;
display: flex;
justify-content: center;
width: 100%;
position: absolute;
border-top: 1px solid $borderColor;
bottom: 0;
background: #ffffff;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
overflow: hidden;
}
.mask-content {
padding: 20px;
width: 100%;
min-height: 30%;
max-height: 90vh;
overflow-y: scroll;
}
.ls-mask-footer {
height: 50px;
display: flex;
justify-content: center;
width: 100%;
position: absolute;
border-top: 1px solid $borderColor;
bottom: 0;
background: #ffffff;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
overflow: hidden;
}
/deep/.closeStyle {
position: absolute;
top: 13px;
right: 26px;
font-size: 24px;
cursor: pointer;
color: #409EFF;
}
/deep/.closeStyle {
position: absolute;
top: 13px;
right: 26px;
font-size: 24px;
cursor: pointer;
color: #409eff;
}
/deep/.el-loading-mask {
background: none;
}
/deep/.el-loading-mask {
background: none;
}
.dialog-fade-enter-active,
.dialog-fade-leave-active {
transition: opacity 0.3s;
}
.dialog-fade-enter-active,
.dialog-fade-leave-active {
transition: opacity 0.3s;
}
.dialog-fade-enter,
.dialog-fade-leave-to {
opacity: 0;
}
.dialog-fade-enter,
.dialog-fade-leave-to {
opacity: 0;
}
</style>
\ No newline at end of file
......
......@@ -84,6 +84,13 @@ export default {
},
methods: {
/**
* @description: updateStyle
* @param {*} style
* @param {*} oldCluster
* @param {*} newCluster
* @author: renchao
*/
updateStyle (style, oldCluster, newCluster) {
let newStyle = style
oldCluster.forEach((color, index) => {
......@@ -92,6 +99,12 @@ export default {
return newStyle
},
/**
* @description: getCSSString
* @param {*} url
* @param {*} variable
* @author: renchao
*/
getCSSString (url, variable) {
return new Promise(resolve => {
const xhr = new XMLHttpRequest()
......@@ -106,6 +119,11 @@ export default {
})
},
/**
* @description: getThemeCluster
* @param {*} theme
* @author: renchao
*/
getThemeCluster (theme) {
const tintColor = (color, tint) => {
let red = parseInt(color.slice(0, 2), 16)
......@@ -169,4 +187,4 @@ export default {
.theme-picker-dropdown .el-color-dropdown__link-btn {
display: none;
}
</style>
\ No newline at end of file
</style>
......
......@@ -2,6 +2,10 @@ import objectAssign from 'element-ui/src/utils/merge';
import { markNodeData, NODE_KEY } from './util';
import { arrayFindIndex } from 'element-ui/src/utils/util';
/**
* @description: getChildState
* @author: renchao
*/
export const getChildState = node => {
let all = true;
let none = true;
......@@ -22,6 +26,11 @@ export const getChildState = node => {
return { all, none, allWithoutDisable, half: !all && !none };
};
/**
* @description: reInitChecked
* @param {*} node
* @author: renchao
*/
const reInitChecked = function(node) {
if (node.childNodes.length === 0 || node.loading) return;
......@@ -45,6 +54,12 @@ const reInitChecked = function(node) {
}
};
/**
* @description: getPropertyFromData
* @param {*} node
* @param {*} prop
* @author: renchao
*/
const getPropertyFromData = function(node, prop) {
const props = node.store.props;
const data = node.data || {};
......@@ -63,6 +78,11 @@ const getPropertyFromData = function(node, prop) {
let nodeIdSeed = 0;
export default class Node {
/**
* @description: constructor
* @param {*} options
* @author: renchao
*/
constructor(options) {
this.id = nodeIdSeed++;
this.text = null;
......@@ -135,6 +155,11 @@ export default class Node {
this.updateLeafState();
}
/**
* @description: setData
* @param {*} data
* @author: renchao
*/
setData(data) {
if (!Array.isArray(data)) {
markNodeData(this, data);
......@@ -155,20 +180,36 @@ export default class Node {
}
}
/**
* @description: label
* @author: renchao
*/
get label() {
return getPropertyFromData(this, 'label');
}
/**
* @description: key
* @author: renchao
*/
get key() {
const nodeKey = this.store.key;
if (this.data) return this.data[nodeKey];
return null;
}
/**
* @description: disabled
* @author: renchao
*/
get disabled() {
return getPropertyFromData(this, 'disabled');
}
/**
* @description: nextSibling
* @author: renchao
*/
get nextSibling() {
const parent = this.parent;
if (parent) {
......@@ -180,6 +221,10 @@ export default class Node {
return null;
}
/**
* @description: previousSibling
* @author: renchao
*/
get previousSibling() {
const parent = this.parent;
if (parent) {
......@@ -191,6 +236,12 @@ export default class Node {
return null;
}
/**
* @description: contains
* @param {*} target
* @param {*} deep
* @author: renchao
*/
contains(target, deep = true) {
const walk = function(parent) {
const children = parent.childNodes || [];
......@@ -208,6 +259,10 @@ export default class Node {
return walk(this);
}
/**
* @description: remove
* @author: renchao
*/
remove() {
const parent = this.parent;
if (parent) {
......@@ -215,6 +270,13 @@ export default class Node {
}
}
/**
* @description: insertChild
* @param {*} child
* @param {*} index
* @param {*} batch
* @author: renchao
*/
insertChild(child, index, batch) {
if (!child) throw new Error('insertChild error: child is required.');
......@@ -247,6 +309,12 @@ export default class Node {
this.updateLeafState();
}
/**
* @description: insertBefore
* @param {*} child
* @param {*} ref
* @author: renchao
*/
insertBefore(child, ref) {
let index;
if (ref) {
......@@ -255,6 +323,12 @@ export default class Node {
this.insertChild(child, index);
}
/**
* @description: insertAfter
* @param {*} child
* @param {*} ref
* @author: renchao
*/
insertAfter(child, ref) {
let index;
if (ref) {
......@@ -264,6 +338,11 @@ export default class Node {
this.insertChild(child, index);
}
/**
* @description: removeChild
* @param {*} child
* @author: renchao
*/
removeChild(child) {
const children = this.getChildren() || [];
const dataIndex = children.indexOf(child.data);
......@@ -282,6 +361,11 @@ export default class Node {
this.updateLeafState();
}
/**
* @description: removeChildByData
* @param {*} data
* @author: renchao
*/
removeChildByData(data) {
let targetNode = null;
......@@ -297,6 +381,12 @@ export default class Node {
}
}
/**
* @description: expand
* @param {*} callback
* @param {*} expandParent
* @author: renchao
*/
expand(callback, expandParent) {
const done = () => {
if (expandParent) {
......@@ -326,20 +416,38 @@ export default class Node {
}
}
/**
* @description: doCreateChildren
* @param {*} array
* @param {*} defaultProps
* @author: renchao
*/
doCreateChildren(array, defaultProps = {}) {
array.forEach((item) => {
this.insertChild(objectAssign({ data: item }, defaultProps), undefined, true);
});
}
/**
* @description: collapse
* @author: renchao
*/
collapse() {
this.expanded = false;
}
/**
* @description: shouldLoadData
* @author: renchao
*/
shouldLoadData() {
return this.store.lazy === true && this.store.load && !this.loaded;
}
/**
* @description: updateLeafState
* @author: renchao
*/
updateLeafState() {
if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== 'undefined') {
this.isLeaf = this.isLeafByUser;
......@@ -353,6 +461,14 @@ export default class Node {
this.isLeaf = false;
}
/**
* @description: setChecked
* @param {*} value
* @param {*} deep
* @param {*} recursion
* @param {*} passValue
* @author: renchao
*/
setChecked(value, deep, recursion, passValue) {
this.indeterminate = value === 'half';
this.checked = value === true;
......@@ -406,6 +522,11 @@ export default class Node {
}
}
/**
* @description: getChildren
* @param {*} forceInit
* @author: renchao
*/
getChildren(forceInit = false) { // this is data
if (this.level === 0) return this.data;
const data = this.data;
......@@ -428,6 +549,10 @@ export default class Node {
return data[children];
}
/**
* @description: updateChildren
* @author: renchao
*/
updateChildren() {
const newData = this.getChildren() || [];
const oldData = this.childNodes.map((node) => node.data);
......@@ -458,6 +583,12 @@ export default class Node {
this.updateLeafState();
}
/**
* @description: loadData
* @param {*} callback
* @param {*} defaultProps
* @author: renchao
*/
loadData(callback, defaultProps = {}) {
if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps).length)) {
this.loading = true;
......
......@@ -2,6 +2,11 @@ import Node from './node';
import { getNodeKey } from './util';
export default class TreeStore {
/**
* @description: constructor
* @param {*} options
* @author: renchao
*/
constructor(options) {
this.currentNode = null;
this.currentNodeKey = null;
......@@ -30,6 +35,11 @@ export default class TreeStore {
}
}
/**
* @description: filter
* @param {*} value
* @author: renchao
*/
filter(value) {
const filterNodeMethod = this.filterNodeMethod;
const lazy = this.lazy;
......@@ -60,6 +70,11 @@ export default class TreeStore {
traverse(this);
}
/**
* @description: setData
* @param {*} newVal
* @author: renchao
*/
setData(newVal) {
const instanceChanged = newVal !== this.root.data;
if (instanceChanged) {
......@@ -70,22 +85,44 @@ export default class TreeStore {
}
}
/**
* @description: getNode
* @param {*} data
* @author: renchao
*/
getNode(data) {
if (data instanceof Node) return data;
const key = typeof data !== 'object' ? data : getNodeKey(this.key, data);
return this.nodesMap[key] || null;
}
/**
* @description: insertBefore
* @param {*} data
* @param {*} refData
* @author: renchao
*/
insertBefore(data, refData) {
const refNode = this.getNode(refData);
refNode.parent.insertBefore({ data }, refNode);
}
/**
* @description: insertAfter
* @param {*} data
* @param {*} refData
* @author: renchao
*/
insertAfter(data, refData) {
const refNode = this.getNode(refData);
refNode.parent.insertAfter({ data }, refNode);
}
/**
* @description: remove
* @param {*} data
* @author: renchao
*/
remove(data) {
const node = this.getNode(data);
......@@ -97,6 +134,12 @@ export default class TreeStore {
}
}
/**
* @description: append
* @param {*} data
* @param {*} parentData
* @author: renchao
*/
append(data, parentData) {
const parentNode = parentData ? this.getNode(parentData) : this.root;
......@@ -105,6 +148,10 @@ export default class TreeStore {
}
}
/**
* @description: _initDefaultCheckedNodes
* @author: renchao
*/
_initDefaultCheckedNodes() {
const defaultCheckedKeys = this.defaultCheckedKeys || [];
const nodesMap = this.nodesMap;
......@@ -118,6 +165,11 @@ export default class TreeStore {
});
}
/**
* @description: _initDefaultCheckedNode
* @param {*} node
* @author: renchao
*/
_initDefaultCheckedNode(node) {
const defaultCheckedKeys = this.defaultCheckedKeys || [];
......@@ -126,6 +178,11 @@ export default class TreeStore {
}
}
/**
* @description: setDefaultCheckedKey
* @param {*} newVal
* @author: renchao
*/
setDefaultCheckedKey(newVal) {
if (newVal !== this.defaultCheckedKeys) {
this.defaultCheckedKeys = newVal;
......@@ -133,6 +190,11 @@ export default class TreeStore {
}
}
/**
* @description: registerNode
* @param {*} node
* @author: renchao
*/
registerNode(node) {
const key = this.key;
if (!key || !node || !node.data) return;
......@@ -141,6 +203,11 @@ export default class TreeStore {
if (nodeKey !== undefined) this.nodesMap[node.key] = node;
}
/**
* @description: deregisterNode
* @param {*} node
* @author: renchao
*/
deregisterNode(node) {
const key = this.key;
if (!key || !node || !node.data) return;
......@@ -152,6 +219,12 @@ export default class TreeStore {
delete this.nodesMap[node.key];
}
/**
* @description: getCheckedNodes
* @param {*} leafOnly
* @param {*} includeHalfChecked
* @author: renchao
*/
getCheckedNodes(leafOnly = false, includeHalfChecked = false) {
const checkedNodes = [];
const traverse = function(node) {
......@@ -171,10 +244,19 @@ export default class TreeStore {
return checkedNodes;
}
/**
* @description: getCheckedKeys
* @param {*} leafOnly
* @author: renchao
*/
getCheckedKeys(leafOnly = false) {
return this.getCheckedNodes(leafOnly).map((data) => (data || {})[this.key]);
}
/**
* @description: getHalfCheckedNodes
* @author: renchao
*/
getHalfCheckedNodes() {
const nodes = [];
const traverse = function(node) {
......@@ -194,10 +276,18 @@ export default class TreeStore {
return nodes;
}
/**
* @description: getHalfCheckedKeys
* @author: renchao
*/
getHalfCheckedKeys() {
return this.getHalfCheckedNodes().map((data) => (data || {})[this.key]);
}
/**
* @description: _getAllNodes
* @author: renchao
*/
_getAllNodes() {
const allNodes = [];
const nodesMap = this.nodesMap;
......@@ -210,6 +300,12 @@ export default class TreeStore {
return allNodes;
}
/**
* @description: updateChildren
* @param {*} key
* @param {*} data
* @author: renchao
*/
updateChildren(key, data) {
const node = this.nodesMap[key];
if (!node) return;
......@@ -224,6 +320,13 @@ export default class TreeStore {
}
}
/**
* @description: _setCheckedKeys
* @param {*} key
* @param {*} leafOnly
* @param {*} checkedKeys
* @author: renchao
*/
_setCheckedKeys(key, leafOnly = false, checkedKeys) {
const allNodes = this._getAllNodes().sort((a, b) => b.level - a.level);
const cache = Object.create(null);
......@@ -268,6 +371,12 @@ export default class TreeStore {
}
}
/**
* @description: setCheckedNodes
* @param {*} array
* @param {*} leafOnly
* @author: renchao
*/
setCheckedNodes(array, leafOnly = false) {
const key = this.key;
const checkedKeys = {};
......@@ -278,6 +387,12 @@ export default class TreeStore {
this._setCheckedKeys(key, leafOnly, checkedKeys);
}
/**
* @description: setCheckedKeys
* @param {*} array
* @param {*} leafOnly
* @author: renchao
*/
setCheckedKeys(keys, leafOnly = false) {
this.defaultCheckedKeys = keys;
const key = this.key;
......@@ -289,6 +404,11 @@ export default class TreeStore {
this._setCheckedKeys(key, leafOnly, checkedKeys);
}
/**
* @description: setDefaultExpandedKeys
* @param {*} keys
* @author: renchao
*/
setDefaultExpandedKeys(keys) {
keys = keys || [];
this.defaultExpandedKeys = keys;
......@@ -299,6 +419,13 @@ export default class TreeStore {
});
}
/**
* @description: setChecked
* @param {*} data
* @param {*} checked
* @param {*} deep
* @author: renchao
*/
setChecked(data, checked, deep) {
const node = this.getNode(data);
......@@ -307,10 +434,19 @@ export default class TreeStore {
}
}
/**
* @description: getCurrentNode
* @author: renchao
*/
getCurrentNode() {
return this.currentNode;
}
/**
* @description: setCurrentNode
* @param {*} currentNode
* @author: renchao
*/
setCurrentNode(currentNode) {
const prevCurrentNode = this.currentNode;
if (prevCurrentNode) {
......@@ -320,12 +456,22 @@ export default class TreeStore {
this.currentNode.isCurrent = true;
}
/**
* @description: setUserCurrentNode
* @param {*} node
* @author: renchao
*/
setUserCurrentNode(node) {
const key = node[this.key];
const currNode = this.nodesMap[key];
this.setCurrentNode(currNode);
}
/**
* @description: setCurrentNodeKey
* @param {*} key
* @author: renchao
*/
setCurrentNodeKey(key) {
if (key === null || key === undefined) {
this.currentNode && (this.currentNode.isCurrent = false);
......
export const NODE_KEY = '$treeNodeId';
/**
* @description: markNodeData
* @param {*} node
* @param {*} data
* @author: renchao
*/
export const markNodeData = function(node, data) {
if (!data || data[NODE_KEY]) return;
Object.defineProperty(data, NODE_KEY, {
......@@ -10,11 +16,23 @@ export const markNodeData = function(node, data) {
});
};
/**
* @description: getNodeKey
* @param {*} key
* @param {*} data
* @author: renchao
*/
export const getNodeKey = function(key, data) {
if (!key) return data[NODE_KEY];
return data[key];
};
/**
* @description: findNearestComponent
* @param {*} element
* @param {*} componentName
* @author: renchao
*/
export const findNearestComponent = (element, componentName) => {
let target = element;
while (target && target.tagName !== 'BODY') {
......
......@@ -116,10 +116,21 @@ export default {
},
methods: {
/**
* @description: getNodeKey
* @param {*} node
* @author: renchao
*/
getNodeKey (node) {
return getNodeKey(this.tree.nodeKey, node.data);
},
/**
* @description: handleSelectChange
* @param {*} checked
* @param {*} indeterminate
* @author: renchao
*/
handleSelectChange (checked, indeterminate) {
if (this.oldChecked !== checked && this.oldIndeterminate !== indeterminate) {
this.tree.$emit('check-change', this.node.data, checked, indeterminate);
......@@ -128,6 +139,10 @@ export default {
this.indeterminate = indeterminate;
},
/**
* @description: handleClick
* @author: renchao
*/
handleClick () {
const store = this.tree.store;
store.setCurrentNode(this.node);
......@@ -144,6 +159,11 @@ export default {
this.tree.$emit('node-click', this.node.data, this.node, this);
},
/**
* @description: handleContextMenu
* @param {*} event
* @author: renchao
*/
handleContextMenu (event) {
if (this.tree._events['node-contextmenu'] && this.tree._events['node-contextmenu'].length > 0) {
event.stopPropagation();
......@@ -152,6 +172,10 @@ export default {
this.tree.$emit('node-contextmenu', event, this.node.data, this.node, this);
},
/**
* @description: handleExpandIconClick
* @author: renchao
*/
handleExpandIconClick () {
if (this.node.isLeaf) return;
if (this.expanded) {
......@@ -163,6 +187,12 @@ export default {
}
},
/**
* @description: handleCheckChange
* @param {*} value
* @param {*} ev
* @author: renchao
*/
handleCheckChange (value, ev) {
this.node.setChecked(ev.target.checked, !this.tree.checkStrictly);
this.$nextTick(() => {
......@@ -176,26 +206,53 @@ export default {
});
},
/**
* @description: handleChildNodeExpand
* @param {*} nodeData
* @param {*} node
* @param {*} instance
* @author: renchao
*/
handleChildNodeExpand (nodeData, node, instance) {
this.broadcast('ElTreeNode', 'tree-node-expand', node);
this.tree.$emit('node-expand', nodeData, node, instance);
},
/**
* @description: handleDragStart
* @param {*} event
* @author: renchao
*/
handleDragStart (event) {
if (!this.tree.draggable) return;
this.tree.$emit('tree-node-drag-start', event, this);
},
/**
* @description: handleDragOver
* @param {*} event
* @author: renchao
*/
handleDragOver (event) {
if (!this.tree.draggable) return;
this.tree.$emit('tree-node-drag-over', event, this);
event.preventDefault();
},
/**
* @description: handleDrop
* @param {*} event
* @author: renchao
*/
handleDrop (event) {
event.preventDefault();
},
/**
* @description: handleDragEnd
* @param {*} event
* @author: renchao
*/
handleDragEnd (event) {
if (!this.tree.draggable) return;
this.tree.$emit('tree-node-drag-end', event, this);
......
......@@ -177,15 +177,30 @@
},
methods: {
/**
* @description: filter
* @param {*} value
* @author: renchao
*/
filter(value) {
if (!this.filterNodeMethod) throw new Error('[Tree] filterNodeMethod is required when filter');
this.store.filter(value);
},
/**
* @description: getNodeKey
* @param {*} node
* @author: renchao
*/
getNodeKey(node) {
return getNodeKey(this.nodeKey, node.data);
},
/**
* @description: getNodePath
* @param {*} data
* @author: renchao
*/
getNodePath(data) {
if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in getNodePath');
const node = this.store.getNode(data);
......@@ -199,87 +214,188 @@
return path.reverse();
},
/**
* @description: getCheckedNodes
* @param {*} leafOnly
* @param {*} includeHalfChecked
* @author: renchao
*/
getCheckedNodes(leafOnly, includeHalfChecked) {
return this.store.getCheckedNodes(leafOnly, includeHalfChecked);
},
/**
* @description: getCheckedKeys
* @param {*} leafOnly
* @author: renchao
*/
getCheckedKeys(leafOnly) {
return this.store.getCheckedKeys(leafOnly);
},
/**
* @description: getCurrentNode
* @author: renchao
*/
getCurrentNode() {
const currentNode = this.store.getCurrentNode();
return currentNode ? currentNode.data : null;
},
/**
* @description: getCurrentKey
* @author: renchao
*/
getCurrentKey() {
if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in getCurrentKey');
const currentNode = this.getCurrentNode();
return currentNode ? currentNode[this.nodeKey] : null;
},
/**
* @description: setCheckedNodes
* @param {*} nodes
* @param {*} leafOnly
* @author: renchao
*/
setCheckedNodes(nodes, leafOnly) {
if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedNodes');
this.store.setCheckedNodes(nodes, leafOnly);
},
/**
* @description: setCheckedKeys
* @param {*} keys
* @param {*} leafOnly
* @author: renchao
*/
setCheckedKeys(keys, leafOnly) {
if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedKeys');
this.store.setCheckedKeys(keys, leafOnly);
},
/**
* @description: setChecked
* @param {*} data
* @param {*} checked
* @param {*} deep
* @author: renchao
*/
setChecked(data, checked, deep) {
this.store.setChecked(data, checked, deep);
},
/**
* @description: getHalfCheckedNodes
* @author: renchao
*/
getHalfCheckedNodes() {
return this.store.getHalfCheckedNodes();
},
/**
* @description: getHalfCheckedKeys
* @author: renchao
*/
getHalfCheckedKeys() {
return this.store.getHalfCheckedKeys();
},
/**
* @description: setCurrentNode
* @param {*} node
* @author: renchao
*/
setCurrentNode(node) {
if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCurrentNode');
this.store.setUserCurrentNode(node);
},
/**
* @description: setCurrentKey
* @param {*} key
* @author: renchao
*/
setCurrentKey(key) {
if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCurrentKey');
this.store.setCurrentNodeKey(key);
},
/**
* @description: getNode
* @param {*} data
* @author: renchao
*/
getNode(data) {
return this.store.getNode(data);
},
/**
* @description: remove
* @param {*} data
* @author: renchao
*/
remove(data) {
this.store.remove(data);
},
/**
* @description: append
* @param {*} data
* @param {*} parentNode
* @author: renchao
*/
append(data, parentNode) {
this.store.append(data, parentNode);
},
/**
* @description: insertBefore
* @param {*} data
* @param {*} refNode
* @author: renchao
*/
insertBefore(data, refNode) {
this.store.insertBefore(data, refNode);
},
/**
* @description: insertAfter
* @param {*} data
* @param {*} refNode
* @author: renchao
*/
insertAfter(data, refNode) {
this.store.insertAfter(data, refNode);
},
/**
* @description: handleNodeExpand
* @param {*} nodeData
* @param {*} node
* @param {*} instance
* @author: renchao
*/
handleNodeExpand(nodeData, node, instance) {
this.broadcast('ElTreeNode', 'tree-node-expand', node);
this.$emit('node-expand', nodeData, node, instance);
},
/**
* @description: updateKeyChildren
* @param {*} key
* @param {*} data
* @author: renchao
*/
updateKeyChildren(key, data) {
if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in updateKeyChild');
this.store.updateChildren(key, data);
},
/**
* @description: initTabIndex
* @author: renchao
*/
initTabIndex() {
this.treeItems = this.$el.querySelectorAll('.is-focusable[role=treeitem]');
this.checkboxItems = this.$el.querySelectorAll('input[type=checkbox]');
......@@ -291,6 +407,11 @@
this.treeItems[0] && this.treeItems[0].setAttribute('tabindex', 0);
},
/**
* @description: handleKeydown
* @param {*} ev
* @author: renchao
*/
handleKeydown(ev) {
const currentItem = ev.target;
if (currentItem.className.indexOf('el-tree-node') === -1) return;
......@@ -319,6 +440,10 @@
}
},
/**
* @description: created
* @author: renchao
*/
created() {
this.isTree = true;
......