Merge branch 'dev' into dev-dictionary

This commit is contained in:
XieYongHong 2023-10-26 16:28:43 +08:00
commit 67309da698
10 changed files with 23 additions and 18 deletions

View File

@ -50,7 +50,7 @@
<template #footer> <template #footer>
<j-space> <j-space>
<j-button @click="handleCancel">取消</j-button> <j-button @click="handleCancel">取消</j-button>
<j-button :disabled="_disabled" @click="handleOk" type="primary">确定</j-button> <j-button @click="handleOk" type="primary">确定</j-button>
</j-space> </j-space>
</template> </template>
</j-modal> </j-modal>
@ -123,13 +123,14 @@ const getAllCrud = () => {
} }
watch(() => _value.value, () => { // watch(() => _value.value, () => {
_disabled.value = true // console.log(_value.value)
}) // _disabled.value = true
// })
const onSuccess = (bool: boolean) => { // const onSuccess = (bool: boolean) => {
_disabled.value = bool; // _disabled.value = bool;
} // }
getAllCrud() getAllCrud()
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

View File

@ -5,6 +5,7 @@
:dataSource="modelRef.dataSource" :dataSource="modelRef.dataSource"
:columns="FormTableColumns" :columns="FormTableColumns"
:scroll="{ y: 580 }" :scroll="{ y: 580 }"
:pagination="false"
> >
<template #headerCell="{ column }"> <template #headerCell="{ column }">
<template <template
@ -308,7 +309,6 @@ watch(
() => props.data, () => props.data,
(value, preValue) => { (value, preValue) => {
modelRef.dataSource = value; modelRef.dataSource = value;
// //
const vlength = value.length, const vlength = value.length,
plength = preValue.length; plength = preValue.length;

View File

@ -13,7 +13,7 @@
v-if="myValue != 'manual' && !showReset" v-if="myValue != 'manual' && !showReset"
:bodyStyle="{ :bodyStyle="{
width: '450px', width: '450px',
height: myValue === 'rule' ? '300px' : '80px', height: myValue === 'rule' ? '300px' : '90px',
}" }"
:get-popup-container="(node) => fullRef || node" :get-popup-container="(node) => fullRef || node"
placement="bottomRight" placement="bottomRight"
@ -294,7 +294,9 @@ onMounted(()=>{
item === props.value?.id ? showReset.value = true : '' item === props.value?.id ? showReset.value = true : ''
}) })
} }
if(isNoCommunity && myValue.value === 'rule'){
handleSearch() handleSearch()
}
}) })
</script> </script>

View File

@ -112,7 +112,7 @@ const codecs = ref<{ id: string; name: string }[]>()
const routeChange = async (id: string) => { const routeChange = async (id: string) => {
const res = await getCodecs() const res = await getCodecs()
if (res.status === 200) { if (res.status === 200) {
codecs.value = [{ id: 'jetlinks', name: 'jetlinks' }].concat(res.result) codecs.value = [{ id: 'jetlinks', name: '标准物模型' }].concat(res.result)
} }
if (props.type === 'device' && id) { if (props.type === 'device' && id) {
detail(id as string).then((resp) => { detail(id as string).then((resp) => {

View File

@ -1285,7 +1285,7 @@ const changeType = (value: string) => {
if (value !== 'MQTT_CLIENT') { if (value !== 'MQTT_CLIENT') {
const { configuration } = dynamicValidateForm.cluster[0]; const { configuration } = dynamicValidateForm.cluster[0];
value && (configuration.host = '0.0.0.0'); value && (configuration.host = '0.0.0.0');
}else{ }else if(isNoCommunity){
formData.value.shareCluster = false formData.value.shareCluster = false
changeShareCluster(formData.value.shareCluster) changeShareCluster(formData.value.shareCluster)
} }

View File

@ -80,7 +80,7 @@
" "
> >
<j-form-item <j-form-item
label="webHook" label="WebHook"
v-bind="validateInfos['configuration.url']" v-bind="validateInfos['configuration.url']"
:rules='[{ max: 64, message: "最多可输入64个字符" }]' :rules='[{ max: 64, message: "最多可输入64个字符" }]'
> >
@ -88,7 +88,7 @@
v-model:value=" v-model:value="
formData.configuration.url formData.configuration.url
" "
placeholder="请输入webHook" placeholder="请输入WebHook"
/> />
</j-form-item> </j-form-item>
</template> </template>
@ -447,7 +447,7 @@ const formRules = ref({
], ],
// webhook // webhook
'configuration.url': [ 'configuration.url': [
{ required: true, message: '请输入Webhook', trigger: 'blur' }, { required: true, message: '请输入WebHook', trigger: 'blur' },
// { // {
// pattern: // pattern:
// /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[j-z]{2,6}\/?/, // /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[j-z]{2,6}\/?/,

View File

@ -220,7 +220,7 @@
) )
" "
/> />
webhook WebHook
</span> </span>
发送 发送
<span>{{ <span>{{

View File

@ -17,6 +17,7 @@
<div <div
class="child-item-left-auth" class="child-item-left-auth"
:class="{ disabled: !checked }" :class="{ disabled: !checked }"
v-if="isNoCommunity"
> >
<j-tooltip> <j-tooltip>
<template #title> <template #title>
@ -163,6 +164,7 @@ import { Modal, Checkbox } from 'jetlinks-ui-components';
import { usePermissionStore } from '@/store/permission'; import { usePermissionStore } from '@/store/permission';
import { LocalStore } from '@/utils/comm'; import { LocalStore } from '@/utils/comm';
import { useUserInfo } from '@/store/userInfo'; import { useUserInfo } from '@/store/userInfo';
import { isNoCommunity } from '@/utils/utils';
const props = defineProps({ const props = defineProps({
data: { data: {

View File

@ -191,7 +191,7 @@ const form = reactive({
else { else {
const resp: any = await checkId_api({ id }); const resp: any = await checkId_api({ id });
if (resp.result.passed) return Promise.resolve(); if (resp.result.passed) return Promise.resolve();
else return Promise.reject(resp.result.reason); else return Promise.reject("标识重复");
} }
}, },
}, },