diff --git a/public/iconfont/ali/demo.css b/public/iconfont/ali/demo.css
index eb28a7e..8cb8809 100644
--- a/public/iconfont/ali/demo.css
+++ b/public/iconfont/ali/demo.css
@@ -50,7 +50,7 @@
#tabs .active {
- border-bottom-color: #FF0000;
+ border-bottom-color: #f00;
color: #222;
}
@@ -88,7 +88,7 @@
.helps pre {
padding: 20px;
margin: 10px 0;
- border: solid 1px #E7E1CD;
+ border: solid 1px #e7e1cd;
background-color: #fffdef;
overflow: auto;
}
@@ -218,7 +218,7 @@
.markdown > p,
.markdown > blockquote,
.markdown > .highlight,
-.markdown > ol,
+.markdown >ol,
.markdown>ul {
width: 80%;
}
@@ -288,7 +288,7 @@
.markdown blockquote {
font-size: 90%;
- color: #999999;
+ color: #999;
border-left: 4px solid #e9e9e9;
padding-left: 0.8em;
margin: 1em 0;
@@ -318,7 +318,7 @@
display: inline-block;
}
-.markdown > br,
+.markdown >br,
.markdown>p>br {
clear: both;
}
@@ -378,12 +378,12 @@
}
.hljs-addition {
- color: #55A532;
+ color: #55a532;
background-color: #eaffea;
}
.hljs-deletion {
- color: #BD2C00;
+ color: #bd2c00;
background-color: #ffecec;
}
diff --git a/public/iconfont/ali/demo_index.html b/public/iconfont/ali/demo_index.html
index 3dcefa3..c2cbd89 100644
--- a/public/iconfont/ali/demo_index.html
+++ b/public/iconfont/ali/demo_index.html
@@ -55,15 +55,15 @@
-
-
-
menu
- 
+
+ igw-f-contact
+ 
-
-
-
menu_3rolepermiss
- 
+
+ menu
+ 
-
@@ -156,9 +156,9 @@
@font-face {
font-family: 'iconfont';
- src: url('iconfont.woff2?t=1753872505940') format('woff2'),
- url('iconfont.woff?t=1753872505940') format('woff'),
- url('iconfont.ttf?t=1753872505940') format('truetype');
+ src: url('iconfont.woff2?t=1753923827999') format('woff2'),
+ url('iconfont.woff?t=1753923827999') format('woff'),
+ url('iconfont.ttf?t=1753923827999') format('truetype');
}
第二步:定义使用 iconfont 的样式
@@ -184,6 +184,15 @@
+ -
+
+
+ igw-f-contact
+
+ .icon-igw-f-role
+
+
+
-
@@ -193,15 +202,6 @@
- -
-
-
- menu_3rolepermiss
-
- .icon-menu_rolepermiss
-
-
-
-
@@ -339,18 +339,18 @@
-
-
menu
- #icon-menu
+ igw-f-contact
+ #icon-igw-f-role
-
-
menu_3rolepermiss
- #icon-menu_rolepermiss
+ menu
+ #icon-menu
-
diff --git a/public/iconfont/ali/iconfont.css b/public/iconfont/ali/iconfont.css
index 34c465d..182a18d 100644
--- a/public/iconfont/ali/iconfont.css
+++ b/public/iconfont/ali/iconfont.css
@@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 4985351 */
- src: url('iconfont.woff2?t=1753872505940') format('woff2'),
- url('iconfont.woff?t=1753872505940') format('woff'),
- url('iconfont.ttf?t=1753872505940') format('truetype');
+ src: url('iconfont.woff2?t=1753923827999') format('woff2'),
+ url('iconfont.woff?t=1753923827999') format('woff'),
+ url('iconfont.ttf?t=1753923827999') format('truetype');
}
.iconfont {
@@ -13,12 +13,12 @@
-moz-osx-font-smoothing: grayscale;
}
-.icon-menu:before {
- content: "\e667";
+.icon-igw-f-role:before {
+ content: "\e61f";
}
-.icon-menu_rolepermiss:before {
- content: "\e689";
+.icon-menu:before {
+ content: "\e667";
}
.icon-cog:before {
diff --git a/public/iconfont/ali/iconfont.js b/public/iconfont/ali/iconfont.js
index dceebb9..cfc88c0 100644
--- a/public/iconfont/ali/iconfont.js
+++ b/public/iconfont/ali/iconfont.js
@@ -1 +1 @@
-window._iconfont_svg_string_4985351='',(c=>{var t=(l=(l=document.getElementsByTagName("script"))[l.length-1]).getAttribute("data-injectcss"),l=l.getAttribute("data-disable-injectsvg");if(!l){var e,i,o,a,n,h=function(t,l){l.parentNode.insertBefore(t,l)};if(t&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(t){console&&console.log(t)}}e=function(){var t,l=document.createElement("div");l.innerHTML=c._iconfont_svg_string_4985351,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(t=document.body).firstChild?h(l,t.firstChild):t.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(e,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),e()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(o=e,a=c.document,n=!1,d(),a.onreadystatechange=function(){"complete"==a.readyState&&(a.onreadystatechange=null,s())})}function s(){n||(n=!0,o())}function d(){try{a.documentElement.doScroll("left")}catch(t){return void setTimeout(d,50)}s()}})(window);
\ No newline at end of file
+window._iconfont_svg_string_4985351='',(c=>{var t=(l=(l=document.getElementsByTagName("script"))[l.length-1]).getAttribute("data-injectcss"),l=l.getAttribute("data-disable-injectsvg");if(!l){var e,i,o,a,n,h=function(t,l){l.parentNode.insertBefore(t,l)};if(t&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(t){console&&console.log(t)}}e=function(){var t,l=document.createElement("div");l.innerHTML=c._iconfont_svg_string_4985351,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(t=document.body).firstChild?h(l,t.firstChild):t.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(e,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),e()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(o=e,a=c.document,n=!1,s(),a.onreadystatechange=function(){"complete"==a.readyState&&(a.onreadystatechange=null,d())})}function d(){n||(n=!0,o())}function s(){try{a.documentElement.doScroll("left")}catch(t){return void setTimeout(s,50)}d()}})(window);
\ No newline at end of file
diff --git a/public/iconfont/ali/iconfont.json b/public/iconfont/ali/iconfont.json
index 1b974be..af940f3 100644
--- a/public/iconfont/ali/iconfont.json
+++ b/public/iconfont/ali/iconfont.json
@@ -5,6 +5,13 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
+ {
+ "icon_id": "24493756",
+ "name": "igw-f-contact",
+ "font_class": "igw-f-role",
+ "unicode": "e61f",
+ "unicode_decimal": 58911
+ },
{
"icon_id": "1174312",
"name": "menu",
@@ -12,13 +19,6 @@
"unicode": "e667",
"unicode_decimal": 58983
},
- {
- "icon_id": "12891317",
- "name": "menu_3rolepermiss",
- "font_class": "menu_rolepermiss",
- "unicode": "e689",
- "unicode_decimal": 59017
- },
{
"icon_id": "1261484",
"name": "cog",
diff --git a/public/iconfont/ali/iconfont.ttf b/public/iconfont/ali/iconfont.ttf
index 7d36220..215e641 100644
Binary files a/public/iconfont/ali/iconfont.ttf and b/public/iconfont/ali/iconfont.ttf differ
diff --git a/public/iconfont/ali/iconfont.woff b/public/iconfont/ali/iconfont.woff
index 966d4fa..ff9da83 100644
Binary files a/public/iconfont/ali/iconfont.woff and b/public/iconfont/ali/iconfont.woff differ
diff --git a/public/iconfont/ali/iconfont.woff2 b/public/iconfont/ali/iconfont.woff2
index ee0a1cf..0eac198 100644
Binary files a/public/iconfont/ali/iconfont.woff2 and b/public/iconfont/ali/iconfont.woff2 differ
diff --git a/src/assets/styles/css/index.css b/src/assets/styles/css/index.css
index d7ca65e..ba3575d 100644
--- a/src/assets/styles/css/index.css
+++ b/src/assets/styles/css/index.css
@@ -10,3 +10,9 @@ html {
#app {
padding: 5px;
}
+
+
+.ix-modal-wrapper,
+.ix-mask {
+ position: absolute;
+}
diff --git a/src/common/router/index.ts b/src/common/router/index.ts
index e1a3354..f759f0b 100644
--- a/src/common/router/index.ts
+++ b/src/common/router/index.ts
@@ -19,7 +19,7 @@ import { reloadUserInfo } from '@/common/app'
enum SpecialPage {
Main = 'main',
Login = 'login',
- Home = 'home',
+ Home = 'tsp',
NotFund = 'notFund'
}
diff --git a/src/common/utils/http-util.ts b/src/common/utils/http-util.ts
index deb2cca..b2164dd 100644
--- a/src/common/utils/http-util.ts
+++ b/src/common/utils/http-util.ts
@@ -55,7 +55,7 @@ function errHandler({code, msg, message}: R) {
console.log(msg, message)
break
default:
- Toast.error(message)
+ Toast.error(message ?? '操作失败')
}
}
@@ -94,6 +94,9 @@ httpUtil.interceptors.response.use(
response => {
// console.log('HTTP 请求结果', response.config.url, response)
// vite 代理失败时 响应码为 200 响应内容为空
+ if (response.config.responseType !== 'json') {
+ return Promise.resolve(response)
+ }
if (response.data == null) {
response.data = {code: 99999, msg: '无响应内容', message: '无响应内容', data: null, headers: response.headers}
}
@@ -204,6 +207,62 @@ export function postMltForm(url: string, body: any, config?: AxiosConfig, dis
})
}
+function getFileName(contentDisposition: string) {
+ // 检查content-disposition是否存在
+ if (!contentDisposition) {
+ return null
+ }
+
+ // 查找filename=部分
+ const match = contentDisposition.match(/filename=(.+)/)
+ if (!match || match.length < 2) {
+ return null
+ }
+
+ // 提取并解码文件名
+ const fileNameEncoded = match[1].trim()
+ // 移除可能存在的引号
+ const fileNameWithoutQuotes = fileNameEncoded.replace(/["']/g, '')
+ // 解码URL编码的字符串
+ return decodeURIComponent(fileNameWithoutQuotes)
+}
+
+export function download(url: string, params?: any, disposeErr: boolean = true) {
+ return httpUtil.get(url, {params, paramsSerializer, responseType: 'arraybuffer'})
+ .then(res => {
+ let data = res.data
+ if (!data || data.byteLength <= 0) {
+ // 错误提示
+ return
+ }
+ const contentDisposition = res.headers['Content-Disposition'] ?? res.headers['content-disposition']
+ const fileName = getFileName(contentDisposition) ?? '下载的文件'
+ // 将二进制流转为blob
+ const blob = new Blob([ data ])
+ // 创建新的URL并指向File对象或者Blob对象的地址
+ const blobURL = window.URL.createObjectURL(blob)
+ // 创建a标签,用于跳转至下载链接
+ const tempLink = document.createElement('a')
+ tempLink.style.display = 'none'
+ tempLink.href = blobURL
+ tempLink.setAttribute('download', decodeURI(fileName))
+ // 兼容:某些浏览器不支持HTML5的download属性
+ if (typeof tempLink.download === 'undefined') {
+ tempLink.setAttribute('target', '_blank')
+ }
+ // 挂载a标签
+ document.body.appendChild(tempLink)
+ tempLink.click()
+ document.body.removeChild(tempLink)
+ // 释放blob URL地址
+ window.URL.revokeObjectURL(blobURL)
+ })
+ .catch(res => {
+ if (disposeErr) errHandler(res.response.data)
+ return Promise.reject(res.response.data)
+ })
+}
+
export default {
get,
post,
diff --git a/src/common/utils/times.ts b/src/common/utils/times.ts
index ad21e85..c34b115 100644
--- a/src/common/utils/times.ts
+++ b/src/common/utils/times.ts
@@ -13,6 +13,7 @@ import { DateObjectUnits } from 'luxon/src/datetime'
*/
export enum FMT {
+ month = 'yyyy-MM',
date = 'yyyy-MM-dd',
time = 'HH:mm',
time_sec = 'HH:mm:ss',
diff --git a/src/components/iconfont/iconfont.d.ts b/src/components/iconfont/iconfont.d.ts
index ab9a195..35ba79e 100644
--- a/src/components/iconfont/iconfont.d.ts
+++ b/src/components/iconfont/iconfont.d.ts
@@ -2,8 +2,8 @@ export {}
declare global {
namespace IconfontTypes {
- type name = 'menu'
- | 'menu_rolepermiss'
+ type name = 'igw-f-role'
+ | 'menu'
| 'cog'
| 'user'
| 'bar-chart'
diff --git a/src/pages/dispose-recode/DisposeRecode.vue b/src/pages/dispose-recode/DisposeRecode.vue
index 894a38d..38f986c 100644
--- a/src/pages/dispose-recode/DisposeRecode.vue
+++ b/src/pages/dispose-recode/DisposeRecode.vue
@@ -4,7 +4,12 @@ import { useFormGroup } from '@idux/cdk'
import { TableColumn } from '@idux/components/table'
import { TablePagination } from '@idux/components/table/src/types'
import Charts from '@/components/echarts/Charts.vue'
+import DisposeRecodeDetail from '@/pages/dispose-recode/DisposeRecodeDetail.vue'
+import DisposeRecodeApi from '@/pages/dispose-recode/dispose-recode-api.ts'
+import Times from '@/common/utils/times.ts'
+const disposeRecodeDetail = ref | null>(null)
+const disposeRecode = ref(undefined)
const chartOption = reactive({
aria: {
enabled: true,
@@ -20,7 +25,7 @@ const chartOption = reactive({
},
legend: {
show: true,
- top: 0
+ top: 0,
},
grid: {
outerBounds: {
@@ -33,7 +38,7 @@ const chartOption = reactive({
xAxis: [
{
type: 'category',
- data: [ 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun' ],
+ data: [],
axisTick: {
alignWithLabel: true
}
@@ -47,67 +52,58 @@ const chartOption = reactive({
type: 'value'
}
],
- series: [
- {
- name: 'Direct1',
- type: 'bar',
- data: [ 10, 52, 200, 334, 390, 330, 220 ],
- },
- {
- name: 'Direct2',
- type: 'bar',
- data: [ 10, 52, 200, 334, 390, 330, 220 ]
- }
- ]
+ series: []
})
-interface Data {
- id: string
- pointName: string
- street: string
- microdistrict: string
- propertyManagement: string
- statusTxt: string
- status: 'ZhengChang' | 'FenZhengChang'
-}
+const formGroup = useFormGroup({
+ keywords: [ '' ],
+})
-const formGroup = useFormGroup({})
-
-const fullData: Data[] = []
-for (let index = 0; index < 10; index++) {
- fullData.push({
- id: index + '',
- pointName: `Edrward ${index}`,
- street: `Edrward ${index}`,
- microdistrict: `Edrward ${index}`,
- propertyManagement: `Edrward ${index}`,
- statusTxt: `Edrward ${index}`,
- status: index % 2 === 0 ? 'ZhengChang' : 'FenZhengChang',
- })
-}
-const data = ref(fullData)
+const datasource = ref()
const columns: TableColumn[] = [
{
- title: '名称',
- dataKey: 'pointName',
- customCell: 'pointName'
+ title: '来源地',
+ dataKey: 'origin',
},
{
- title: '所属街道',
- dataKey: 'street',
+ title: '清运公司',
+ dataKey: 'clearingCompany',
},
{
- title: '所属小区',
- dataKey: 'microdistrict',
+ title: '消纳场名称',
+ dataKey: 'disposalSite',
},
{
- title: '所属物业',
- dataKey: 'propertyManagement'
+ title: '车牌号',
+ dataKey: 'licensePlate',
},
{
- title: '运营状态',
- dataKey: 'statusTxt',
- customCell: 'status',
+ title: '联系人',
+ dataKey: 'contact',
+ },
+ {
+ title: '联系电话',
+ dataKey: 'contactPhone',
+ },
+ {
+ title: '进场磅重(吨)',
+ dataKey: 'inWeight',
+ },
+ {
+ title: '出场磅重(吨)',
+ dataKey: 'outWeight',
+ },
+ {
+ title: '净重(吨)',
+ dataKey: 'suttleWeight',
+ },
+ {
+ title: '进场时间',
+ dataKey: 'inTime',
+ },
+ {
+ title: '出场时间',
+ dataKey: 'outTime',
},
{
title: '操作',
@@ -128,17 +124,65 @@ const pagination = reactive({
pagination.pageSize = pageSize
}
})
+
+const tableSpin = ref(false)
+
+function searchHandler() {
+ console.log('------', formGroup.getValue())
+ tableSpin.value = true
+ DisposeRecodeApi.paging({
+ ...formGroup.getValue(),
+ current: pagination.pageIndex ?? 1,
+ size: pagination.pageSize ?? 10,
+ })
+ .then(res => {
+ pagination.pageIndex = res.data.current
+ pagination.pageSize = res.data.size
+ pagination.total = res.data.total
+ datasource.value = res.data.records
+ })
+ .finally(() => {
+ tableSpin.value = false
+ })
+}
+
+function exportHandler() {
+ DisposeRecodeApi.exportData([ '2025-01-01', '2025-01-31' ])
+}
+
+const monthValue = ref(new Date())
+
+function renderChart() {
+ DisposeRecodeApi.statistics(Times.format(monthValue.value, Times.FMT.month))
+ .then(res => {
+ chartOption.xAxis[0].data = res.data.xAxis
+ let series = []
+ for (let seriesKey in res.data.series) {
+ series.push({
+ name: seriesKey,
+ type: 'bar',
+ data: res.data.series[seriesKey],
+ })
+ }
+ chartOption.series = series
+ })
+}
+
+onMounted(() => {
+ searchHandler()
+ renderChart()
+})
-
+
垃圾处置记录
管理和分析垃圾处置数据
@@ -147,31 +191,26 @@ const pagination = reactive({
-
-
-
- {{ record.pointName }}
-
-
- 查看
-
-
- {{ record.statusTxt }}
- {{ record.statusTxt }}
+
+
+ 查看
+
@@ -179,7 +218,7 @@ const pagination = reactive
({
.dispose-recode {
display: flex;
flex-direction: column;
- height: 100%;
+ height: 150%;
width: 100%;
.title {
@@ -256,8 +295,12 @@ const pagination = reactive({
.search-form {
flex 6
- :deep(.ix-form-item) {
- flex 2
+ :deep(.ix-form-item):nth-child(1) {
+ flex 7
+ }
+
+ :deep(.ix-form-item):nth-child(2) {
+ flex 1
}
}
diff --git a/src/pages/dispose-recode/DisposeRecodeDetail.vue b/src/pages/dispose-recode/DisposeRecodeDetail.vue
new file mode 100644
index 0000000..98579fd
--- /dev/null
+++ b/src/pages/dispose-recode/DisposeRecodeDetail.vue
@@ -0,0 +1,95 @@
+
+
+
+
+ 来源地:{{ data.origin }}
+ 清运公司:{{ data.clearingCompany }}
+ 车牌号:{{ data.licensePlate }}
+ 联系人:{{ data.contact }}
+ 联系电话:{{ data.contactPhone }}
+ 进场磅重(吨):{{ data.inWeight }}
+ 出场磅重(吨):{{ data.outWeight }}
+ 净重(吨):{{ data.suttleWeight }}
+ 进场时间:{{ data.inTime }}
+ 出场时间:{{ data.outTime }}
+ 消纳场名称:{{ data.disposalSite }}
+
+ 确定
+
+
+
+
+
diff --git a/src/pages/dispose-recode/dispose-recode-api.ts b/src/pages/dispose-recode/dispose-recode-api.ts
new file mode 100644
index 0000000..714caef
--- /dev/null
+++ b/src/pages/dispose-recode/dispose-recode-api.ts
@@ -0,0 +1,32 @@
+import {
+ download,
+ get,
+ post
+} from '@/common/utils/http-util.ts'
+
+export default {
+ paging(data: DisposeRecodeTypes.SearchParam & G.PageParam) {
+ return get>('/dispose_record/paging', data)
+ },
+ list(pid: string | null = null) {
+ return get('/dispose_record/list', {pid: pid})
+ },
+ detail(id: string) {
+ return get('/dispose_record/detail', {id})
+ },
+ add(data: DisposeRecodeTypes.DisposeRecodeData) {
+ return post('/dispose_record/add', data)
+ },
+ modify(data: DisposeRecodeTypes.DisposeRecodeData) {
+ return post('/dispose_record/modify', data)
+ },
+ del(ids: string[]) {
+ return post('/dispose_record/del', ids)
+ },
+ exportData(date: string[]) {
+ return download('/dispose_record/export', {date})
+ },
+ statistics(date: string) {
+ return get('/dispose_record/statistics', {date})
+ },
+}
diff --git a/src/pages/dispose-recode/dispose-recode.d.ts b/src/pages/dispose-recode/dispose-recode.d.ts
new file mode 100644
index 0000000..af6dc5f
--- /dev/null
+++ b/src/pages/dispose-recode/dispose-recode.d.ts
@@ -0,0 +1,30 @@
+export {}
+declare global {
+ namespace DisposeRecodeTypes {
+ interface DisposeRecodeData {
+ id: string
+ origin: string
+ clearingCompany: string
+ licensePlate: string
+ contact: string
+ contactPhone: string
+ inWeight: string
+ outWeight: string
+ suttleWeight: string
+ inTime: string
+ outTime: string
+ disposalSite: string
+ }
+
+ interface SearchParam {
+ keywords: string
+ }
+
+ interface StatisticsResult {
+ xAxis: string[]
+ series: {
+ [key: string]: number[]
+ }
+ }
+ }
+}
diff --git a/src/pages/tsp/Tsp.vue b/src/pages/tsp/Tsp.vue
index 0742a6c..f4d0d8e 100644
--- a/src/pages/tsp/Tsp.vue
+++ b/src/pages/tsp/Tsp.vue
@@ -3,37 +3,35 @@ import { SelectData } from '@idux/components/select/src/types'
import { useFormGroup } from '@idux/cdk'
import { TableColumn } from '@idux/components/table'
import { TablePagination } from '@idux/components/table/src/types'
+import CreateTsp from '@/pages/tsp/create-tsp.vue'
+import TspApi from '@/pages/tsp/tsp-api.ts'
+import { ref } from 'vue'
+const createTsp = ref | null>(null)
const dataSource: SelectData[] = [
+ {key: '', label: '所有'},
{key: 'ZhengChang', label: '正常运营'},
{key: 'FenZhengChang', label: '非正常运营'},
]
-interface Data {
- id: string
- pointName: string
- street: string
- microdistrict: string
- propertyManagement: string
- statusTxt: string
- status: 'ZhengChang' | 'FenZhengChang'
-}
+const pagination = reactive({
+ pageIndex: 1,
+ pageSize: 10,
+ total: 0,
+ size: 'sm',
+ showTotal: true,
+ onChange(pageIndex: number, pageSize: number) {
+ console.log('------', pageIndex, pageSize)
+ pagination.pageIndex = pageIndex
+ pagination.pageSize = pageSize
+ }
+})
-const formGroup = useFormGroup({})
-
-const fullData: Data[] = []
-for (let index = 0; index < 10; index++) {
- fullData.push({
- id: index + '',
- pointName: `Edrward ${index}`,
- street: `Edrward ${index}`,
- microdistrict: `Edrward ${index}`,
- propertyManagement: `Edrward ${index}`,
- statusTxt: `Edrward ${index}`,
- status: index % 2 === 0 ? 'ZhengChang' : 'FenZhengChang',
- })
-}
-const data = ref(fullData)
+const formGroup = useFormGroup({
+ pointName: [ '' ],
+ status: [ '' ],
+})
+const datasource = ref()
const columns: TableColumn[] = [
{
title: '名称',
@@ -42,7 +40,7 @@ const columns: TableColumn[] = [
},
{
title: '所属街道',
- dataKey: 'street',
+ dataKey: 'streetName',
},
{
title: '所属小区',
@@ -63,18 +61,40 @@ const columns: TableColumn[] = [
customCell: 'action',
}
]
+const tableSpin = ref(false)
+const statisticsResult = reactive({
+ totalCount: 0,
+ totalCountGrowthRate: 0,
+ onlineCount: 0,
+ onlineCountGrowthRate: 0,
+ offlineCount: 0,
+ offlineCountGrowthRate: 0,
+})
-const pagination = reactive({
- pageIndex: 1,
- pageSize: 10,
- total: 100,
- size: 'sm',
- showTotal: true,
- onChange(pageIndex: number, pageSize: number) {
- console.log('------', pageIndex, pageSize)
- pagination.pageIndex = pageIndex
- pagination.pageSize = pageSize
- }
+function searchHandler() {
+ tableSpin.value = true
+ TspApi.paging({
+ ...formGroup.getValue(),
+ current: pagination.pageIndex ?? 1,
+ size: pagination.pageSize ?? 10,
+ })
+ .then(res => {
+ pagination.pageIndex = res.data.current
+ pagination.pageSize = res.data.size
+ pagination.total = res.data.total
+ datasource.value = res.data.records
+ })
+ .finally(() => {
+ tableSpin.value = false
+ })
+}
+
+onMounted(() => {
+ searchHandler()
+ TspApi.statistics()
+ .then(res => {
+ Object.assign(statisticsResult, res.data)
+ })
})
@@ -85,24 +105,24 @@ const pagination = reactive({
收纳点总数
-
24
-
较上月增长 12%
+
{{ statisticsResult.totalCount }}
+
较上月增长 {{ statisticsResult.totalCountGrowthRate }}%
正常运营数量
-
24
-
较上月增长 8%
+
{{ statisticsResult.onlineCount }}
+
较上月增长 {{ statisticsResult.onlineCountGrowthRate }}%
非正常运营数量
-
24
-
较上月增长 2%
+
{{ statisticsResult.offlineCount }}
+
较上月增长 {{ statisticsResult.offlineCountGrowthRate }}%
@@ -111,18 +131,25 @@ const pagination = reactive({
-
+
{{ record.pointName }}
@@ -136,6 +163,7 @@ const pagination = reactive({
+
@@ -294,9 +322,16 @@ const pagination = reactive({
}
.search-form {
- :deep(.ix-form-item) {
- flex 2
+ :deep(.ix-form-item):nth-child(1) {
+ flex 5
+ }
+ :deep(.ix-form-item):nth-child(2) {
+ flex 2
+ }
+
+ :deep(.ix-form-item):nth-child(3) {
+ flex 1
}
:deep(.ix-button ) {
diff --git a/src/pages/tsp/create-tsp.vue b/src/pages/tsp/create-tsp.vue
new file mode 100644
index 0000000..98c4a61
--- /dev/null
+++ b/src/pages/tsp/create-tsp.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/tsp/tsp-api.ts b/src/pages/tsp/tsp-api.ts
new file mode 100644
index 0000000..c42d2d2
--- /dev/null
+++ b/src/pages/tsp/tsp-api.ts
@@ -0,0 +1,28 @@
+import {
+ get,
+ post
+} from '@/common/utils/http-util.ts'
+
+export default {
+ paging(data: TspTypes.SearchParam & G.PageParam) {
+ return get>('/temp_storage_point/paging', data)
+ },
+ list(pid: string | null = null) {
+ return get('/temp_storage_point/list', {pid: pid})
+ },
+ detail(id: string) {
+ return get('/temp_storage_point/detail', {id})
+ },
+ add(data: TspTypes.AddParam) {
+ return post('/temp_storage_point/add', data)
+ },
+ modify(data: TspTypes.TspData) {
+ return post('/temp_storage_point/modify', data)
+ },
+ del(ids: string[]) {
+ return post('/temp_storage_point/del', ids)
+ },
+ statistics() {
+ return get('/temp_storage_point/statistics')
+ },
+}
diff --git a/src/pages/tsp/tsp.d.ts b/src/pages/tsp/tsp.d.ts
new file mode 100644
index 0000000..5f41aef
--- /dev/null
+++ b/src/pages/tsp/tsp.d.ts
@@ -0,0 +1,36 @@
+export {}
+declare global {
+ namespace TspTypes {
+ interface TspData {
+ id: string
+ pointName: string
+ streetName: string
+ microdistrict: string
+ propertyManagement: string
+ status: 'ZhengChang' | 'FenZhengChang'
+ }
+
+ interface AddParam {
+ pointName?: string
+ streetName?: string
+ microdistrict?: string
+ propertyManagement?: string
+ status?: 'ZhengChang' | 'FenZhengChang'
+ videoUrl?: string
+ }
+
+ interface SearchParam {
+ pointName: string
+ status: 'ZhengChang' | 'FenZhengChang' | ''
+ }
+
+ interface StatisticsResult {
+ totalCount: number
+ totalCountGrowthRate: number
+ onlineCount: number
+ onlineCountGrowthRate: number
+ offlineCount: number
+ offlineCountGrowthRate: number
+ }
+ }
+}