Procházet zdrojové kódy

界面列表添加序号

like před 6 měsíci
rodič
revize
9f2aef0c23

+ 10 - 1
snowy-admin-web/src/views/basicset/devicetype/index.vue

@@ -5,6 +5,7 @@
 			:columns="columns"
 			:data="loadData"
 			:row-key="(record) => record.id"
+			bordered
 			@resizeColumn="handleResizeColumn"
 		>
 			<template #operator>
@@ -42,7 +43,9 @@
 					</div>
 				</div>
 			</template>
-			<template #bodyCell="{ column, record }">
+			<template #bodyCell="{ column, record, index }">
+				<!-- 序号 -->
+				<template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
 				<template v-if="column.dataIndex === 'action'">
 					<!-- <a-button type="link" size="small" @click="formRef.onOpen(record)">编辑</a-button> -->
 					<a-popconfirm title="确定要删除吗?" @confirm="deleteData(record)">
@@ -65,6 +68,12 @@
 	const tableRef = ref()
 
 	const columns = [
+		{
+			title: '序号',
+			dataIndex: 'index',
+			align: 'center',
+			width: 50
+		},
 		{
 			title: '型号名称',
 			dataIndex: 'name',

+ 10 - 1
snowy-admin-web/src/views/basicset/mem/index.vue

@@ -5,6 +5,7 @@
 			:columns="columns"
 			:data="loadData"
 			:row-key="(record) => record.id"
+			bordered
 			@resizeColumn="handleResizeColumn"
 		>
 			<template #operator>
@@ -46,7 +47,9 @@
 					</div>
 				</div>
 			</template>
-			<template #bodyCell="{ column, record }">
+			<template #bodyCell="{ column, record, index }">
+				<!-- 序号 -->
+				<template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
 				<template v-if="column.dataIndex === 'status'">
 					<span>
 						<a-tag :color="record.status == '1' ? '#87d068' : '#cd201f'">
@@ -104,6 +107,12 @@
 	const tableRef = ref()
 
 	const columns = [
+		{
+			title: '序号',
+			dataIndex: 'index',
+			align: 'center',
+			width: 50
+		},
 		{
 			title: '设备名称',
 			dataIndex: 'deviceName',

+ 10 - 2
snowy-admin-web/src/views/basicset/monitor/scrap.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="table_item">
-		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code">
+		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code" bordered>
 			<template #operator>
 				<!-- 搜索区域 -->
 				<div class="table-search">
@@ -45,7 +45,9 @@
 					</div>
 				</div>
 			</template>
-			<template #bodyCell="{ column, record }">
+			<template #bodyCell="{ column, record, index }">
+				<!-- 序号 -->
+				<template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
 				<template v-if="column.dataIndex === 'sfxf'">
 					<span>
 						<a-tag :color="record.sfxf == '1' ? '#87d068' : '#cd201f'">
@@ -72,6 +74,12 @@
 	const searchFormState = ref({})
 	const tableRef = ref()
 	const columns = [
+		{
+			title: '序号',
+			dataIndex: 'index',
+			align: 'center',
+			width: 50
+		},
 		{
 			title: '对象编号',
 			dataIndex: 'code',

+ 10 - 1
snowy-admin-web/src/views/basicset/monitor/setup.vue

@@ -5,6 +5,7 @@
 			:columns="columns"
 			:data="loadData"
 			:row-key="(record) => record.id"
+			bordered
 			@resizeColumn="handleResizeColumn"
 		>
 			<template #operator>
@@ -50,7 +51,9 @@
 					</div> -->
 				</div>
 			</template>
-			<template #bodyCell="{ column, record }">
+			<template #bodyCell="{ column, record, index }">
+				<!-- 序号 -->
+				<template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
 				<template v-if="column.dataIndex === 'status'">
 					<span>
 						<a-tag :color="record.status == '1' ? '#87d068' : '#cd201f'">
@@ -151,6 +154,12 @@
 	const searchFormState = ref({})
 	const tableRef = ref()
 	const columns = [
+		{
+			title: '序号',
+			dataIndex: 'index',
+			align: 'center',
+			width: 50
+		},
 		{
 			title: '对象名称',
 			dataIndex: 'name',

+ 10 - 2
snowy-admin-web/src/views/basicset/monitor/upkeep.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="table_item">
-		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code">
+		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code" bordered>
 			<template #operator>
 				<!-- 搜索区域 -->
 				<div class="table-search">
@@ -45,7 +45,9 @@
 					</div>
 				</div>
 			</template>
-			<template #bodyCell="{ column, record }">
+			<template #bodyCell="{ column, record, index }">
+				<!-- 序号 -->
+				<template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
 				<template v-if="column.dataIndex === 'sfxf'">
 					<span>
 						<a-tag :color="record.sfxf == '1' ? '#87d068' : '#cd201f'">
@@ -72,6 +74,12 @@
 	const searchFormState = ref({})
 	const tableRef = ref()
 	const columns = [
+		{
+			title: '序号',
+			dataIndex: 'index',
+			align: 'center',
+			width: 50
+		},
 		{
 			title: '对象编号',
 			dataIndex: 'code',

+ 10 - 2
snowy-admin-web/src/views/basicset/plan/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="table_item">
-		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code">
+		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code" bordered>
 			<template #operator>
 				<!-- 搜索区域 -->
 				<div class="table-search">
@@ -35,7 +35,9 @@
 					</div>
 				</div>
 			</template>
-			<template #bodyCell="{ column, record }">
+			<template #bodyCell="{ column, record, index }">
+				<!-- 序号 -->
+				<template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
 				<template v-if="column.dataIndex === 'action'">
 					<a-button type="link" size="small">编辑</a-button>
 					<a-popconfirm title="确定要删除吗?" @confirm="deleteData(record)">
@@ -55,6 +57,12 @@
 	const searchFormState = ref({})
 	const tableRef = ref()
 	const columns = [
+		{
+			title: '序号',
+			dataIndex: 'index',
+			align: 'center',
+			width: 50
+		},
 		{
 			title: '名称',
 			dataIndex: 'name',

+ 10 - 2
snowy-admin-web/src/views/basicset/ports/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="table_item">
-		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code">
+		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code" bordered>
 			<template #operator>
 				<!-- 搜索区域 -->
 				<div class="table-search">
@@ -48,7 +48,9 @@
 					</div>
 				</div>
 			</template>
-			<template #bodyCell="{ column, record }">
+			<template #bodyCell="{ column, record, index }">
+				<!-- 序号 -->
+				<template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
 				<template v-if="column.dataIndex === 'action'">
 					<a-button type="link" size="small">编辑</a-button>
 					<a-popconfirm title="确定要删除吗?" @confirm="deleteData(record)">
@@ -68,6 +70,12 @@
 	const searchFormState = ref({})
 	const tableRef = ref()
 	const columns = [
+		{
+			title: '序号',
+			dataIndex: 'index',
+			align: 'center',
+			width: 50
+		},
 		{
 			title: '接口类型',
 			dataIndex: 'type',

+ 10 - 0
snowy-admin-web/src/views/motoring/analyse/assess.vue

@@ -65,6 +65,10 @@
 					</div>
 				</div>
 			</template>
+			<template #bodyCell="{ column, index }">
+				<!-- 序号 -->
+				<template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
+			</template>
 		</s-table>
 		<div class="item-right">
 			<!-- 单位 -->
@@ -94,6 +98,12 @@
 	const tableRef = ref()
 	const searchFormState = ref({})
 	const columns = [
+		{
+			title: '序号',
+			dataIndex: 'index',
+			align: 'center',
+			width: 50
+		},
 		{
 			title: '部门名称',
 			dataIndex: 'bmmc',

+ 11 - 1
snowy-admin-web/src/views/motoring/analyse/curve.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="table_item">
-		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code">
+		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code" bordered>
 			<template #operator>
 				<!-- 搜索区域 -->
 				<div class="table-search">
@@ -75,6 +75,10 @@
 					</div>
 				</div>
 			</template>
+			<template #bodyCell="{ column, index }">
+				<!-- 序号 -->
+				<template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
+			</template>
 		</s-table>
 
 		<div class="item-right">
@@ -113,6 +117,12 @@
 	const tableRef = ref()
 
 	const columns = [
+		{
+			title: '序号',
+			dataIndex: 'index',
+			align: 'center',
+			width: 50
+		},
 		{
 			title: '对象名称',
 			dataIndex: 'name',

+ 10 - 2
snowy-admin-web/src/views/motoring/analyse/daily.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="table_item">
-		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code">
+		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code" bordered>
 			<template #operator>
 				<!-- 搜索区域 -->
 				<div class="table-search">
@@ -57,7 +57,9 @@
 				</div>
 			</template>
 
-			<template #bodyCell="{ column, record }">
+			<template #bodyCell="{ column, record, index }">
+				<!-- 序号 -->
+				<template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
 				<template v-if="column.dataIndex === 'state'">
 					<span>
 						<a-tag :color="record.state == '1' ? '#87d068' : record.state == '2' ? '#cd201f' : '#50cd7c'">
@@ -99,6 +101,12 @@
 
 	const tableRef = ref()
 	const columns = [
+		{
+			title: '序号',
+			dataIndex: 'index',
+			align: 'center',
+			width: 50
+		},
 		{
 			title: '采集时间',
 			dataIndex: 'time',

+ 11 - 0
snowy-admin-web/src/views/motoring/analyse/evaluate.vue

@@ -44,6 +44,11 @@
 					</div>
 				</div>
 			</template>
+
+			<template #bodyCell="{ column, index }">
+				<!-- 序号 -->
+				<template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
+			</template>
 		</s-table>
 	</div>
 </template>
@@ -54,6 +59,12 @@
 	const searchFormState = ref({})
 
 	const columns = [
+		{
+			title: '序号',
+			dataIndex: 'index',
+			align: 'center',
+			width: 50
+		},
 		{
 			title: '部门名称',
 			dataIndex: 'bmmc',

+ 11 - 1
snowy-admin-web/src/views/motoring/analyse/signal.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="table_item">
-		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code">
+		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code" bordered>
 			<template #operator>
 				<!-- 搜索区域 -->
 				<div class="table-search">
@@ -54,6 +54,10 @@
 					</div>
 				</div>
 			</template>
+			<template #bodyCell="{ column, index }">
+				<!-- 序号 -->
+				<template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
+			</template>
 		</s-table>
 
 		<div class="item-right">
@@ -87,6 +91,12 @@
 	const tableRef = ref()
 
 	const columns = [
+		{
+			title: '序号',
+			dataIndex: 'index',
+			align: 'center',
+			width: 50
+		},
 		{
 			title: '采集器编码',
 			dataIndex: 'code',

+ 11 - 1
snowy-admin-web/src/views/motoring/analyse/statistics.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="table_item">
-		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code">
+		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code" bordered>
 			<template #operator>
 				<!-- 搜索区域 -->
 				<div class="table-search">
@@ -65,6 +65,10 @@
 					</div>
 				</div>
 			</template>
+			<template #bodyCell="{ column, index }">
+				<!-- 序号 -->
+				<template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
+			</template>
 		</s-table>
 
 		<div class="item-right">
@@ -98,6 +102,12 @@
 	const tableRef = ref()
 
 	const columns = [
+		{
+			title: '序号',
+			dataIndex: 'index',
+			align: 'center',
+			width: 50
+		},
 		{
 			title: '对象名称',
 			dataIndex: 'name',

+ 10 - 1
snowy-admin-web/src/views/motoring/location/index.vue

@@ -6,6 +6,7 @@
 			:columns="columns"
 			:data="loadData"
 			:row-key="(record) => record.id"
+			bordered
 			@resizeColumn="handleResizeColumn"
 		>
 			<template #operator>
@@ -43,7 +44,9 @@
 					</div>
 				</div>
 			</template>
-			<template #bodyCell="{ column, record }">
+			<template #bodyCell="{ column, record, index }">
+				<!-- 序号 -->
+				<template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
 				<template v-if="column.dataIndex === 'action'">
 					<a-button type="link" size="small" @click="formRef.onOpen(record)">编辑</a-button>
 					<a-popconfirm title="确定要删除吗?" @confirm="deleteData(record)">
@@ -68,6 +71,12 @@
 	const Route = useRoute()
 
 	const columns = [
+		{
+			title: '序号',
+			dataIndex: 'index',
+			align: 'center',
+			width: 50
+		},
 		{
 			title: '区域名称',
 			dataIndex: 'name',

+ 10 - 2
snowy-admin-web/src/views/motoring/query/history.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="table_item">
-		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code">
+		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code" bordered>
 			<template #operator>
 				<!-- 搜索区域 -->
 				<div class="table-search">
@@ -104,7 +104,9 @@
 					</div>
 				</div>
 			</template>
-			<template #bodyCell="{ column, record }">
+			<template #bodyCell="{ column, record, index }">
+				<!-- 序号 -->
+				<template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
 				<template v-if="column.dataIndex === 'state'">
 					<span>
 						<a-tag :color="record.state == '1' ? '#87d068' : record.state == '2' ? '#cd201f' : '#50cd7c'">
@@ -123,6 +125,12 @@
 	const searchFormState = ref({})
 	const tableRef = ref()
 	const columns = [
+		{
+			title: '序号',
+			dataIndex: 'index',
+			align: 'center',
+			width: 50
+		},
 		{
 			title: '采集时间',
 			dataIndex: 'time',

+ 10 - 2
snowy-admin-web/src/views/motoring/query/realtime.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="table_item">
-		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code">
+		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.code" bordered>
 			<template #operator>
 				<!-- 搜索区域 -->
 				<div class="table-search">
@@ -87,7 +87,9 @@
 					</div>
 				</div>
 			</template>
-			<template #bodyCell="{ column, record }">
+			<template #bodyCell="{ column, record, index }">
+				<!-- 序号 -->
+				<template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
 				<template v-if="column.dataIndex === 'state'">
 					<span>
 						<a-tag :color="record.state == '1' ? '#87d068' : record.state == '2' ? '#cd201f' : '#50cd7c'">
@@ -106,6 +108,12 @@
 	const searchFormState = ref({})
 	const tableRef = ref()
 	const columns = [
+		{
+			title: '序号',
+			dataIndex: 'index',
+			align: 'center',
+			width: 50
+		},
 		{
 			title: '采集时间',
 			dataIndex: 'time',

+ 6 - 0
snowy-admin-web/src/views/motoring/report/initData.js

@@ -1,4 +1,10 @@
 export const initColumns = [
+	{
+		title: '序号',
+		dataIndex: 'index',
+		align: 'center',
+		width: 50
+	},
 	{
 		title: '通知标题',
 		dataIndex: 'title',

+ 4 - 1
snowy-admin-web/src/views/motoring/report/list.vue

@@ -7,6 +7,7 @@
 			:row-key="(record) => record.id"
 			:row-selection="options.rowSelection"
 			:loading="loading"
+			bordered
 		>
 			<template #operator>
 				<!-- 搜索区域 -->
@@ -95,7 +96,9 @@
 				</div>
 			</template>
 
-			<template #bodyCell="{ column, record }">
+			<template #bodyCell="{ column, record, index }">
+				<!-- 序号 -->
+				<template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
 				<template v-if="column.dataIndex === 'options'">
 					<a-button type="link" size="small" @click="handlerEdit(record)">编辑</a-button>
 					<a-popconfirm title="确定要删除吗?" @confirm="handlerDel(record)">

+ 11 - 1
snowy-admin-web/src/views/motoring/report/noticelist.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="table_item">
-		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.sctime">
+		<s-table ref="tableRef" :columns="columns" :data="loadData" :row-key="(record) => record.sctime" bordered>
 			<template #operator>
 				<!-- 搜索区域 -->
 				<div class="table-search">
@@ -77,6 +77,10 @@
 					</div>
 				</div>
 			</template>
+			<template #bodyCell="{ column, index }">
+				<!-- 序号 -->
+				<template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
+			</template>
 		</s-table>
 	</div>
 </template>
@@ -88,6 +92,12 @@
 	const searchFormState = ref({})
 	const tableRef = ref()
 	const columns = [
+		{
+			title: '序号',
+			dataIndex: 'index',
+			align: 'center',
+			width: 50
+		},
 		{
 			title: '生成时间',
 			dataIndex: 'sctime',