parent
f61630df8f
commit
c3195997a0
|
@ -60,7 +60,7 @@ const formItemContext = Form.useInjectFormItemContext()
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: {
|
value: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => [{}]
|
default: () => []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,8 @@
|
||||||
placeholder="请输入字符串长度" :precision="0" :controls="false" :maxlength="64" :disabled="disabled" />
|
placeholder="请输入字符串长度" :precision="0" :controls="false" :maxlength="64" :disabled="disabled" />
|
||||||
</j-form-item>
|
</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,
|
required: true,
|
||||||
message: '请输入0~7之间的正整数',
|
message: '请输入0~7之间的正整数',
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
|
@ -116,6 +117,9 @@
|
||||||
<j-checkbox value="changedOnly">只推送变化的数据</j-checkbox>
|
<j-checkbox value="changedOnly">只推送变化的数据</j-checkbox>
|
||||||
</j-checkbox-group>
|
</j-checkbox-group>
|
||||||
</j-form-item>
|
</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-form>
|
||||||
<j-modal title="采集频率" :visible="intervalRef.visible" @cancel="handleCancelInterval" @ok="handleInterval">
|
<j-modal title="采集频率" :visible="intervalRef.visible" @cancel="handleCancelInterval" @ok="handleInterval">
|
||||||
<j-form ref="formRef2" name="virtual-form" layout="vertical" :model="intervalRef">
|
<j-form ref="formRef2" name="virtual-form" layout="vertical" :model="intervalRef">
|
||||||
|
@ -127,6 +131,7 @@
|
||||||
</j-form-item>
|
</j-form-item>
|
||||||
</j-form>
|
</j-form>
|
||||||
</j-modal>
|
</j-modal>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<j-button key="back" @click="handleCancel">取消</j-button>
|
<j-button key="back" @click="handleCancel">取消</j-button>
|
||||||
<PermissionButton key="submit" type="primary" :loading="loading" @click="handleOk" style="margin-left: 8px"
|
<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> =>
|
const Area = (_: any, value: any): Promise<any> =>
|
||||||
new Promise(async (resolve, reject) => {
|
new Promise(async (resolve, reject) => {
|
||||||
console.log('value',value)
|
if (!value) {
|
||||||
if(value.length === 0){
|
|
||||||
return resolve('')
|
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('请配置点位死区');
|
return value[0].value && value[0].termType ? resolve('') : reject('请配置点位死区');
|
||||||
} else {
|
} else {
|
||||||
if(value[0].column === 'currentValue'){
|
if (value?.[0].column === 'currentValue') {
|
||||||
// value.forEach((item:any) => {
|
// value.forEach((item:any) => {
|
||||||
// if(item.termType && item.value){
|
// if(item.termType && item.value){
|
||||||
// return resolve('')
|
// return resolve('')
|
||||||
|
@ -321,6 +328,7 @@ const Area = (_: any, value: any): Promise<any> =>
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -330,6 +338,7 @@ onMounted(() => {
|
||||||
if (props.data.accessModes?.length !== 0) {
|
if (props.data.accessModes?.length !== 0) {
|
||||||
form.value.accessModes = props.data.accessModes?.map((item: any) => item.value)
|
form.value.accessModes = props.data.accessModes?.map((item: any) => item.value)
|
||||||
}
|
}
|
||||||
|
console.log(props.data.configuration, 123)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,16 +18,16 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="importing-status" v-if="importStatus == 'importing'">
|
<div class="importing-status" v-if="importStatus == 'importing'">
|
||||||
<loading-outlined />
|
<AIcon type="LoadingOutlined" />
|
||||||
正在导入
|
正在导入
|
||||||
</div>
|
</div>
|
||||||
<div class="column" v-if="importStatus != 'wait'">
|
<div class="column" v-if="importStatus != 'wait'">
|
||||||
<p>
|
<p>
|
||||||
<check-outlined style="color: #00a4ff" />导入成功 总数量
|
<AIcon style="color: #00a4ff" type="CheckOutlined"/>导入成功 总数量
|
||||||
{{ successNumber }}
|
{{ successNumber }}
|
||||||
</p>
|
</p>
|
||||||
<span v-if="failNumber">
|
<span v-if="failNumber">
|
||||||
<close-outlined style="color: #e50012" />导入失败 总数量
|
<AIcon style="color: #e50012" type="CloseOutlined"/>导入失败 总数量
|
||||||
{{ failNumber }}
|
{{ failNumber }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -44,12 +44,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {
|
|
||||||
ArrowLeftOutlined,
|
|
||||||
CheckOutlined,
|
|
||||||
CloseOutlined,
|
|
||||||
LoadingOutlined,
|
|
||||||
} from '@ant-design/icons-vue';
|
|
||||||
import { FILE_UPLOAD } from '@/api/comm';
|
import { FILE_UPLOAD } from '@/api/comm';
|
||||||
import { TOKEN_KEY, BASE_API_PATH } from '@/utils/variable';
|
import { TOKEN_KEY, BASE_API_PATH } from '@/utils/variable';
|
||||||
import { LocalStore, onlyMessage } from '@/utils/comm';
|
import { LocalStore, onlyMessage } from '@/utils/comm';
|
||||||
|
|
Loading…
Reference in New Issue