* fix: 修改导入图标

* fix: 修改导入图标
This commit is contained in:
qiaochuLei 2023-11-21 10:52:05 +08:00 committed by GitHub
parent f61630df8f
commit c3195997a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 59 additions and 56 deletions

View File

@ -60,7 +60,7 @@ const formItemContext = Form.useInjectFormItemContext()
const props = defineProps({
value: {
type: Array,
default: () => [{}]
default: () => []
}
})

View File

@ -46,7 +46,8 @@
placeholder="请输入字符串长度" :precision="0" :controls="false" :maxlength="64" :disabled="disabled" />
</j-form-item>
<j-form-item v-if="form.configuration.type == 'Bool'" label="位偏移量bit" :name="['configuration', 'bits']" :rules="{
<j-form-item v-if="form.configuration.type == 'Bool'" label="位偏移量bit" :name="['configuration', 'bits']"
:rules="{
required: true,
message: '请输入0~7之间的正整数',
trigger: 'blur',
@ -116,6 +117,9 @@
<j-checkbox value="changedOnly">只推送变化的数据</j-checkbox>
</j-checkbox-group>
</j-form-item>
<j-form-item label="说明" name="description">
<j-textarea placeholder="请输入说明" v-model:value="form.description" :maxlength="200" :rows="3" showCount />
</j-form-item>
</j-form>
<j-modal title="采集频率" :visible="intervalRef.visible" @cancel="handleCancelInterval" @ok="handleInterval">
<j-form ref="formRef2" name="virtual-form" layout="vertical" :model="intervalRef">
@ -127,6 +131,7 @@
</j-form-item>
</j-form>
</j-modal>
<template #footer>
<j-button key="back" @click="handleCancel">取消</j-button>
<PermissionButton key="submit" type="primary" :loading="loading" @click="handleOk" style="margin-left: 8px"
@ -296,13 +301,15 @@ const handleCancel = () => {
const Area = (_: any, value: any): Promise<any> =>
new Promise(async (resolve, reject) => {
console.log('value',value)
if(value.length === 0){
if (!value) {
return resolve('')
}else if(value.length === 1){
}
if (value?.length === 0) {
return resolve('')
} else if (value?.length === 1) {
return value[0].value && value[0].termType ? resolve('') : reject('请配置点位死区');
} else {
if(value[0].column === 'currentValue'){
if (value?.[0].column === 'currentValue') {
// value.forEach((item:any) => {
// if(item.termType && item.value){
// return resolve('')
@ -321,6 +328,7 @@ const Area = (_: any, value: any): Promise<any> =>
}
});
}
}
});
@ -330,6 +338,7 @@ onMounted(() => {
if (props.data.accessModes?.length !== 0) {
form.value.accessModes = props.data.accessModes?.map((item: any) => item.value)
}
console.log(props.data.configuration, 123)
})

View File

@ -18,16 +18,16 @@
</div>
</div>
<div class="importing-status" v-if="importStatus == 'importing'">
<loading-outlined />
<AIcon type="LoadingOutlined" />
正在导入
</div>
<div class="column" v-if="importStatus != 'wait'">
<p>
<check-outlined style="color: #00a4ff" />导入成功 总数量
<AIcon style="color: #00a4ff" type="CheckOutlined"/>导入成功 总数量
{{ successNumber }}
</p>
<span v-if="failNumber">
<close-outlined style="color: #e50012" />导入失败 总数量
<AIcon style="color: #e50012" type="CloseOutlined"/>导入失败 总数量
{{ failNumber }}
</span>
</div>
@ -44,12 +44,6 @@
</template>
<script lang="ts" setup>
import {
ArrowLeftOutlined,
CheckOutlined,
CloseOutlined,
LoadingOutlined,
} from '@ant-design/icons-vue';
import { FILE_UPLOAD } from '@/api/comm';
import { TOKEN_KEY, BASE_API_PATH } from '@/utils/variable';
import { LocalStore, onlyMessage } from '@/utils/comm';