需求变更整改
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
export let color = [ '#07CCCA','#00BFF5', '#FFBF00', '#77DA63', '#D5FF6B', '#Ff6600', '#FF9100', '#5B6E96', '#66FFCC', '#B3B3B3']
|
||||
export const gradeColor3 = ['#339966', '#FFCC33', '#CC0000']
|
||||
export const gradeColor5 = ['#00CC00', '#99CC99', '#FF9900','#996600','#CC0000']
|
||||
export const gradeColor3 = ['#339966', '#FFCC33', '#A52a2a']
|
||||
export const gradeColor5 = ['#00CC00', '#99CC99', '#FF9900','#996600','#A52a2a']
|
||||
|
||||
|
||||
@@ -745,7 +745,7 @@ export default {
|
||||
zhou = waveDatas[0].RMSSMinDetail.secondeZhou;
|
||||
}
|
||||
|
||||
colors.push("#FFCC00");
|
||||
colors.push("#DAA520");
|
||||
colors.push("#fff");
|
||||
colors.push("#fff");
|
||||
break;
|
||||
@@ -783,8 +783,8 @@ export default {
|
||||
rmsvY = waveDatas[0].RMSSMinDetail.rmsvSecondY;
|
||||
zhou = waveDatas[0].RMSSMinDetail.secondeZhou;
|
||||
}
|
||||
colors.push("#FFCC00");
|
||||
colors.push("#009900");
|
||||
colors.push("#DAA520");
|
||||
colors.push("#2E8B57");
|
||||
colors.push("#fff");
|
||||
break;
|
||||
case 3:
|
||||
@@ -822,9 +822,9 @@ export default {
|
||||
rmsvY = waveDatas[0].RMSSMinDetail.rmsvSecondY;
|
||||
zhou = waveDatas[0].RMSSMinDetail.secondeZhou;
|
||||
}
|
||||
colors.push("#FFCC00");
|
||||
colors.push("#009900");
|
||||
colors.push("#CC0000");
|
||||
colors.push("#DAA520");
|
||||
colors.push("#2E8B57");
|
||||
colors.push("#A52a2a");
|
||||
break;
|
||||
}
|
||||
if (waveDatas[0].unit === "电压") {
|
||||
@@ -1090,7 +1090,7 @@ export default {
|
||||
symbol: "none",
|
||||
sampling: "average",
|
||||
itemStyle: {
|
||||
color: "#FFCC00",
|
||||
color: "#DAA520",
|
||||
},
|
||||
progressive: 500,
|
||||
// 渲染阈值,大于此值则启动渐进渲染
|
||||
@@ -1105,7 +1105,7 @@ export default {
|
||||
symbol: "none",
|
||||
sampling: "average",
|
||||
itemStyle: {
|
||||
color: "#009900",
|
||||
color: "#2E8B57",
|
||||
},
|
||||
progressive: 500,
|
||||
// 渲染阈值,大于此值则启动渐进渲染
|
||||
@@ -1120,7 +1120,7 @@ export default {
|
||||
symbol: "none",
|
||||
sampling: "average",
|
||||
itemStyle: {
|
||||
color: "#CC0000",
|
||||
color: "#A52a2a",
|
||||
},
|
||||
progressive: 500,
|
||||
// 渲染阈值,大于此值则启动渐进渲染
|
||||
@@ -1518,7 +1518,7 @@ export default {
|
||||
symbol: "none",
|
||||
sampling: "average",
|
||||
itemStyle: {
|
||||
color: "#FFCC00",
|
||||
color: "#DAA520",
|
||||
},
|
||||
progressive: 500,
|
||||
// 渲染阈值,大于此值则启动渐进渲染
|
||||
@@ -1533,7 +1533,7 @@ export default {
|
||||
symbol: "none",
|
||||
sampling: "average",
|
||||
itemStyle: {
|
||||
color: "#009900",
|
||||
color: "#2E8B57",
|
||||
},
|
||||
progressive: 500,
|
||||
// 渲染阈值,大于此值则启动渐进渲染
|
||||
@@ -1548,7 +1548,7 @@ export default {
|
||||
symbol: "none",
|
||||
sampling: "average",
|
||||
itemStyle: {
|
||||
color: "#CC0000",
|
||||
color: "#A52a2a",
|
||||
},
|
||||
progressive: 500,
|
||||
// 渲染阈值,大于此值则启动渐进渲染
|
||||
|
||||
@@ -461,7 +461,7 @@ export default {
|
||||
adata = waveDatas[0].shunshiS.shunshiSA
|
||||
}
|
||||
|
||||
colors.push('#FFCC00')
|
||||
colors.push('#DAA520')
|
||||
colors.push('#fff')
|
||||
colors.push('#fff')
|
||||
break
|
||||
@@ -481,8 +481,8 @@ export default {
|
||||
adata = waveDatas[0].shunshiS.shunshiSA
|
||||
bdata = waveDatas[0].shunshiS.shunshiSB
|
||||
}
|
||||
colors.push('#FFCC00')
|
||||
colors.push('#009900')
|
||||
colors.push('#DAA520')
|
||||
colors.push('#2E8B57')
|
||||
colors.push('#fff')
|
||||
break
|
||||
case 3:
|
||||
@@ -505,9 +505,9 @@ export default {
|
||||
cdata = waveDatas[0].shunshiS.shunshiSC
|
||||
}
|
||||
|
||||
colors.push('#FFCC00')
|
||||
colors.push('#009900')
|
||||
colors.push('#CC0000')
|
||||
colors.push('#DAA520')
|
||||
colors.push('#2E8B57')
|
||||
colors.push('#A52a2a')
|
||||
break
|
||||
}
|
||||
|
||||
@@ -754,7 +754,7 @@ export default {
|
||||
symbol: 'none',
|
||||
sampling: 'average',
|
||||
itemStyle: {
|
||||
color: '#FFCC00'
|
||||
color: '#DAA520'
|
||||
},
|
||||
progressive: 1000,
|
||||
// 渲染阈值,大于此值则启动渐进渲染
|
||||
@@ -770,7 +770,7 @@ export default {
|
||||
symbol: 'none',
|
||||
sampling: 'average',
|
||||
itemStyle: {
|
||||
color: '#009900'
|
||||
color: '#2E8B57'
|
||||
},
|
||||
progressive: 1000,
|
||||
// 渲染阈值,大于此值则启动渐进渲染
|
||||
@@ -786,7 +786,7 @@ export default {
|
||||
symbol: 'none',
|
||||
sampling: 'average',
|
||||
itemStyle: {
|
||||
color: '#CC0000'
|
||||
color: '#A52a2a'
|
||||
},
|
||||
progressive: 1000,
|
||||
// 渲染阈值,大于此值则启动渐进渲染
|
||||
@@ -844,24 +844,24 @@ export default {
|
||||
switch (this.iphasic) {
|
||||
case 1:
|
||||
a = waveDataTemp.title.aTitle
|
||||
colors.push('#FFCC00')
|
||||
colors.push('#DAA520')
|
||||
colors.push('#fff')
|
||||
colors.push('#fff')
|
||||
break
|
||||
case 2:
|
||||
a = waveDataTemp.title.aTitle
|
||||
b = waveDataTemp.title.bTitle
|
||||
colors.push('#FFCC00')
|
||||
colors.push('#009900')
|
||||
colors.push('#DAA520')
|
||||
colors.push('#2E8B57')
|
||||
colors.push('#fff')
|
||||
break
|
||||
case 3:
|
||||
a = waveDataTemp.title.aTitle
|
||||
b = waveDataTemp.title.bTitle
|
||||
c = waveDataTemp.title.cTitle
|
||||
colors.push('#FFCC00')
|
||||
colors.push('#009900')
|
||||
colors.push('#CC0000')
|
||||
colors.push('#DAA520')
|
||||
colors.push('#2E8B57')
|
||||
colors.push('#A52a2a')
|
||||
break
|
||||
}
|
||||
|
||||
@@ -1123,7 +1123,7 @@ export default {
|
||||
symbol: 'none',
|
||||
sampling: 'average',
|
||||
itemStyle: {
|
||||
color: '#FFCC00'
|
||||
color: '#DAA520'
|
||||
},
|
||||
large: true,
|
||||
progressive: 1000,
|
||||
@@ -1138,7 +1138,7 @@ export default {
|
||||
symbol: 'none',
|
||||
sampling: 'average',
|
||||
itemStyle: {
|
||||
color: '#009900'
|
||||
color: '#2E8B57'
|
||||
},
|
||||
progressive: 1000,
|
||||
// 渲染阈值,大于此值则启动渐进渲染
|
||||
@@ -1153,7 +1153,7 @@ export default {
|
||||
symbol: 'none',
|
||||
sampling: 'average',
|
||||
itemStyle: {
|
||||
color: '#CC0000'
|
||||
color: '#A52a2a'
|
||||
},
|
||||
progressive: 1000,
|
||||
// 渲染阈值,大于此值则启动渐进渲染
|
||||
|
||||
@@ -1,23 +1,44 @@
|
||||
<template>
|
||||
<div :style="{ height: tableStore.table.height }">
|
||||
<vxe-table ref="tableRef" height="auto" :data="tableStore.table.data" v-loading="tableStore.table.loading"
|
||||
v-bind="Object.assign({}, defaultAttribute, $attrs)" @checkbox-all="selectChangeEvent"
|
||||
@checkbox-change="selectChangeEvent" :showOverflow="showOverflow">
|
||||
<vxe-table
|
||||
ref="tableRef"
|
||||
height="auto"
|
||||
:key="key"
|
||||
:data="tableStore.table.data"
|
||||
v-loading="tableStore.table.loading"
|
||||
v-bind="Object.assign({}, defaultAttribute, $attrs)"
|
||||
@checkbox-all="selectChangeEvent"
|
||||
@checkbox-change="selectChangeEvent"
|
||||
:showOverflow="showOverflow"
|
||||
:sort-config="{ remote: true }"
|
||||
@sort-change="handleSortChange"
|
||||
>
|
||||
<!-- Column 组件内部是 el-table-column -->
|
||||
<template v-if="isGroup">
|
||||
<GroupColumn :column="tableStore.table.column" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<Column :attr="item" :key="key + '-column'" v-for="(item, key) in tableStore.table.column"
|
||||
:tree-node="item.treeNode">
|
||||
<Column
|
||||
:attr="item"
|
||||
:key="key + '-column'"
|
||||
v-for="(item, key) in tableStore.table.column"
|
||||
:tree-node="item.treeNode"
|
||||
>
|
||||
<!-- tableStore 预设的列 render 方案 -->
|
||||
<template v-if="item.render" #default="scope">
|
||||
<FieldRender :field="item" :row="scope.row" :column="scope.column" :index="scope.rowIndex" :key="key +
|
||||
'-' +
|
||||
item.render +
|
||||
'-' +
|
||||
(item.field ? '-' + item.field + '-' + scope.row[item.field] : '')
|
||||
" />
|
||||
<FieldRender
|
||||
:field="item"
|
||||
:row="scope.row"
|
||||
:column="scope.column"
|
||||
:index="scope.rowIndex"
|
||||
:key="
|
||||
key +
|
||||
'-' +
|
||||
item.render +
|
||||
'-' +
|
||||
(item.field ? '-' + item.field + '-' + scope.row[item.field] : '')
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
</Column>
|
||||
</template>
|
||||
@@ -26,11 +47,16 @@
|
||||
</div>
|
||||
|
||||
<div v-if="tableStore.showPage" class="table-pagination">
|
||||
<el-pagination :currentPage="tableStore.table.params!.pageNum" :page-size="tableStore.table.params!.pageSize"
|
||||
:page-sizes="pageSizes" background
|
||||
<el-pagination
|
||||
:currentPage="tableStore.table.params!.pageNum"
|
||||
:page-size="tableStore.table.params!.pageSize"
|
||||
:page-sizes="pageSizes"
|
||||
background
|
||||
:layout="config.layout.shrink ? 'prev, next, jumper' : 'sizes,total, ->, prev, pager, next, jumper'"
|
||||
:total="tableStore.table.total" @size-change="onTableSizeChange"
|
||||
@current-change="onTableCurrentChange"></el-pagination>
|
||||
:total="tableStore.table.total"
|
||||
@size-change="onTableSizeChange"
|
||||
@current-change="onTableCurrentChange"
|
||||
></el-pagination>
|
||||
</div>
|
||||
<slot name="footer"></slot>
|
||||
</template>
|
||||
@@ -51,7 +77,7 @@ const config = useConfig()
|
||||
const tableRef = ref<VxeTableInstance>()
|
||||
const tableStore = inject('tableStore') as TableStoreClass
|
||||
const router = useRouter()
|
||||
|
||||
const key = ref(0)
|
||||
interface Props extends /* @vue-ignore */ Partial<InstanceType<typeof ElTable>> {
|
||||
isGroup?: boolean
|
||||
showOverflow?: boolean
|
||||
@@ -82,7 +108,32 @@ const pageSizes = computed(() => {
|
||||
}
|
||||
return defaultSizes
|
||||
})
|
||||
const handleSortChange = ({ field, order }: any) => {
|
||||
// console.log('🚀 ~ handleSortChange ~ prop, order :', field, order)
|
||||
if (field && order) {
|
||||
// 根据当前排序条件对所有数据进行排序
|
||||
const list = tableStore.table.copyData.sort((a, b) => {
|
||||
if (order === 'asc') {
|
||||
return a[field] > b[field] ? 1 : -1
|
||||
} else {
|
||||
return a[field] < b[field] ? 1 : -1
|
||||
}
|
||||
})
|
||||
console.log(tableStore.isWebPaging)
|
||||
|
||||
if (tableStore.isWebPaging) {
|
||||
tableStore.table.data = JSON.parse(
|
||||
JSON.stringify(
|
||||
window.XEUtils.chunk(list, tableStore.table.params!.pageSize)[tableStore.table.params!.pageNum - 1]
|
||||
)
|
||||
)
|
||||
} else {
|
||||
tableStore.table.data = JSON.parse(JSON.stringify(list))
|
||||
}
|
||||
|
||||
// key.value += 1
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 记录选择的项
|
||||
*/
|
||||
@@ -98,8 +149,6 @@ watch(
|
||||
() => tableStore.table.allFlag,
|
||||
newVal => {
|
||||
if (tableStore.table.allFlag) {
|
||||
console.log("🚀 ~ tableStore.table:", tableStore.exportName || document.querySelectorAll('.ba-nav-tab.active')[0].textContent || '')
|
||||
|
||||
tableRef.value?.exportData({
|
||||
filename: tableStore.exportName || document.querySelectorAll('.ba-nav-tab.active')[0].textContent || '', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
@@ -107,14 +156,15 @@ watch(
|
||||
useStyle: true,
|
||||
data: tableStore.table.allData, // 数据源 // 过滤那个字段导出
|
||||
columnFilterMethod: function (column: any) {
|
||||
return !(column.column.title === undefined || column.column.title === '序号' || column.column.title === '操作')
|
||||
return !(
|
||||
column.column.title === undefined ||
|
||||
column.column.title === '序号' ||
|
||||
column.column.title === '操作'
|
||||
)
|
||||
}
|
||||
})
|
||||
tableStore.table.allFlag = false
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
)
|
||||
watch(
|
||||
|
||||
@@ -134,7 +134,7 @@ const defaultProps = {
|
||||
label: 'name',
|
||||
value: 'id'
|
||||
}
|
||||
const process = ref('2')
|
||||
const process = ref('')
|
||||
//治理设备数据
|
||||
const zlDeviceData = ref([])
|
||||
const zlDevList = ref<any>([])
|
||||
@@ -181,6 +181,9 @@ watch(process, val => {
|
||||
}, 0)
|
||||
})
|
||||
function filterProcess(nodes: any) {
|
||||
if (process.value == '') {
|
||||
return nodes
|
||||
}
|
||||
return nodes
|
||||
.map(node => {
|
||||
// 递归处理子节点
|
||||
|
||||
@@ -32,6 +32,7 @@ const config = useConfig()
|
||||
const tree = ref()
|
||||
const treRef = ref()
|
||||
const changeDeviceType = (val: any, obj: any) => {
|
||||
console.log("🚀 ~ changeDeviceType ~ val:", val,obj)
|
||||
emit('deviceTypeChange', val, obj)
|
||||
}
|
||||
getDeviceTree().then(res => {
|
||||
|
||||
@@ -119,7 +119,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
type: '',
|
||||
data: []
|
||||
})
|
||||
const process = ref('2')
|
||||
const process = ref('')
|
||||
const route = useRoute()
|
||||
const { proxy } = useCurrentInstance()
|
||||
const menuCollapse = ref(false)
|
||||
@@ -238,12 +238,16 @@ const filterNode = (value: string, data: any, node: any) => {
|
||||
}
|
||||
}
|
||||
function filterProcess(nodes: any) {
|
||||
if (process.value == '') {
|
||||
return nodes
|
||||
}
|
||||
return nodes
|
||||
.map(node => {
|
||||
// 递归处理子节点
|
||||
const children = node.children ? filterProcess(node.children) : []
|
||||
|
||||
// 如果当前节点的process=4,或者有子节点满足条件,则保留当前节点
|
||||
|
||||
if (node.process == process.value || children.length > 0) {
|
||||
return {
|
||||
...node,
|
||||
|
||||
Reference in New Issue
Block a user