fix:修改bug,并联调接口
This commit is contained in:
18
package-lock.json
generated
18
package-lock.json
generated
@@ -12031,7 +12031,7 @@
|
|||||||
},
|
},
|
||||||
"sortablejs": {
|
"sortablejs": {
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.15.0.tgz",
|
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.15.0.tgz",
|
||||||
"integrity": "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w=="
|
"integrity": "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w=="
|
||||||
},
|
},
|
||||||
"source-list-map": {
|
"source-list-map": {
|
||||||
@@ -13705,7 +13705,7 @@
|
|||||||
},
|
},
|
||||||
"vue-loader-v16": {
|
"vue-loader-v16": {
|
||||||
"version": "npm:vue-loader@16.8.3",
|
"version": "npm:vue-loader@16.8.3",
|
||||||
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
|
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
|
||||||
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
|
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
@@ -13717,7 +13717,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ansi-styles": {
|
"ansi-styles": {
|
||||||
"version": "4.3.0",
|
"version": "4.3.0",
|
||||||
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
@@ -13727,7 +13727,7 @@
|
|||||||
},
|
},
|
||||||
"chalk": {
|
"chalk": {
|
||||||
"version": "4.1.2",
|
"version": "4.1.2",
|
||||||
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
@@ -13738,7 +13738,7 @@
|
|||||||
},
|
},
|
||||||
"color-convert": {
|
"color-convert": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
@@ -13748,21 +13748,21 @@
|
|||||||
},
|
},
|
||||||
"color-name": {
|
"color-name": {
|
||||||
"version": "1.1.4",
|
"version": "1.1.4",
|
||||||
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"has-flag": {
|
"has-flag": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"loader-utils": {
|
"loader-utils": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
|
||||||
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
|
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
@@ -13774,7 +13774,7 @@
|
|||||||
},
|
},
|
||||||
"supports-color": {
|
"supports-color": {
|
||||||
"version": "7.2.0",
|
"version": "7.2.0",
|
||||||
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
|
|||||||
@@ -44,3 +44,11 @@ export function getNullDealConfig(params) {
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
/* 答卷标记取消 */
|
||||||
|
export function heads(params) {
|
||||||
|
return request({
|
||||||
|
url: `/console/surveys/${params.sn}/answers/heads`,
|
||||||
|
method: 'GET',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -127,8 +127,8 @@ const opChange = (e) => {
|
|||||||
}
|
}
|
||||||
const dataList = ref([
|
const dataList = ref([
|
||||||
// {value:'0',label:'添加数据'},
|
// {value:'0',label:'添加数据'},
|
||||||
{ value: '1', label: '导入数据' }
|
// { value: '1', label: '导入数据' }
|
||||||
//{value:'2',label:'导出数据'},
|
{ value: '2', label: '导出数据' }
|
||||||
])
|
])
|
||||||
// 添加数据 导入数据 导出数据
|
// 添加数据 导入数据 导出数据
|
||||||
const dataChange = (e) => {
|
const dataChange = (e) => {
|
||||||
|
|||||||
@@ -1,18 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<transfer
|
<transfer
|
||||||
|
v-if="!loading"
|
||||||
:data-source="mockData"
|
:data-source="mockData"
|
||||||
:show-search="false"
|
:show-search="false"
|
||||||
:show-select-all="false"
|
:show-select-all="false"
|
||||||
|
ref="transfer"
|
||||||
:list-style="{
|
:list-style="{
|
||||||
width: '250px',
|
width: 'calc(50% - 20px)',
|
||||||
height: '300px'
|
height: '100%',
|
||||||
|
background: '#ffffff'
|
||||||
}"
|
}"
|
||||||
|
:titles="['选择变量', '检验变量列表 (变量数≥2)']"
|
||||||
:target-keys="targetKeys"
|
:target-keys="targetKeys"
|
||||||
:render="(item) => `${item.title}-${item.description}`"
|
@change="handleChange"
|
||||||
@change="handleChange">
|
:lazy="false">
|
||||||
<!-- <template #footer>
|
<!-- <template #footer>
|
||||||
<a-button size="small" style="float: right; margin: 5px" @click="getMock">reload</a-button>
|
<a-button size="small" style="float: right; margin: 5px" @click="getMock">reload</a-button>
|
||||||
</template> -->
|
</template> -->
|
||||||
|
<template #render="item">
|
||||||
|
<span class="custom-item">
|
||||||
|
{{ item.title }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template #notFoundContent>
|
<template #notFoundContent>
|
||||||
<span>没数据</span>
|
<span>没数据</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -21,51 +31,162 @@
|
|||||||
<script>
|
<script>
|
||||||
import { defineComponent, ref, onMounted } from 'vue'
|
import { defineComponent, ref, onMounted } from 'vue'
|
||||||
import { Transfer } from 'ant-design-vue'
|
import { Transfer } from 'ant-design-vue'
|
||||||
|
import { heads } from '@/api/qc'
|
||||||
|
import Sortable from 'sortablejs'
|
||||||
|
|
||||||
|
import { useRoute } from 'vue-router'
|
||||||
|
import { fa } from 'element-plus/lib/locale'
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
Transfer
|
Transfer
|
||||||
},
|
},
|
||||||
setup() {
|
setup(props, content) {
|
||||||
const mockData = ref([])
|
const mockData = ref([])
|
||||||
const targetKeys = ref([])
|
const targetKeys = ref([])
|
||||||
|
const transfer = ref()
|
||||||
|
const route = useRoute()
|
||||||
|
const sn = route.query.sn
|
||||||
|
const qc_keysStr = ref(localStorage.getItem('qc_keys' + sn))
|
||||||
|
const loading = ref(false)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getMock()
|
getData()
|
||||||
})
|
})
|
||||||
|
const getData = async () => {
|
||||||
|
const data = await heads({
|
||||||
|
sn
|
||||||
|
})
|
||||||
|
|
||||||
const getMock = () => {
|
if (data) {
|
||||||
const keys = []
|
const keys = []
|
||||||
const mData = []
|
const mData = []
|
||||||
|
let qc_keys = []
|
||||||
for (let i = 0; i < 20; i++) {
|
if (qc_keysStr.value) {
|
||||||
const data = {
|
qc_keys = qc_keysStr.value.split(',')
|
||||||
key: i.toString(),
|
|
||||||
title: `content${i + 1}`,
|
|
||||||
description: `description of content${i + 1}`,
|
|
||||||
chosen: Math.random() * 2 > 1
|
|
||||||
}
|
}
|
||||||
|
let index = 0
|
||||||
if (data.chosen) {
|
for (const key in data.columns[2]) {
|
||||||
keys.push(data.key)
|
const item = data.columns[2][key]
|
||||||
|
const udata = {
|
||||||
|
key: key,
|
||||||
|
title: item.title,
|
||||||
|
description: item.title,
|
||||||
|
chosen: false
|
||||||
|
}
|
||||||
|
if (qc_keys.includes(key)) {
|
||||||
|
udata.chosen = true
|
||||||
|
keys.push(key)
|
||||||
|
}
|
||||||
|
mData.push(udata)
|
||||||
}
|
}
|
||||||
|
targetKeys.value = keys
|
||||||
mData.push(data)
|
mockData.value = mData
|
||||||
}
|
}
|
||||||
|
|
||||||
mockData.value = mData
|
|
||||||
targetKeys.value = keys
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleChange = (keys, direction, moveKeys) => {
|
const handleChange = (keys, direction, moveKeys) => {
|
||||||
targetKeys.value = keys
|
targetKeys.value = keys
|
||||||
console.log(keys, direction, moveKeys)
|
//console.log(keys, direction, moveKeys)
|
||||||
|
localStorage.setItem('qc_keys' + sn, targetKeys.value.toString())
|
||||||
|
content.emit('qc_keys', targetKeys.value.toString())
|
||||||
}
|
}
|
||||||
|
const clear = () => {
|
||||||
|
qc_keysStr.value = ''
|
||||||
|
localStorage.removeItem('qc_keys' + sn)
|
||||||
|
getData()
|
||||||
|
}
|
||||||
|
const setQcKeys = (value) => {
|
||||||
|
qc_keysStr.value = value
|
||||||
|
localStorage.setItem('qc_keys' + sn, qc_keysStr.value)
|
||||||
|
getData()
|
||||||
|
}
|
||||||
|
// const drag = (ev, option) => {
|
||||||
|
// draggingKey.value = option.key
|
||||||
|
// draggingChosen.value = option.chosen
|
||||||
|
// // showMock()
|
||||||
|
// }
|
||||||
|
// onMounted(() => {
|
||||||
|
// showMock()
|
||||||
|
// })
|
||||||
|
|
||||||
|
// const showMock = () => {
|
||||||
|
// setTimeout(() => {
|
||||||
|
// const leftPanel = transfer.value.$el.getElementsByClassName('ant-transfer-list-content')[0]
|
||||||
|
// const rightPanel = transfer.value.$el.getElementsByClassName('ant-transfer-list-content')[1]
|
||||||
|
// //const rightEl = rightPanel.getElementsByClassName('custom-item')[0]
|
||||||
|
// Sortable.create(rightPanel, {
|
||||||
|
// group: 'shared', // set both lists to same group
|
||||||
|
// animation: 150,
|
||||||
|
// onEnd: (evt) => {
|
||||||
|
// const item = undefined
|
||||||
|
// mockData.value.forEach((s, index) => {
|
||||||
|
// if (s.key == draggingKey.value) {
|
||||||
|
// mockData.value[index].chosen = false
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
|
// getMock(mockData)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// Sortable.create(leftPanel, {
|
||||||
|
// group: 'shared', // set both lists to same group
|
||||||
|
// animation: 150,
|
||||||
|
// onEnd: (evt) => {
|
||||||
|
// const item = undefined
|
||||||
|
// mockData.value.forEach((s, index) => {
|
||||||
|
// if (s.key == draggingKey.value) {
|
||||||
|
// mockData.value[index].chosen = true
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// getMock(mockData)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }, 500)
|
||||||
|
// }
|
||||||
return {
|
return {
|
||||||
mockData,
|
mockData,
|
||||||
targetKeys,
|
targetKeys,
|
||||||
handleChange,
|
handleChange,
|
||||||
getMock
|
// drag,
|
||||||
|
transfer,
|
||||||
|
loading,
|
||||||
|
clear,
|
||||||
|
setQcKeys
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.ant-transfer {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
:deep(.ant-transfer-list) {
|
||||||
|
padding: 0;
|
||||||
|
.ant-transfer-list-header {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.ant-transfer-operation) {
|
||||||
|
width: auto;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.ant-btn {
|
||||||
|
height: calc(50% - 4px);
|
||||||
|
}
|
||||||
|
.ant-btn[disabled] {
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
:deep(.ant-transfer-list-header-selected) {
|
||||||
|
span {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
:deep(.ant-transfer-list-header-title) {
|
||||||
|
position: relative;
|
||||||
|
display: block !important;
|
||||||
|
padding: 0 10px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,14 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="hearder">
|
<div class="hearder">
|
||||||
<slot>
|
<slot>
|
||||||
<i class="iconfont icon-xiangzuo-moren"></i>
|
<i class="icon iconfont" @click="router.back()"></i>
|
||||||
<span class="hearder-title">返回分析列表</span>
|
<span class="hearder-title">返回分析列表</span>
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {}
|
import { useRouter } from 'vue-router'
|
||||||
|
export default {
|
||||||
|
setup() {
|
||||||
|
const router = useRouter()
|
||||||
|
return {
|
||||||
|
router
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@@ -29,7 +37,7 @@ export default {}
|
|||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
color: #434343;
|
color: #434343;
|
||||||
}
|
}
|
||||||
.icon-xiangzuo-moren {
|
.icon {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="function-memo">
|
<div
|
||||||
|
class="function-memo"
|
||||||
|
:class="{
|
||||||
|
border: isShow
|
||||||
|
}">
|
||||||
<div class="function-memo-title">
|
<div class="function-memo-title">
|
||||||
<slot name="title"> 方法说明</slot>
|
<slot name="title" v-if="isShow"> 方法说明</slot>
|
||||||
</div>
|
</div>
|
||||||
<slot name="icon">
|
<slot name="icon">
|
||||||
<div class="function-memo-icon">
|
<div class="function-memo-icon">
|
||||||
<i class="icon iconfont" @click="hide" v-if="!isShow"></i>
|
<i class="icon iconfont" @click="hide" v-if="isShow"></i>
|
||||||
<i class="icon iconfont" @click="show" v-else></i>
|
<i class="icon iconfont" @click="show" v-else></i>
|
||||||
</div>
|
</div>
|
||||||
</slot>
|
</slot>
|
||||||
@@ -19,7 +23,7 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
isShow: {
|
isShow: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: () => false
|
default: () => true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setup(props, context) {
|
setup(props, context) {
|
||||||
@@ -44,7 +48,6 @@ export default {
|
|||||||
font-family: PingFang SC-中黑体, PingFang SC;
|
font-family: PingFang SC-中黑体, PingFang SC;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
color: rgba(0, 0, 0, 0.85);
|
color: rgba(0, 0, 0, 0.85);
|
||||||
border-bottom: 1px solid #e8e8e8;
|
|
||||||
padding: 18px 0;
|
padding: 18px 0;
|
||||||
margin: 0 18px;
|
margin: 0 18px;
|
||||||
.function-memo-icon {
|
.function-memo-icon {
|
||||||
@@ -56,4 +59,7 @@ export default {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.border {
|
||||||
|
border-bottom: 1px solid #e8e8e8;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,38 +1,43 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="not-data">
|
<div class="not-data">
|
||||||
<hearder></hearder>
|
<hearder></hearder>
|
||||||
<div class="not-data-title">无效样本处理</div>
|
<div class="not-data-title">
|
||||||
|
<div>无效样本处理</div>
|
||||||
|
<div class="rightflex1">
|
||||||
|
<a-button class="mr-10" @click="clear">重置</a-button>
|
||||||
|
<a-button type="primary" @click="handle">处理</a-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<!-- 左 -->
|
<!-- 左 -->
|
||||||
<div class="flex1 bgf">
|
<div class="flex1 bgf">
|
||||||
<notDataHearder :style="isShow ? '100px' : '100%'" v-model:isShow="isShow"></notDataHearder>
|
<notDataHearder :style="isShow ? '100px' : '100%'" v-model:isShow="isShow"></notDataHearder>
|
||||||
|
<div v-if="isShow">
|
||||||
|
<notDataHeaderTitle></notDataHeaderTitle>
|
||||||
|
<div class="function-content">无效样本此处指相同数字出现比例较高或缺失比例较高的样本</div>
|
||||||
|
<div class="function-content">无效样本处理指通过设置的无效样本判断规则来筛选样本并做标记或删除处理,是对行的操作。</div>
|
||||||
|
|
||||||
<notDataHeaderTitle></notDataHeaderTitle>
|
<notDataHeaderTitle>
|
||||||
<div class="function-content">无效样本此处指相同数字出现比例较高或缺失比例较高的样本</div>
|
<div>规则说明</div>
|
||||||
<div class="function-content">无效样本处理指通过设置的无效样本判断规则来筛选样本并做标记或删除处理,是对行的操作。</div>
|
</notDataHeaderTitle>
|
||||||
|
|
||||||
<notDataHeaderTitle>
|
<div class="function-content">前置操作作为选中变量1-4复制到检验变量列表,比例设置50%,以此为比例分别对【相同数字】和【缺失比例】两种规则进行说明如下:</div>
|
||||||
<div>规则说明</div>
|
<div class="function-content">【相同数字】</div>
|
||||||
</notDataHeaderTitle>
|
<div class="function-table">
|
||||||
|
<div class="function-content">以4个变量举例:在变量1-4范围内,相同内容出50% 及以上,筛选出样本1和样本2。</div>
|
||||||
<div class="function-content">前置操作作为选中变量1-4复制到检验变量列表,比例设置50%,以此为比例分别对【相同数字】和【缺失比例】两种规则进行说明如下:</div>
|
<a-table :pagination="false" class="function-content" size="middle" :columns="test_columns" :data-source="test_data" :rowClassName="(record, index) => (index % 2 === 1 ? 'table-striped' : null)" />
|
||||||
<div class="function-content">【相同数字】</div>
|
</div>
|
||||||
<div class="function-table">
|
<div class="function-content">【缺失比例】</div>
|
||||||
<div class="function-content">以4个变量举例:在变量1-4范围内,相同内容出50% 及以上,筛选出样本1和样本2。</div>
|
<div class="function-table">
|
||||||
<a-table :pagination="false" class="function-content" size="middle" :columns="test_columns" :data-source="test_data" :rowClassName="(record, index) => (index % 2 === 1 ? 'table-striped' : null)" />
|
<div class="function-content">以4个变量举例:在变量1-4范围内,相同内容出50% 及以上,筛选出样本1和样本2。</div>
|
||||||
</div>
|
<a-table :pagination="false" class="function-content" size="middle" :columns="test_columns" :data-source="test_data_2" :rowClassName="(record, index) => (index % 2 === 1 ? 'table-striped' : null)" />
|
||||||
<div class="function-content">【缺失比例】</div>
|
</div>
|
||||||
<div class="function-table">
|
|
||||||
<div class="function-content">以4个变量举例:在变量1-4范围内,相同内容出50% 及以上,筛选出样本1和样本2。</div>
|
|
||||||
<a-table :pagination="false" class="function-content" size="middle" :columns="test_columns" :data-source="test_data_2" :rowClassName="(record, index) => (index % 2 === 1 ? 'table-striped' : null)" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 中 -->
|
<!-- 中 -->
|
||||||
<div class="flex2 bgf">
|
|
||||||
<div>选择变量</div>
|
<Transfer ref="Transfer" @qc_keys="onQcKeys"></Transfer>
|
||||||
<div>检验变量列表(变量书≥2)</div>
|
|
||||||
<Transfer></Transfer>
|
|
||||||
</div>
|
|
||||||
<!-- 右 -->
|
<!-- 右 -->
|
||||||
<div class="flex1">
|
<div class="flex1">
|
||||||
<div class="bgf h50">
|
<div class="bgf h50">
|
||||||
@@ -41,24 +46,22 @@
|
|||||||
<template #icon> </template>
|
<template #icon> </template>
|
||||||
</notDataHearder>
|
</notDataHearder>
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox-group v-model:value="value">
|
<a-row>
|
||||||
<a-row>
|
<a-col :span="100">
|
||||||
<a-col :span="100">
|
<div class="rows-check">
|
||||||
<div class="rows-check">
|
<a-checkbox value="2" @change="changeSame" v-model:checked="uData.isSame">相同内容</a-checkbox>
|
||||||
<a-checkbox value="A"></a-checkbox>
|
≥ <a-input-number :disabled="!uData.isSame" @blur="changeSame" :max="100" v-model:value="uData.sameRatio" /> %
|
||||||
删除样本 ≥ <a-input-number :min="1" :max="100000" v-model:value="value2" /> %
|
</div>
|
||||||
</div>
|
</a-col>
|
||||||
</a-col>
|
</a-row>
|
||||||
</a-row>
|
<a-row>
|
||||||
<a-row>
|
<a-col :span="100">
|
||||||
<a-col :span="100">
|
<div class="rows-check">
|
||||||
<div class="rows-check">
|
<a-checkbox value="1" @change="changeNull" v-model:checked="uData.isNull">缺失比例</a-checkbox>
|
||||||
<a-checkbox value="B"></a-checkbox>
|
≥ <a-input-number :disabled="!uData.isNull" @blur="changeNull" :max="100" v-model:value="uData.nullRatio" /> %
|
||||||
缺失比例 ≥ <a-input-number :min="1" :max="100000" v-model:value="value2" /> %
|
</div>
|
||||||
</div>
|
</a-col>
|
||||||
</a-col>
|
</a-row>
|
||||||
</a-row>
|
|
||||||
</a-checkbox-group>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bgf h50">
|
<div class="bgf h50">
|
||||||
@@ -67,7 +70,7 @@
|
|||||||
<template #icon> </template>
|
<template #icon> </template>
|
||||||
</notDataHearder>
|
</notDataHearder>
|
||||||
<div class="rows-check">
|
<div class="rows-check">
|
||||||
<a-radio-group v-model:value="value">
|
<a-radio-group v-model:value="uData.type" @change="saveStorage">
|
||||||
<a-radio :style="radioStyle" :value="1">标记样本</a-radio>
|
<a-radio :style="radioStyle" :value="1">标记样本</a-radio>
|
||||||
<a-radio :style="radioStyle" :value="2">删除样本</a-radio>
|
<a-radio :style="radioStyle" :value="2">删除样本</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
@@ -84,6 +87,10 @@ import hearder from './components/hearder'
|
|||||||
import notDataHearder from './components/notDataHearder'
|
import notDataHearder from './components/notDataHearder'
|
||||||
import notDataHeaderTitle from './components/notDataHeaderTitle'
|
import notDataHeaderTitle from './components/notDataHeaderTitle'
|
||||||
import Transfer from './components/Transfer'
|
import Transfer from './components/Transfer'
|
||||||
|
import { getNullDealConfig, nullDeal } from '@/api/qc'
|
||||||
|
import { onMounted } from '@vue/runtime-core'
|
||||||
|
import { useRoute } from 'vue-router'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
hearder,
|
hearder,
|
||||||
@@ -92,7 +99,44 @@ export default {
|
|||||||
Transfer
|
Transfer
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const isShow = ref(true)
|
const route = useRoute()
|
||||||
|
const sn = route.query.sn
|
||||||
|
const isShow = ref(false)
|
||||||
|
const Transfer = ref()
|
||||||
|
const uData = ref({
|
||||||
|
type: 1,
|
||||||
|
sameRatio: undefined,
|
||||||
|
isSame: false,
|
||||||
|
nullRatio: undefined,
|
||||||
|
isNull: false,
|
||||||
|
variableKeys: ''
|
||||||
|
})
|
||||||
|
|
||||||
|
const getData = async () => {
|
||||||
|
const data = await getNullDealConfig({ sn: route.query.sn })
|
||||||
|
const qc_not_data = localStorage.getItem('qc_not_data' + sn)
|
||||||
|
if (qc_not_data) {
|
||||||
|
uData.value = JSON.parse(qc_not_data)
|
||||||
|
}
|
||||||
|
if (data && !qc_not_data) {
|
||||||
|
uData.value = {
|
||||||
|
...data.data,
|
||||||
|
isSame: data.data.sameRatio > 0,
|
||||||
|
isNull: data.data.nullRatio > 0,
|
||||||
|
variableKeys: data.data.variableKeys.toString()
|
||||||
|
}
|
||||||
|
Transfer.value.setQcKeys(uData.value.variableKeys)
|
||||||
|
saveStorage()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
const data = localStorage.getItem('qc_not_data' + sn)
|
||||||
|
if (data) {
|
||||||
|
uData.value = JSON.parse(data)
|
||||||
|
}
|
||||||
|
getData()
|
||||||
|
})
|
||||||
|
|
||||||
const test_columns = [
|
const test_columns = [
|
||||||
{ title: '', dataIndex: 'ben' },
|
{ title: '', dataIndex: 'ben' },
|
||||||
@@ -147,12 +191,59 @@ export default {
|
|||||||
num4: ''
|
num4: ''
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
const changeSame = () => {
|
||||||
|
debugger
|
||||||
|
if (uData.value.sameRatio <= 0 || !uData.value.sameRatio) {
|
||||||
|
uData.value.sameRatio = 70
|
||||||
|
}
|
||||||
|
saveStorage()
|
||||||
|
}
|
||||||
|
const changeNull = () => {
|
||||||
|
debugger
|
||||||
|
if (uData.value.nullRatio <= 0 || !uData.value.nullRatio) {
|
||||||
|
uData.value.nullRatio = 70
|
||||||
|
}
|
||||||
|
saveStorage()
|
||||||
|
}
|
||||||
|
const saveStorage = () => {
|
||||||
|
localStorage.setItem('qc_not_data' + sn, JSON.stringify(uData.value))
|
||||||
|
}
|
||||||
|
const onQcKeys = (value) => {
|
||||||
|
uData.value.variableKeys = value.toString()
|
||||||
|
saveStorage()
|
||||||
|
}
|
||||||
|
const clear = () => {
|
||||||
|
localStorage.removeItem('qc_not_data' + sn)
|
||||||
|
Transfer.value.clear()
|
||||||
|
uData.value = {
|
||||||
|
type: 1,
|
||||||
|
sameRatio: undefined,
|
||||||
|
isSame: false,
|
||||||
|
nullRatio: undefined,
|
||||||
|
isNull: false,
|
||||||
|
variableKeys: ''
|
||||||
|
}
|
||||||
|
saveStorage()
|
||||||
|
}
|
||||||
|
const handle = () => {
|
||||||
|
const data = nullDeal({
|
||||||
|
sn,
|
||||||
|
...uData.value
|
||||||
|
})
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
isShow,
|
isShow,
|
||||||
test_columns,
|
test_columns,
|
||||||
test_data,
|
test_data,
|
||||||
test_data_2
|
test_data_2,
|
||||||
|
uData,
|
||||||
|
changeSame,
|
||||||
|
changeNull,
|
||||||
|
onQcKeys,
|
||||||
|
saveStorage,
|
||||||
|
clear,
|
||||||
|
Transfer,
|
||||||
|
handle
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -174,6 +265,11 @@ export default {
|
|||||||
margin: 22px 32px;
|
margin: 22px 32px;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
border-left: 4px solid #70b936;
|
border-left: 4px solid #70b936;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.rightflex1 {
|
||||||
|
flex: 1;
|
||||||
|
text-align: right;
|
||||||
}
|
}
|
||||||
.flex {
|
.flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -198,7 +294,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.rows-check {
|
.rows-check {
|
||||||
margin: 25px 32px 0 32px;
|
margin: 25px 32px 0 32px;
|
||||||
min-width: 200px;
|
min-width: 220px;
|
||||||
}
|
}
|
||||||
.function-content {
|
.function-content {
|
||||||
margin: 14px 48px;
|
margin: 14px 48px;
|
||||||
@@ -222,4 +318,10 @@ export default {
|
|||||||
color: #646464;
|
color: #646464;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.h100 {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.mr-10 {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user