This commit is contained in:
parent
1cfc9e0841
commit
a8b982f32c
@ -16,7 +16,7 @@ server {
|
|||||||
|
|
||||||
location /api/v1/pushers {
|
location /api/v1/pushers {
|
||||||
resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS
|
resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS
|
||||||
proxy_pass http://ht-watcher:8080;
|
proxy_pass http://pushers:8080;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /api/v1/watchers {
|
location /api/v1/watchers {
|
||||||
|
@ -118,6 +118,7 @@ const cleanAddModal=()=>{
|
|||||||
remark:'',
|
remark:'',
|
||||||
option: {}
|
option: {}
|
||||||
}
|
}
|
||||||
|
addModal.visible = false
|
||||||
addModal.formItems = []
|
addModal.formItems = []
|
||||||
formRef.value.clearValidate()
|
formRef.value.clearValidate()
|
||||||
}
|
}
|
||||||
|
@ -24,9 +24,9 @@
|
|||||||
<template v-else-if="column.key === 'updatedAt'">
|
<template v-else-if="column.key === 'updatedAt'">
|
||||||
<span>{{moment(record.updatedAt).format('YYYY-MM-DD HH:mm:ss')}}</span>
|
<span>{{moment(record.updatedAt).format('YYYY-MM-DD HH:mm:ss')}}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.key === 'pusherIds'">
|
<template v-else-if="column.key === 'pushers'">
|
||||||
<template v-if="record.pusherIds" v-for="id in record.pusherIds">
|
<template v-if="record.pushers.length>0" v-for="id in record.pushers">
|
||||||
<a-tag :bordered="false" color="processing">{{pusher.list.find(p =>p.id === id)?.name}}</a-tag>
|
<a-tag :bordered="false" color="processing" v-for="pusher in record.pushers">{{pusher.name}}</a-tag>
|
||||||
</template>
|
</template>
|
||||||
<span v-else>-</span>
|
<span v-else>-</span>
|
||||||
</template>
|
</template>
|
||||||
@ -52,14 +52,15 @@
|
|||||||
<a-form-item label="ID" name="pid" :rules="[{ required: true, message: '请填写商品id' }]">
|
<a-form-item label="ID" name="pid" :rules="[{ required: true, message: '请填写商品id' }]">
|
||||||
<a-input v-model:value="addModal.data.pid" />
|
<a-input v-model:value="addModal.data.pid" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="推送" name="pusherIds" :rules="[{ required: true, message: '请选择通知推送' }]">
|
<a-form-item label="推送" name="pushers" :rules="[{ required: true, message: '请选择通知推送' }]">
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="addModal.data.pusherIds"
|
v-model:value="pushersComputed"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
@dropdown-visible-change="getPushers"
|
@dropdown-visible-change="getPushers"
|
||||||
placeholder="请选择通知推送" :fieldNames="{label:'name',value:'id'}"
|
placeholder="请选择通知推送"
|
||||||
:options="pusher.list"
|
>
|
||||||
></a-select>
|
<a-select-option v-for="p in pusher.list" :value="p.id">{{p.name}}</a-select-option>
|
||||||
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="备注" name="remark">
|
<a-form-item label="备注" name="remark">
|
||||||
<a-textarea v-model:value="addModal.data.remark" />
|
<a-textarea v-model:value="addModal.data.remark" />
|
||||||
@ -70,7 +71,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import {h, onMounted, reactive, ref} from "vue";
|
import {computed, h, onMounted, reactive, ref} from "vue";
|
||||||
import {ListWatchers, CreateWatcher, DeleteWatcher, StartWatcher, StopWatcher} from "@/api/watcher.js";
|
import {ListWatchers, CreateWatcher, DeleteWatcher, StartWatcher, StopWatcher} from "@/api/watcher.js";
|
||||||
import { LoadingOutlined } from '@ant-design/icons-vue';
|
import { LoadingOutlined } from '@ant-design/icons-vue';
|
||||||
import {message, Modal} from 'ant-design-vue';
|
import {message, Modal} from 'ant-design-vue';
|
||||||
@ -127,17 +128,22 @@ const addModal = reactive({
|
|||||||
data: {
|
data: {
|
||||||
pid:'',
|
pid:'',
|
||||||
remark:'',
|
remark:'',
|
||||||
pusherIds:[]
|
pushers:[]
|
||||||
},
|
},
|
||||||
loading: false
|
loading: false
|
||||||
})
|
})
|
||||||
|
const pushersComputed = computed({
|
||||||
|
get:()=>addModal.data.pushers.map(p => p.id),
|
||||||
|
set:(val)=>{
|
||||||
|
addModal.data.pushers = val.map(id=>pusher.list.find(p=> p.id===id))
|
||||||
|
}
|
||||||
|
})
|
||||||
const closeAddModal = ()=>{
|
const closeAddModal = ()=>{
|
||||||
addModal.visible = false
|
addModal.visible = false
|
||||||
addModal.data = {
|
addModal.data = {
|
||||||
pid:'',
|
pid:'',
|
||||||
remark:'',
|
remark:'',
|
||||||
pusherIds: []
|
pushers: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,20 @@ export default defineConfig({
|
|||||||
secure: false,
|
secure: false,
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
|
'/api/v1/watchers': {
|
||||||
|
target: 'https://ht-dev.timerzz.com:20443/',
|
||||||
|
// target: 'http://192.168.31.55:2280/',
|
||||||
|
changeOrigin: true,
|
||||||
|
secure: false,
|
||||||
|
ws: true,
|
||||||
|
},
|
||||||
|
'/api/v1/proxies': {
|
||||||
|
target: 'https://ht-dev.timerzz.com:20443/',
|
||||||
|
// target: 'http://192.168.31.55:2280/',
|
||||||
|
changeOrigin: true,
|
||||||
|
secure: false,
|
||||||
|
ws: true,
|
||||||
|
},
|
||||||
'/api/v1': {
|
'/api/v1': {
|
||||||
target: 'https://ht.timerzz.com:20443/',
|
target: 'https://ht.timerzz.com:20443/',
|
||||||
// target: 'http://192.168.31.55:2280/',
|
// target: 'http://192.168.31.55:2280/',
|
||||||
|
Loading…
Reference in New Issue
Block a user