@@ -12,7 +12,7 @@ module.exports = { | |||||
proxyTable: { | proxyTable: { | ||||
"/api": { | "/api": { | ||||
// 请求的目标主机 | // 请求的目标主机 | ||||
//target: 'http://116.255.135.38:8081/nsgk_test/', | |||||
//target: 'http://116.255.223.226:8081/nsgk_test/', | |||||
target: 'http://localhost:8080/', | target: 'http://localhost:8080/', | ||||
changeOrigin: true, | changeOrigin: true, | ||||
pathRewrite: { | pathRewrite: { | ||||
@@ -183,7 +183,6 @@ | |||||
"version": "1.0.10", | "version": "1.0.10", | ||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", | ||||
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", | ||||
"dev": true, | |||||
"requires": { | "requires": { | ||||
"sprintf-js": "~1.0.2" | "sprintf-js": "~1.0.2" | ||||
} | } | ||||
@@ -1346,6 +1345,34 @@ | |||||
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", | "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", | ||||
"dev": true | "dev": true | ||||
}, | }, | ||||
"bmaplib.curveline": { | |||||
"version": "1.0.0", | |||||
"resolved": "https://registry.npmjs.org/bmaplib.curveline/-/bmaplib.curveline-1.0.0.tgz", | |||||
"integrity": "sha512-9wcFMVhiYxNPqpvsLDAADn3qDhNzXp2mA6VyHSHg2XOAgSooC7ZiujdFhy0sp+0QYjTfJ/MjmLuNoUg2HHxH4Q==" | |||||
}, | |||||
"bmaplib.heatmap": { | |||||
"version": "1.0.4", | |||||
"resolved": "https://registry.npmjs.org/bmaplib.heatmap/-/bmaplib.heatmap-1.0.4.tgz", | |||||
"integrity": "sha512-rmhqUARBpUSJ9jXzUI2j7dIOqnc38bqubkx/8a349U2qtw/ulLUwyzRD535OrA8G7w5cz4aPKm6/rNvUAarg/Q==" | |||||
}, | |||||
"bmaplib.lushu": { | |||||
"version": "1.0.7", | |||||
"resolved": "https://registry.npmjs.org/bmaplib.lushu/-/bmaplib.lushu-1.0.7.tgz", | |||||
"integrity": "sha512-LVvgpESPii6xGxyjnQjq8u+ic4NjvhdCPV/RiSS/PGTUdZKeTDS7prSpleJLZH3ES0+oc0gYn8bw0LtPYUSz2w==" | |||||
}, | |||||
"bmaplib.markerclusterer": { | |||||
"version": "1.0.13", | |||||
"resolved": "https://registry.npmjs.org/bmaplib.markerclusterer/-/bmaplib.markerclusterer-1.0.13.tgz", | |||||
"integrity": "sha512-VrLyWSiuDEVNi0yUfwOhFQ6z1oEEHS4w36GNu3iASu6p52QIx9uAXMUkuSCHReNR0bj2Cp9SA1dSx5RpojXajQ==", | |||||
"requires": { | |||||
"bmaplib.texticonoverlay": "^1.0.2" | |||||
} | |||||
}, | |||||
"bmaplib.texticonoverlay": { | |||||
"version": "1.0.2", | |||||
"resolved": "https://registry.npmjs.org/bmaplib.texticonoverlay/-/bmaplib.texticonoverlay-1.0.2.tgz", | |||||
"integrity": "sha512-4ZTWr4ZP3B6qEWput5Tut16CfZgII38YwM3bpyb4gFTQyORlKYryFp9WHWrwZZaHlOyYDAXG9SX0hka43jTADg==" | |||||
}, | |||||
"bn.js": { | "bn.js": { | ||||
"version": "5.2.0", | "version": "5.2.0", | ||||
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", | "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", | ||||
@@ -3557,12 +3584,12 @@ | |||||
} | } | ||||
}, | }, | ||||
"echarts": { | "echarts": { | ||||
"version": "5.2.2", | |||||
"resolved": "https://registry.npmjs.org/echarts/-/echarts-5.2.2.tgz", | |||||
"integrity": "sha512-yxuBfeIH5c+0FsoRP60w4De6omXhA06c7eUYBsC1ykB6Ys2yK5fSteIYWvkJ4xJVLQgCvAdO8C4mN6MLeJpBaw==", | |||||
"version": "5.3.3", | |||||
"resolved": "https://registry.npmjs.org/echarts/-/echarts-5.3.3.tgz", | |||||
"integrity": "sha512-BRw2serInRwO5SIwRviZ6Xgm5Lb7irgz+sLiFMmy/HOaf4SQ+7oYqxKzRHAKp4xHQ05AuHw1xvoQWJjDQq/FGw==", | |||||
"requires": { | "requires": { | ||||
"tslib": "2.3.0", | "tslib": "2.3.0", | ||||
"zrender": "5.2.1" | |||||
"zrender": "5.3.2" | |||||
} | } | ||||
}, | }, | ||||
"ee-first": { | "ee-first": { | ||||
@@ -5867,6 +5894,14 @@ | |||||
"resolved": "https://registry.npmjs.org/lib-flexible/-/lib-flexible-0.3.2.tgz", | "resolved": "https://registry.npmjs.org/lib-flexible/-/lib-flexible-0.3.2.tgz", | ||||
"integrity": "sha1-BvWnSDIxSi01wSA5vJw8otrqpCY=" | "integrity": "sha1-BvWnSDIxSi01wSA5vJw8otrqpCY=" | ||||
}, | }, | ||||
"linkify-it": { | |||||
"version": "2.2.0", | |||||
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", | |||||
"integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", | |||||
"requires": { | |||||
"uc.micro": "^1.0.1" | |||||
} | |||||
}, | |||||
"load-json-file": { | "load-json-file": { | ||||
"version": "2.0.0", | "version": "2.0.0", | ||||
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", | "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", | ||||
@@ -6044,6 +6079,25 @@ | |||||
"object-visit": "^1.0.0" | "object-visit": "^1.0.0" | ||||
} | } | ||||
}, | }, | ||||
"markdown-it": { | |||||
"version": "8.4.2", | |||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", | |||||
"integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==", | |||||
"requires": { | |||||
"argparse": "^1.0.7", | |||||
"entities": "~1.1.1", | |||||
"linkify-it": "^2.0.0", | |||||
"mdurl": "^1.0.1", | |||||
"uc.micro": "^1.0.5" | |||||
}, | |||||
"dependencies": { | |||||
"entities": { | |||||
"version": "1.1.2", | |||||
"resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", | |||||
"integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" | |||||
} | |||||
} | |||||
}, | |||||
"math-expression-evaluator": { | "math-expression-evaluator": { | ||||
"version": "1.3.7", | "version": "1.3.7", | ||||
"resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.3.7.tgz", | "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.3.7.tgz", | ||||
@@ -6073,6 +6127,11 @@ | |||||
"integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==", | "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==", | ||||
"dev": true | "dev": true | ||||
}, | }, | ||||
"mdurl": { | |||||
"version": "1.0.1", | |||||
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", | |||||
"integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==" | |||||
}, | |||||
"media-typer": { | "media-typer": { | ||||
"version": "0.3.0", | "version": "0.3.0", | ||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", | ||||
@@ -11210,8 +11269,7 @@ | |||||
"sprintf-js": { | "sprintf-js": { | ||||
"version": "1.0.3", | "version": "1.0.3", | ||||
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", | ||||
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", | |||||
"dev": true | |||||
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" | |||||
}, | }, | ||||
"sshpk": { | "sshpk": { | ||||
"version": "1.16.1", | "version": "1.16.1", | ||||
@@ -11702,6 +11760,11 @@ | |||||
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", | "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", | ||||
"dev": true | "dev": true | ||||
}, | }, | ||||
"uc.micro": { | |||||
"version": "1.0.6", | |||||
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", | |||||
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" | |||||
}, | |||||
"uglify-js": { | "uglify-js": { | ||||
"version": "3.4.10", | "version": "3.4.10", | ||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", | "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", | ||||
@@ -12084,6 +12147,18 @@ | |||||
"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.12.tgz", | "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.12.tgz", | ||||
"integrity": "sha512-uhmLFETqPPNyuLLbsKz6ioJ4q7AZHzD8ZVFNATNyICSZouqP2Sz0rotWQC8UNBF6VGSCs5abnKJoStA6JbCbfg==" | "integrity": "sha512-uhmLFETqPPNyuLLbsKz6ioJ4q7AZHzD8ZVFNATNyICSZouqP2Sz0rotWQC8UNBF6VGSCs5abnKJoStA6JbCbfg==" | ||||
}, | }, | ||||
"vue-baidu-map": { | |||||
"version": "0.21.22", | |||||
"resolved": "https://registry.npmjs.org/vue-baidu-map/-/vue-baidu-map-0.21.22.tgz", | |||||
"integrity": "sha512-WQMPCih4UTh0AZCKKH/OVOYnyAWjfRNeK6BIeoLmscyY5aF8zzlJhz/NOHLb3mdztIpB0Z6aohn4Jd9mfCSjQw==", | |||||
"requires": { | |||||
"bmaplib.curveline": "^1.0.0", | |||||
"bmaplib.heatmap": "^1.0.4", | |||||
"bmaplib.lushu": "^1.0.7", | |||||
"bmaplib.markerclusterer": "^1.0.13", | |||||
"markdown-it": "^8.4.0" | |||||
} | |||||
}, | |||||
"vue-cookies": { | "vue-cookies": { | ||||
"version": "1.7.4", | "version": "1.7.4", | ||||
"resolved": "https://registry.npmjs.org/vue-cookies/-/vue-cookies-1.7.4.tgz", | "resolved": "https://registry.npmjs.org/vue-cookies/-/vue-cookies-1.7.4.tgz", | ||||
@@ -13508,9 +13583,9 @@ | |||||
} | } | ||||
}, | }, | ||||
"zrender": { | "zrender": { | ||||
"version": "5.2.1", | |||||
"resolved": "https://registry.npmjs.org/zrender/-/zrender-5.2.1.tgz", | |||||
"integrity": "sha512-M3bPGZuyLTNBC6LiNKXJwSCtglMp8XUEqEBG+2MdICDI3d1s500Y4P0CzldQGsqpRVB7fkvf3BKQQRxsEaTlsw==", | |||||
"version": "5.3.2", | |||||
"resolved": "https://registry.npmjs.org/zrender/-/zrender-5.3.2.tgz", | |||||
"integrity": "sha512-8IiYdfwHj2rx0UeIGZGGU4WEVSDEdeVCaIg/fomejg1Xu6OifAL1GVzIPHg2D+MyUkbNgPWji90t0a8IDk+39w==", | |||||
"requires": { | "requires": { | ||||
"tslib": "2.3.0" | "tslib": "2.3.0" | ||||
} | } | ||||
@@ -12,7 +12,7 @@ | |||||
"dependencies": { | "dependencies": { | ||||
"@vant/area-data": "^1.2.2", | "@vant/area-data": "^1.2.2", | ||||
"axios": "^0.21.1", | "axios": "^0.21.1", | ||||
"echarts": "^5.2.2", | |||||
"echarts": "^5.3.3", | |||||
"element-ui": "^2.15.6", | "element-ui": "^2.15.6", | ||||
"font-awesome": "^4.7.0", | "font-awesome": "^4.7.0", | ||||
"font-awesome.css": "^4.7.2", | "font-awesome.css": "^4.7.2", | ||||
@@ -28,6 +28,7 @@ | |||||
"sass-loader": "^6.0.6", | "sass-loader": "^6.0.6", | ||||
"vant": "^2.12.8", | "vant": "^2.12.8", | ||||
"vue": "^2.5.2", | "vue": "^2.5.2", | ||||
"vue-baidu-map": "^0.21.22", | |||||
"vue-cookies": "^1.7.4", | "vue-cookies": "^1.7.4", | ||||
"vue-esign": "^1.0.5", | "vue-esign": "^1.0.5", | ||||
"vue-router": "^3.0.1", | "vue-router": "^3.0.1", | ||||
@@ -0,0 +1,44 @@ | |||||
import request from '@/utils/request' | |||||
//查询列表 | |||||
export function getList(data){ | |||||
return request({ | |||||
url:'/yinnong/deposit/list', | |||||
method:'get', | |||||
params:data | |||||
}) | |||||
} | |||||
// 新增开户行 | |||||
export function addDeposit(data) { | |||||
return request({ | |||||
url: '/yinnong/deposit/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改开户行 | |||||
export function editDeposit(data) { | |||||
return request({ | |||||
url: '/yinnong/deposit/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 查询开户行详细 | |||||
export function getDeposit(id) { | |||||
return request({ | |||||
url: '/yinnong/deposit/get/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 删除开户行 | |||||
export function delDeposit(id) { | |||||
return request({ | |||||
url: '/yinnong/deposit/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} |
@@ -345,3 +345,12 @@ export function selectApprovalByTemplateId(templateId) { | |||||
method: 'get' | method: 'get' | ||||
}) | }) | ||||
} | } | ||||
// 撤回 | |||||
export function updateTYinnongTransferFoStatus(data) { | |||||
return request({ | |||||
url: '/yinnong/transfer/updateTYinnongTransferFoStatus', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} |
@@ -0,0 +1,439 @@ | |||||
import request from '@/utils/request' | |||||
// 查询固定资产列表 | |||||
export function permanentList(query) { | |||||
return request({ | |||||
url: '/asset/permanent/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询合同信息列表 | |||||
export function contractionList(query) { | |||||
return request({ | |||||
url: '/contraction/info/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 新增固定资产 | |||||
export function addPermanent(data) { | |||||
return request({ | |||||
url: '/asset/permanent/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 查询固定资产详细 | |||||
export function getPermanent(id) { | |||||
return request({ | |||||
url: '/asset/permanent/get/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 修改固定资产 | |||||
export function updatePermanent(data) { | |||||
return request({ | |||||
url: '/asset/permanent/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除固定资产 | |||||
export function delPermanent(id) { | |||||
return request({ | |||||
url: '/asset/permanent/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
//上传全局方法附件 | |||||
export function commonAttach(data) { | |||||
return request({ | |||||
url: '/common/attach', | |||||
method: 'post', | |||||
header: { "Content-Type": 'application/x-www-form-urlencoded' }, | |||||
data: data | |||||
}) | |||||
} | |||||
//上传全局方法附件 | |||||
export function commonUpload(data) { | |||||
return request({ | |||||
url: '/common/upload', | |||||
method: 'post', | |||||
header: { "Content-Type": 'application/x-www-form-urlencoded' }, | |||||
data: data | |||||
}) | |||||
} | |||||
//查询已上传附件 | |||||
export const attachmentList = (data) => { | |||||
return request({ | |||||
url: '/system/attachment/query', | |||||
method: 'get', | |||||
params: data | |||||
}) | |||||
} | |||||
//删除已上传附件 | |||||
export function systemAttachment(ids) { | |||||
if (ids != undefined) { | |||||
return request({ | |||||
url: '/system/attachment/remove/' + ids, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
} | |||||
// 新增合同信息 | |||||
export function addInfo(data) { | |||||
return request({ | |||||
url: '/contraction/info/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 查询合同信息详细 | |||||
export function getInfo(id) { | |||||
return request({ | |||||
url: '/contraction/info/get/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 删除合同信息 | |||||
export function delInfo(id) { | |||||
return request({ | |||||
url: '/contraction/info/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 修改合同信息 | |||||
export function updateInfo(data) { | |||||
return request({ | |||||
url: '/contraction/info/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 财务公开列表 | |||||
export function financePublicList(query) { | |||||
return request({ | |||||
url: '/villageAffairs/public/financePublicList', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 零工公开列表 | |||||
export function tempWorkerPublicList(query) { | |||||
return request({ | |||||
url: '/villageAffairs/public/tempWorkerPublicList', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 重大事项公开列表 | |||||
export function majorEventPublicList(query) { | |||||
return request({ | |||||
url: '/villageAffairs/public/majorEventPublicList', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 财务公开详情 | |||||
export function financePublicDetail(query) { | |||||
return request({ | |||||
url: '/villageAffairs/public/financePublicDetail', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 零工公开详情 | |||||
export function tempWorkerPublicDetail(query) { | |||||
return request({ | |||||
url: '/villageAffairs/public/tempWorkerPublicDetail', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 重大事项公开详情 | |||||
export function majorEventPublicDetail(query) { | |||||
return request({ | |||||
url: '/villageAffairs/public/majorEventPublicDetail', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
//获取区、镇、村地区 | |||||
export function treeselectByUser(query) { | |||||
return request({ | |||||
url: '/system/dept/treeselectByUser', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
//获取账套列表 | |||||
export function listByDeptId(query) { | |||||
return request({ | |||||
url: '/finance/book/listByDeptId', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 切换部门 | |||||
export function changeDept(query) { | |||||
return request({ | |||||
url: '/system/user/changeDept', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 切换账套 | |||||
export function changeBook(query) { | |||||
return request({ | |||||
url: '/system/user/changeBook', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 财务公开新增 | |||||
export function openAdd(data) { | |||||
return request({ | |||||
url: '/open/open/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 财务公开修改 | |||||
export function openEdit(data) { | |||||
return request({ | |||||
url: '/open/open/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 零工公开新增 | |||||
export function tempWorkerOpenAdd(data) { | |||||
return request({ | |||||
url: '/subcontract/tempWorkerOpen/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 财务公开修改 | |||||
export function tempWorkerOpenEdit(data) { | |||||
return request({ | |||||
url: '/subcontract/tempWorkerOpen/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 重大事项新增 | |||||
export function majorEventOpenAdd(data) { | |||||
return request({ | |||||
url: '/subcontract/majorEventOpen/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 重大事项修改 | |||||
export function majorEventOpenEdit(data) { | |||||
return request({ | |||||
url: '/subcontract/majorEventOpen/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 财务公开删除 | |||||
export function openRemove(id) { | |||||
return request({ | |||||
url: '/open/open/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 零工公开删除 | |||||
export function tempWorkerOpenRemove(id) { | |||||
return request({ | |||||
url: '/subcontract/tempWorkerOpen/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 零工公开删除 | |||||
export function majorEventOpenRemove(id) { | |||||
return request({ | |||||
url: '/subcontract/majorEventOpen/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 查询零工登记列表 | |||||
export function listOddjob(query) { | |||||
return request({ | |||||
url: '/villageAffairs/public/oddjobList', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 新增零工登记 | |||||
export function addOddjob(data) { | |||||
return request({ | |||||
url: '/subcontract/oddjob/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改零工登记 | |||||
export function updateOddjob(data) { | |||||
return request({ | |||||
url: '/subcontract/oddjob/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 查询零工登记详细 | |||||
export function getOddjob(id) { | |||||
return request({ | |||||
url: '/subcontract/oddjob/get/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 删除零工登记 | |||||
export function delOddjob(id) { | |||||
return request({ | |||||
url: '/subcontract/oddjob/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 财务公开榜 | |||||
export function financialAmountPublicMonthList(query) { | |||||
return request({ | |||||
url: '/villageAffairs/public/financialAmountPublicMonthList', | |||||
method: 'get', | |||||
params: query // ?bookId=<账套ID 必填>&yearMonth=<查询年月 必填 yyyy-MM> | |||||
}) | |||||
} | |||||
// 查询用户个人信息 | |||||
export function getUserProfile() { | |||||
return request({ | |||||
url: '/system/user/profile/get', | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 修改用户个人信息 | |||||
export function updateUserProfile(data) { | |||||
return request({ | |||||
url: '/system/user/profile/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 用户密码重置 | |||||
export function updateUserPwd(oldPassword, newPassword) { | |||||
const data = { | |||||
oldPassword, | |||||
newPassword | |||||
} | |||||
return request({ | |||||
url: '/system/user/profile/updatePwd', | |||||
method: 'post', | |||||
params: data | |||||
}) | |||||
} | |||||
// 查询账套基本信息 | |||||
export function bookInfo(bookId) { | |||||
return request({ | |||||
url: `/villageAffairs/public/bookInfo/${bookId}`, | |||||
method: 'get', | |||||
}) | |||||
} | |||||
// 查询科目余额表 可分页 需授权 | |||||
export function trailBalanceList(query) { | |||||
return request({ | |||||
url: '/finance/balance/list', | |||||
method: 'get', | |||||
params: query // ?startDate=<开始年月 yyyy-MM>&startSubjectId=<起始科目ID>&endSubjectId=<结束科目ID 如果需要查询单个科目 则设置为和startSubjectId一样即可>&filterZero=<bool 是否过滤掉余额为0结果>&showSubSubject=<bool 是否显示下级科目>&分页参数... | |||||
}) | |||||
} | |||||
export function getLoginBook() { | |||||
return request({ | |||||
url: '/finance/book/getLoginBook', | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 查询投票主题列表 | |||||
export function listPoll(deptId , query) { | |||||
return request({ | |||||
url: `/villageAffairs/public/poll/list/${deptId}`, | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 姓名, 账套ID, 身份证, 返回里会有个id字段 | |||||
export function checkFarmer(data) { | |||||
return request({ | |||||
url: '/register/checkFarmer', | |||||
method: 'post', | |||||
data: data, | |||||
}) | |||||
} | |||||
// 查询投票主题详细 | |||||
export function getPoll(id) { | |||||
return request({ | |||||
url: `/villageAffairs/public/poll/detail/${id}`, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 投票 id为主题ID, option为投票选项ID, 多个用,分隔, userId为认证后的农户ID | |||||
export function votePoll(id, data) { | |||||
return request({ | |||||
url: `/villageAffairs/public/poll/vote/${id}`, | |||||
method: 'post', | |||||
params: data, | |||||
}) | |||||
} | |||||
// 新增投票主题 | |||||
export function addPoll(data) { | |||||
return request({ | |||||
url: '/poll/poll/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 修改投票主题 | |||||
export function updatePoll(data) { | |||||
return request({ | |||||
url: '/poll/poll/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除投票主题 | |||||
export function delPoll(id) { | |||||
return request({ | |||||
url: '/poll/poll/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 发布投票主题 | |||||
export function publicPoll(id) { | |||||
return request({ | |||||
url: '/poll/poll/publicPoll/'+ id, | |||||
method: 'get' | |||||
}) | |||||
} |
@@ -44,7 +44,7 @@ figcaption { | |||||
} | } | ||||
} | } | ||||
* { touch-action: pan-y; } | |||||
//* { touch-action: pan-y; } | |||||
body { | body { | ||||
color: #323233; | color: #323233; | ||||
} | } | ||||
@@ -128,4 +128,4 @@ body { | |||||
overflow: hidden; | overflow: hidden; | ||||
text-overflow: ellipsis; | text-overflow: ellipsis; | ||||
white-space: nowrap; | white-space: nowrap; | ||||
} | |||||
} |
@@ -1,3 +1,4 @@ | |||||
<!-- 日历表单组件 zhao --> | |||||
<template> | <template> | ||||
<!-- !!!注: 不支持逝去的日子, 以`FieldDatePicker`代替 !!! --> | <!-- !!!注: 不支持逝去的日子, 以`FieldDatePicker`代替 !!! --> | ||||
<div> | <div> | ||||
@@ -36,7 +37,8 @@ import { formatDate } from "element-ui/src/utils/date-util.js" | |||||
export default { | export default { | ||||
name: "FieldCalender", | name: "FieldCalender", | ||||
props: [ | props: [ | ||||
'name', 'readonly', 'value', 'label', 'placeholder', 'required', 'rules', 'formatter', 'labelWidth' | |||||
'name', 'readonly', 'value', 'label', 'placeholder', 'required', 'rules', 'labelWidth', | |||||
'formatter', // value的格式化 String|Function|undefined 字符串为格式字符串, 函数则必须有返回 undefined则不转换 | |||||
], | ], | ||||
watch: { | watch: { | ||||
value: function (newVal, oldVal) { | value: function (newVal, oldVal) { | ||||
@@ -0,0 +1,255 @@ | |||||
<!-- 级联树选择器表单组件 zhao --> | |||||
<template> | |||||
<div> | |||||
<van-field | |||||
:readonly="true" | |||||
:clickable="!readonly" | |||||
:name="name" | |||||
:value="visibleValue" | |||||
:label="label" | |||||
:placeholder="placeholder" | |||||
@click="openPopup" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
:rules="rules" | |||||
:required="required" | |||||
:label-width="labelWidth || 'auto'" | |||||
> | |||||
</van-field> | |||||
<van-popup v-model="popupVisible" position="bottom"> | |||||
<van-cascader | |||||
ref="picker" | |||||
:title="label" | |||||
v-model="internalValue" | |||||
:placeholder="placeholder || '请选择'" | |||||
:options="internalOptions" | |||||
:readonly="readonly" | |||||
:loading="loading" | |||||
:field-names="{ | |||||
text: textName || 'text', | |||||
value: valueName || 'value', | |||||
children: childrenName || 'children', | |||||
}" | |||||
@finish="onConfirm" | |||||
@close="onCancel" | |||||
@change="onChanged" | |||||
/> | |||||
</van-popup> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import request from "@/utils/request"; | |||||
export default { | |||||
name: "fieldCascader", | |||||
props: [ | |||||
'name', 'readonly', 'value', 'label', 'placeholder', 'required', 'rules', 'labelWidth', | |||||
'options', // 树结构数组/普通数组 | |||||
'textName', // 名称键名 String 默认text | |||||
'valueName', // 值键名 String 默认value | |||||
'remoteUrl', // 远程列表加载地址 String | |||||
'onRemoteResponse', // 远程获取到结果的处理回调 String|Function 如果是函数需返回数组, 如果是字符串支持.分割 | |||||
'childrenName', // 子级数组键名 String 默认children | |||||
'parentName', // 父的值键名 String 如果不为空 则自动转数组为树树结构数组 String | |||||
'showTextAndValue', // 是否显示值和键 Bool|String 字符串为分隔符, true为空字符串 | |||||
'showHasChildren', // 是否显示存在子级的标识 Bool|String 字符串为标识符, true为` >` | |||||
], | |||||
watch: { | |||||
value: function (newVal, oldVal) { | |||||
if(newVal != this.internalValue) | |||||
{ | |||||
this.internalValue = newVal; | |||||
this.syncIndex(); | |||||
} | |||||
}, | |||||
options: function (newVal, oldVal) { | |||||
this.internalOptions = this.makeTree(JSON.parse(JSON.stringify(newVal))); | |||||
this.handleTree(this.internalOptions); | |||||
this.syncIndex(); | |||||
}, | |||||
remoteUrl: function (newVal, oldVal) { | |||||
this.requestRemote(); | |||||
}, | |||||
onRemoteResponse: function (newVal, oldVal) { | |||||
this.parseRemote(); | |||||
} | |||||
}, | |||||
created() { | |||||
if(this.options && Array.isArray(this.options) && this.options.length > 0) | |||||
{ | |||||
this.internalOptions = this.makeTree(JSON.parse(JSON.stringify(this.options))); | |||||
this.handleTree(this.internalOptions); | |||||
this.syncIndex(); | |||||
} | |||||
else if(this.remoteUrl) | |||||
this.requestRemote(); | |||||
}, | |||||
data() { | |||||
return { | |||||
popupVisible: false, | |||||
internalValue: this.value, | |||||
visibleValue: '', | |||||
defaultIndex: 0, | |||||
internalOptions: [], | |||||
loading: false, | |||||
remoteResponse: null, | |||||
}; | |||||
}, | |||||
methods: { | |||||
openPopup() { | |||||
if(!this.readonly) | |||||
{ | |||||
this.popupVisible = true; | |||||
this.$nextTick(() => { | |||||
//this.$refs.picker.setIndexes([this.defaultIndex]); | |||||
}) | |||||
} | |||||
}, | |||||
closePopup() { | |||||
this.popupVisible = false; | |||||
}, | |||||
onChanged({ value, selectedOptions, tabIndex }) { | |||||
this.$emit('change', { value, selectedOptions, }); | |||||
}, | |||||
onConfirm({ value, selectedOptions, tabIndex }) { | |||||
this.syncValue(value, selectedOptions[selectedOptions.length - 1]); | |||||
this.$emit('input', this.internalValue); | |||||
this.$emit('confirm', this.internalValue); | |||||
this.closePopup(); | |||||
}, | |||||
onCancel() { | |||||
this.closePopup(); | |||||
this.$emit('cancel'); | |||||
}, | |||||
getValue(data) { | |||||
return typeof(data) === 'object' && this.valueName ? data[this.valueName] : data; | |||||
}, | |||||
getLabel(data) { | |||||
return typeof(data) === 'object' && this.textName ? data[this.textName] : data; | |||||
}, | |||||
syncValue(value, data) { | |||||
this.internalValue = value; | |||||
this.visibleValue = this.getLabel(data); | |||||
}, | |||||
requestRemote() { | |||||
if(!this.remoteUrl) | |||||
return; | |||||
this.loading = true; | |||||
this.internalOptions = []; | |||||
let promise = typeof(this.remoteUrl) === 'function' ? this.remoteUrl() : (this.remoteUrl instanceof Promise ? this.remoteUrl : request(this.remoteUrl)); | |||||
promise.then((resp) => { | |||||
this.remoteResponse = resp; | |||||
this.parseRemote(); | |||||
}).catch((e) => { | |||||
console.error(e); | |||||
}).finally(() => { | |||||
this.loading = false; | |||||
}) | |||||
}, | |||||
parseRemote() { | |||||
if(!this.remoteResponse) | |||||
return; | |||||
let type = typeof(this.onRemoteResponse); | |||||
if(type === 'function') | |||||
this.internalOptions = this.makeTree(this.onRemoteResponse(this.remoteResponse)); | |||||
else if(type === 'string') | |||||
{ | |||||
let arr = this.onRemoteResponse.split('.'); | |||||
let ptr = this.remoteResponse; | |||||
for(let i in arr) | |||||
{ | |||||
ptr = this.remoteResponse[arr[i]]; | |||||
} | |||||
this.internalOptions = this.makeTree(ptr); | |||||
} | |||||
else | |||||
this.internalOptions = this.makeTree(this.remoteResponse); | |||||
this.handleTree(this.internalOptions); | |||||
this.syncIndex(); | |||||
}, | |||||
makeTree(list) { | |||||
let parentName = this.parentName; | |||||
let valueName = this.valueName || 'value'; | |||||
let childrenName = this.childrenName || 'children'; | |||||
function isnull(p) { | |||||
return p === null || p === undefined || p === ''; | |||||
} | |||||
function makeTree_r(l, p) { | |||||
const isRoot = isnull(p); | |||||
let res = []; | |||||
for(let v of l) | |||||
{ | |||||
const parentValue = v[parentName]; | |||||
const value = v[valueName]; | |||||
if((isRoot && isnull(parentValue)) || (!isRoot && parentValue == p)) | |||||
{ | |||||
let arr = makeTree_r(l, value); | |||||
if(arr && arr.length > 0) | |||||
v[childrenName] = arr; | |||||
else | |||||
delete v[childrenName]; | |||||
res.push(v); | |||||
} | |||||
} | |||||
return res; | |||||
} | |||||
if(this.parentName) | |||||
return makeTree_r(list); | |||||
else | |||||
return list; | |||||
}, | |||||
handleTree(tree) { | |||||
if(!this.showTextAndValue && !this.showHasChildren) | |||||
return; | |||||
let split = this.showTextAndValue === false || this.showTextAndValue === undefined || this.showTextAndValue === null ? false : (typeof(this.showTextAndValue) === 'boolean' ? "" : this.showTextAndValue); | |||||
let hasChildren = this.showHasChildren === false || this.showHasChildren === undefined || this.showHasChildren === null ? false : (typeof(this.showHasChildren) === 'boolean' ? " >" : this.showHasChildren); | |||||
let textName = this.textName || 'text'; | |||||
let valueName = this.valueName || 'value'; | |||||
let childrenName = this.childrenName || 'children'; | |||||
function handleTree_r(l) { | |||||
for(let v of l) | |||||
{ | |||||
if(split !== false) | |||||
v[textName] = v[valueName] + split + v[textName]; | |||||
if(v[childrenName] && Array.isArray(v[childrenName]) && v[childrenName].length > 0) | |||||
{ | |||||
if(hasChildren !== false) | |||||
v[textName] = v[textName] + hasChildren; | |||||
handleTree_r(v[childrenName]); | |||||
} | |||||
} | |||||
} | |||||
handleTree_r(tree); | |||||
}, | |||||
findTree(tree, value) { | |||||
let valueName = this.valueName || 'value'; | |||||
let childrenName = this.childrenName || 'children'; | |||||
function findTree_r(l) { | |||||
for(let v of l) | |||||
{ | |||||
if(value == v[valueName]) | |||||
return v; | |||||
if(v[childrenName] && Array.isArray(v[childrenName]) && v[childrenName].length > 0) | |||||
{ | |||||
let res = findTree_r(v[childrenName]); | |||||
if(res !== undefined) | |||||
return res; | |||||
} | |||||
} | |||||
return; | |||||
} | |||||
return findTree_r(tree); | |||||
}, | |||||
syncIndex() { | |||||
let item = this.findTree(this.internalOptions, this.internalValue); | |||||
if(item) | |||||
this.visibleValue = item[this.textName || 'text']; | |||||
} | |||||
}, | |||||
} | |||||
</script> | |||||
<style scoped> | |||||
</style> |
@@ -1,3 +1,4 @@ | |||||
<!-- 状态单选框表单组件 zhao --> | |||||
<template> | <template> | ||||
<div> | <div> | ||||
<van-field | <van-field | ||||
@@ -27,7 +28,9 @@ export default { | |||||
name: "fieldCheckbox", | name: "fieldCheckbox", | ||||
props: [ | props: [ | ||||
'name', 'readonly', 'value', 'label', 'placeholder', 'required', 'rules', | 'name', 'readonly', 'value', 'label', 'placeholder', 'required', 'rules', | ||||
'trueLabel', 'falseLabel', 'labelWidth' | |||||
'labelWidth', | |||||
'trueLabel', // 选中的值 | |||||
'falseLabel', // 未选中的值 | |||||
], | ], | ||||
watch: { | watch: { | ||||
value: function (newVal, oldVal) { | value: function (newVal, oldVal) { | ||||
@@ -1,3 +1,4 @@ | |||||
<!-- 日期选择表单组件 zhao --> | |||||
<template> | <template> | ||||
<div> | <div> | ||||
<van-field | <van-field | ||||
@@ -40,8 +41,9 @@ import { formatDate } from "element-ui/src/utils/date-util.js" | |||||
export default { | export default { | ||||
name: "fieldDatePicker", | name: "fieldDatePicker", | ||||
props: [ | props: [ | ||||
'name', 'readonly', 'value', 'label', 'placeholder', 'required', 'rules', 'formatter', 'labelWidth', | |||||
'type', // datetime date time year-month month-day datehour | |||||
'name', 'readonly', 'value', 'label', 'placeholder', 'required', 'rules', 'labelWidth', | |||||
'type', // 类型, 仅支持 datetime date time year-month month-day datehour | |||||
'formatter', // value的格式化 String|Function|undefined 字符串为格式字符串, 函数则必须有返回 undefined则不转换 | |||||
], | ], | ||||
watch: { | watch: { | ||||
value: function (newVal, oldVal) { | value: function (newVal, oldVal) { | ||||
@@ -1,3 +1,4 @@ | |||||
<!-- 单选框组表单组件 zhao --> | |||||
<template> | <template> | ||||
<div> | <div> | ||||
<van-field | <van-field | ||||
@@ -24,8 +25,12 @@ import request from "@/utils/request"; | |||||
export default { | export default { | ||||
name: "fieldRadio", | name: "fieldRadio", | ||||
props: [ | props: [ | ||||
'name', 'readonly', 'value', 'label', 'placeholder', 'required', 'rules', 'columns', | |||||
'valueKey', 'dataKey', 'remoteUrl', 'onRemoteResponse', 'labelWidth' | |||||
'name', 'readonly', 'value', 'label', 'placeholder', 'required', 'rules', 'labelWidth', | |||||
'columns', // 列表数据 Array | |||||
'valueKey', // 名称键名 String | |||||
'dataKey', // 值键名 String | |||||
'remoteUrl', // 远程列表加载地址 String | |||||
'onRemoteResponse', // 远程获取到结果的处理回调 String|Function 如果是函数需返回数组, 如果是字符串支持.分割 | |||||
], | ], | ||||
watch: { | watch: { | ||||
value: function (newVal, oldVal) { | value: function (newVal, oldVal) { | ||||
@@ -1,3 +1,4 @@ | |||||
<!-- 下拉列表表单组件 zhao --> | |||||
<template> | <template> | ||||
<div> | <div> | ||||
<van-field | <van-field | ||||
@@ -38,8 +39,12 @@ import request from "@/utils/request"; | |||||
export default { | export default { | ||||
name: "fieldSelect", | name: "fieldSelect", | ||||
props: [ | props: [ | ||||
'name', 'readonly', 'value', 'label', 'placeholder', 'required', 'rules', 'columns', | |||||
'valueKey', 'dataKey', 'remoteUrl', 'onRemoteResponse', 'labelWidth' | |||||
'name', 'readonly', 'value', 'label', 'placeholder', 'required', 'rules', 'labelWidth', | |||||
'columns', // 列表数据 Array | |||||
'valueKey', // 名称键名 String | |||||
'dataKey', // 值键名 String | |||||
'remoteUrl', // 远程列表加载地址 String | |||||
'onRemoteResponse', // 远程获取到结果的处理回调 String|Function 如果是函数需返回数组, 如果是字符串支持.分割 | |||||
], | ], | ||||
watch: { | watch: { | ||||
value: function (newVal, oldVal) { | value: function (newVal, oldVal) { | ||||
@@ -0,0 +1,188 @@ | |||||
<!-- 会计科目选择弹出层组件 zhao --> | |||||
<template> | |||||
<van-popup v-model="popupVisible" position="bottom" :style="{'height': height || 'unset',}"> | |||||
<van-search | |||||
v-model="searchValue" | |||||
placeholder="按科目编码/名称筛选" | |||||
@input="onSearch" | |||||
/> | |||||
<van-tabs v-model="active" @change="onTabChanged"> | |||||
<van-tab :title="item.subjectName" :name="item.subjectId" v-for="(item, index) in subjects" :key="index"> | |||||
<SubjectTreeChooserNodeItem :ref="'tree' + index" :subjects="item.children" @clicked="onItemClicked" :can-select-non-leaf="canSelectNonLeaf"></SubjectTreeChooserNodeItem> | |||||
</van-tab> | |||||
</van-tabs> | |||||
</van-popup> | |||||
</template> | |||||
<script> | |||||
import request from "@/utils/request"; | |||||
import SubjectTreeChooserNodeItem from "./SubjectTreeChooserNodeItem"; | |||||
export default { | |||||
name: "SubjectTreeChooser", | |||||
components: {SubjectTreeChooserNodeItem}, | |||||
props: [ | |||||
'value', 'visible', 'height', 'canSelectNonLeaf', | |||||
], | |||||
watch: { | |||||
value: function (newVal, oldVal) { | |||||
if(newVal != this.internalValue) | |||||
{ | |||||
this.internalValue = newVal; | |||||
this.syncIndex(); | |||||
} | |||||
}, | |||||
visible: function(newVal, oldVal) { | |||||
if(this.popupVisible !== newVal) | |||||
{ | |||||
this.popupVisible = newVal; | |||||
if(newVal) | |||||
this.syncIndex(); | |||||
} | |||||
}, | |||||
popupVisible: function(newVal, oldVal) { | |||||
if(newVal !== this.visible) | |||||
this.$emit('update:visible', newVal); | |||||
}, | |||||
}, | |||||
created() { | |||||
this.getSubjects(); | |||||
}, | |||||
data() { | |||||
return { | |||||
popupVisible: false, | |||||
internalValue: this.value, | |||||
searchValue: '', | |||||
active: '1', | |||||
subjects: [], | |||||
}; | |||||
}, | |||||
methods: { | |||||
getSubjects() { | |||||
this.subjects = []; | |||||
let map = {}; | |||||
this.getDicts('subject_type').then((resp) => { | |||||
this.subjects = resp.data.map((x) => { | |||||
let item = { | |||||
subjectId: x.dictValue, | |||||
subjectName: x.dictLabel, | |||||
subjectNameAll: x.dictLabel, | |||||
subjectType: x.dictValue, | |||||
subjectLevel: 0, | |||||
children: [], | |||||
visible: true, | |||||
}; | |||||
map[x.dictValue] = item; | |||||
return item; | |||||
}); | |||||
let url = '/finance/subject/listAll'; // '/villageAffairs/public/subjects/153' | |||||
request(url).then((resp) => { | |||||
let list = this.makeTree(resp.rows || resp.data); | |||||
for(let v of list) | |||||
{ | |||||
if(v.subjectId.length === 3) | |||||
{ | |||||
map[v.subjectType].children.push(v); | |||||
} | |||||
} | |||||
}) | |||||
}); | |||||
}, | |||||
onItemClicked(subject) { | |||||
if(this.canSelectNonLeaf || subject.is_last === 'Y') | |||||
{ | |||||
this.internalValue = subject.subjectId | |||||
this.$emit('input', subject.subjectId); | |||||
this.$emit('select', subject); | |||||
this.close(); | |||||
} | |||||
}, | |||||
onItemToggle({subject, on}) { | |||||
}, | |||||
onCancel() { | |||||
this.close(); | |||||
}, | |||||
makeTree(list) { | |||||
function isnull(p) { | |||||
return p === null || p === undefined || p === ''; | |||||
} | |||||
function makeTree_r(l, p) { | |||||
const isRoot = isnull(p); | |||||
let res = []; | |||||
for(let v of l) | |||||
{ | |||||
if((isRoot && isnull(v.parentId)) || (!isRoot && v.parentId == p)) | |||||
{ | |||||
let arr = makeTree_r(l, v.subjectId); | |||||
if(arr.length > 0) | |||||
v.children = arr; | |||||
else | |||||
delete v.children; | |||||
res.push(v); | |||||
} | |||||
} | |||||
return res; | |||||
} | |||||
return makeTree_r(list.map((x) => { | |||||
x.visible = true; | |||||
return x; | |||||
})); | |||||
}, | |||||
onSearch(value) { | |||||
function handleTree_r(l, func) { | |||||
let res = 0; | |||||
for(let v of l) | |||||
{ | |||||
let r = func(v) ? 1 : 0; | |||||
if(v.children && Array.isArray(v.children) && v.children.length > 0) | |||||
{ | |||||
r += handleTree_r(v.children, func); | |||||
} | |||||
v.visible = r > 0; | |||||
res += r; | |||||
} | |||||
return res; | |||||
} | |||||
for(let v of this.subjects) | |||||
{ | |||||
if(v.subjectId === this.active && value) | |||||
{ | |||||
handleTree_r(v.children, (x) => x.subjectId.startsWith(value) || x.subjectName.indexOf(value) !== -1); | |||||
} | |||||
else | |||||
{ | |||||
handleTree_r(v.children, (x) => true); | |||||
} | |||||
} | |||||
}, | |||||
onTabChanged() { | |||||
this.searchValue = ''; | |||||
this.onSearch(); | |||||
}, | |||||
folderAll() { // TODO: not work | |||||
for(let i in this.subjects) | |||||
{ | |||||
if(this.$refs['tree' + i]) | |||||
this.$refs['tree' + i][0].folderAll(); | |||||
} | |||||
}, | |||||
close() { | |||||
this.popupVisible = false; | |||||
this.folderAll(); | |||||
this.searchValue = ''; | |||||
this.active = '1'; | |||||
this.$emit('cancel'); | |||||
}, | |||||
syncIndex() { | |||||
if(this.subjects.length === 0 || !this.internalValue) | |||||
return; | |||||
this.active = this.internalValue[0]; | |||||
}, | |||||
}, | |||||
} | |||||
</script> | |||||
<style scoped> | |||||
</style> |
@@ -0,0 +1,68 @@ | |||||
<!-- 会计科目选择节点组件 zhao --> | |||||
<template> | |||||
<van-collapse v-model="active"> | |||||
<template v-for="(subject, index) in subjects"> | |||||
<van-collapse-item :ref="'collapse' + index" :lazy-render="false" :title="subject.subjectId + ' ' + subject.subjectName" :name="subject.subjectId" :is-link="subject.is_last !== 'Y'" :class="subject.is_last === 'Y' ? 'subject-tree-node-leaf' : 'subject-tree-node-non-leaf'" v-if="subject.visible"> | |||||
<template #title> | |||||
<div @click="($event) => onItemClicked($event, subject)">{{ subject.subjectId }} {{ subject.subjectName }}</div> | |||||
</template> | |||||
<SubjectTreeChooserNodeItem :ref="'childCollapse' + index" :subjects="subject.children" v-if="subject.children && Array.isArray(subject.children) && subject.children.length > 0" @clicked="onChildItemClicked" :can-select-non-leaf="canSelectNonLeaf"> | |||||
</SubjectTreeChooserNodeItem> | |||||
</van-collapse-item> | |||||
</template> | |||||
</van-collapse> | |||||
</template> | |||||
<script> | |||||
export default { | |||||
name: "SubjectTreeChooserNodeItem", | |||||
props: [ | |||||
'subjects', 'canSelectNonLeaf', | |||||
], | |||||
watch: { | |||||
}, | |||||
created() { | |||||
}, | |||||
data() { | |||||
return { | |||||
active: [], | |||||
}; | |||||
}, | |||||
methods: { | |||||
onItemClicked($event, subject) { | |||||
if(this.canSelectNonLeaf || subject.is_last === 'Y') | |||||
{ | |||||
this.$emit('clicked', subject); | |||||
//$event.preventDefault(); | |||||
$event.stopPropagation(); | |||||
} | |||||
}, | |||||
onChildItemClicked(subject) { | |||||
this.$emit('clicked', subject); | |||||
}, | |||||
folderAll() { // TODO: not work | |||||
for(let i in this.subjects) | |||||
{ | |||||
if(this.$refs['childCollapse' + i]) | |||||
this.$refs['childCollapse' + i][0].folderAll(); | |||||
if(this.$refs['collapse' + i]) | |||||
this.$refs['collapse' + i][0].toggle(false); | |||||
} | |||||
}, | |||||
}, | |||||
} | |||||
</script> | |||||
<style> | |||||
.subject-tree-node-non-leaf .van-collapse-item__content { | |||||
padding-right: 0; | |||||
padding-top: 0; | |||||
padding-bottom: 0; | |||||
} | |||||
.subject-tree-node-leaf .van-collapse-item__content { | |||||
padding-right: 0; | |||||
padding-top: 0; | |||||
padding-bottom: 0; | |||||
} | |||||
</style> |
@@ -14,12 +14,14 @@ import SearchTree from 'vue-search-tree' | |||||
import VueHtml5Editor from 'vue-html5-editor' | import VueHtml5Editor from 'vue-html5-editor' | ||||
import "font-awesome/css/font-awesome.css" | import "font-awesome/css/font-awesome.css" | ||||
import VueCookies from 'vue-cookies' | import VueCookies from 'vue-cookies' | ||||
//引用百度地图 | |||||
import BaiduMap from 'vue-baidu-map' | |||||
Vue.use(VueCookies); | Vue.use(VueCookies); | ||||
import global from '@/utils/global'; | import global from '@/utils/global'; | ||||
import { getDicts ,getConfigKey } from "@/utils/data"; | import { getDicts ,getConfigKey } from "@/utils/data"; | ||||
import { houseGetDicts } from '@/utils/data'; | import { houseGetDicts } from '@/utils/data'; | ||||
import { selectDictLabel , selectDictScheme , onClickLeft , getNowFormatDate , format } from "@/utils/utils"; | |||||
import { selectDictLabel , selectDictScheme , onClickLeft , getNowFormatDate , format , isBankCard } from "@/utils/utils"; | |||||
import vueEsign from 'vue-esign' | import vueEsign from 'vue-esign' | ||||
Vue.use(vueEsign) | Vue.use(vueEsign) | ||||
@@ -33,12 +35,17 @@ Vue.prototype.onClickLeft = onClickLeft | |||||
Vue.prototype.getNowFormatDate = getNowFormatDate | Vue.prototype.getNowFormatDate = getNowFormatDate | ||||
Vue.prototype.format = format | Vue.prototype.format = format | ||||
Vue.prototype.global = global | Vue.prototype.global = global | ||||
Vue.prototype.isBankCard = isBankCard | |||||
// Vant 引用 | // Vant 引用 | ||||
import Vant from 'vant'; | import Vant from 'vant'; | ||||
import 'vant/lib/index.css'; | import 'vant/lib/index.css'; | ||||
Vue.use(Vant) | Vue.use(Vant) | ||||
Vue.use(SearchTree) | Vue.use(SearchTree) | ||||
Vue.use(BaiduMap, { | |||||
/* Visit http://lbsyun.baidu.com/apiconsole/key for details about app key. */ | |||||
ak: 'XzwOBaO4CElCsPdl8LIFEvv5rTemG6w1' | |||||
}) | |||||
Vue.use(VueHtml5Editor,{ | Vue.use(VueHtml5Editor,{ | ||||
// 全局组件名称,使用new VueHtml5Editor(options)时该选项无效 | // 全局组件名称,使用new VueHtml5Editor(options)时该选项无效 | ||||
// global component name | // global component name | ||||