Loading src/views/videoControl/pointControl/components/drawPoint.vue +2 −1 Original line number Original line Diff line number Diff line Loading @@ -78,6 +78,7 @@ </el-form> </el-form> </div> </div> <div class="left-list"> <div class="left-list"> <div class="form-title">算法列表</div> <el-table <el-table :data=" :data=" unref(algorithmManage.form).aiRegionalLocationList || unref(algorithmManage.form).aiRegionalLocationList || Loading Loading @@ -232,10 +233,10 @@ function handleDeviceChange(e, index) { function submit() { function submit() { let algorithms = []; let algorithms = []; algorithmManage.form.value.runningState = '0'; if (algorithmManage.form.value.id) { if (algorithmManage.form.value.id) { algorithms = unref(algorithmManage.form).aiRegionalLocationList; algorithms = unref(algorithmManage.form).aiRegionalLocationList; } else { } else { algorithmManage.form.value.runningState = 0; unref(aiAlgorithm.list).forEach((val) => { unref(aiAlgorithm.list).forEach((val) => { algorithms.push({ algorithms.push({ algorithmId: val.id, algorithmId: val.id, Loading src/views/videoControl/pointControl/hooks/index.js +10 −4 Original line number Original line Diff line number Diff line import { onMounted, ref, watch } from "vue"; import { onMounted, ref, watch } from "vue"; import request from "@/utils/request"; import request from "@/utils/request"; import { ElMessageBox } from "element-plus"; import { ElMessageBox } from "element-plus"; function useIndex(apis, callback) { function useIndex(apis, callback, listReady, immList = true ) { const visible = ref(false); const visible = ref(false); const search = ref({}); const search = ref({}); const form = ref({ const form = ref({ Loading Loading @@ -50,7 +50,7 @@ function useIndex(apis, callback) { }); }); }); }); } } function getList(params) { function getList(params, isFirst) { request({ request({ url: apis.list, url: apis.list, method: "get", method: "get", Loading @@ -58,6 +58,9 @@ function useIndex(apis, callback) { }).then((res) => { }).then((res) => { list.value = res.data || res.rows; list.value = res.data || res.rows; page.value.total = res.total; page.value.total = res.total; if (isFirst) { listReady && listReady(res.data); } }); }); } } function getDetail(id) { function getDetail(id) { Loading Loading @@ -107,8 +110,8 @@ function useIndex(apis, callback) { visible.value = false; visible.value = false; } } onMounted(() => { onMounted(() => { if (apis.list) { if (apis.list && immList) { getList(); getList({}, true); } } }); }); Loading @@ -125,7 +128,10 @@ function useIndex(apis, callback) { toSubmit, toSubmit, getList, getList, toOpen, toOpen, search, }; }; } } export { useIndex }; export { useIndex }; src/views/videoControl/pointControl/index.vue +31 −9 Original line number Original line Diff line number Diff line Loading @@ -10,13 +10,13 @@ <el-col :xs="0" :sm="2" :md="3" :lg="4"> <el-col :xs="0" :sm="2" :md="3" :lg="4"> <el-card class="left-list"> <el-card class="left-list"> <div class="head-container"> <div class="head-container"> <el-input <!-- <el-input --> v-model="deptName" <!-- v-model="deptName" --> placeholder="请输入" <!-- placeholder="请输入" --> clearable <!-- clearable --> prefix-icon="Search" <!-- prefix-icon="Search" --> style="margin-bottom: 20px" <!-- style="margin-bottom: 20px" --> /> <!-- /> --> </div> </div> <div class="head-container"> <div class="head-container"> <el-tree <el-tree Loading Loading @@ -123,9 +123,10 @@ <!-- }}</el-tag --> <!-- }}</el-tag --> <!-- > --> <!-- > --> <el-switch <el-switch v-model:value="scope.row.runningState" v-model="scope.row.runningState" active-value="0" active-value="0" inactive-value="1" inactive-value="1" @change="(e)=>changeState(scope.row, e)" /> /> </template> </template> </el-table-column> </el-table-column> Loading Loading @@ -356,6 +357,11 @@ const areaManger = useIndex( }, }, ({ data }) => { ({ data }) => { data.parents = data.regionPath.split(",").map((x) => Number(x)); data.parents = data.regionPath.split(",").map((x) => Number(x)); }, (data) => { algorithmManage.form.value.regionalId = data[0].id; algorithmManage.search.value.regionalId = data[0].id; algorithmManage.getList() } } ); ); Loading @@ -367,7 +373,9 @@ const algorithmManage = useIndex( delete: "/yunshou/aiRegionalLocation/", delete: "/yunshou/aiRegionalLocation/", detail: "/yunshou/aiRegionalLocation/", detail: "/yunshou/aiRegionalLocation/", }, }, ({ data }) => {} ({ data }) => {}, ()=>{}, false ); ); function submitAreaForm(e) { function submitAreaForm(e) { const { form } = areaManger; const { form } = areaManger; Loading @@ -382,9 +390,23 @@ function submitAreaForm(e) { } } function handleNodeClick(e) { function handleNodeClick(e) { algorithmManage.form.value.regionalId = e.id; algorithmManage.form.value.regionalId = e.id; algorithmManage.search.value.regionalId = e.id; areaManger.form.value.id = e.id; areaManger.form.value.id = e.id; algorithmManage.getList({ regionalId: e.id }); algorithmManage.getList({ regionalId: e.id }); } } function changeState(data, e) { request({ url:'/yunshou/aiRegionalLocation/updateRunningState', method:'POST', data:{ id:data.id, runningState:e } }).then(()=>{ algorithmManage.getList({regionalId:data.regionalId}) }) } </script> </script> <style scoped lang="scss"> <style scoped lang="scss"> Loading vite.config.js +2 −2 Original line number Original line Diff line number Diff line Loading @@ -31,8 +31,8 @@ export default defineConfig(({ mode, command }) => { proxy: { proxy: { // https://cn.vitejs.dev/config/#server-proxy // https://cn.vitejs.dev/config/#server-proxy '/dev-api': { '/dev-api': { target: 'http://192.168.4.206:80/ai', // target: 'http://192.168.4.206:80/ai', // target:'http://192.168.14.43:8111/ai', target:'http://192.168.14.43:8111/ai', changeOrigin: true, changeOrigin: true, rewrite: (p) => p.replace(/^\/dev-api/, '') rewrite: (p) => p.replace(/^\/dev-api/, '') } } Loading Loading
src/views/videoControl/pointControl/components/drawPoint.vue +2 −1 Original line number Original line Diff line number Diff line Loading @@ -78,6 +78,7 @@ </el-form> </el-form> </div> </div> <div class="left-list"> <div class="left-list"> <div class="form-title">算法列表</div> <el-table <el-table :data=" :data=" unref(algorithmManage.form).aiRegionalLocationList || unref(algorithmManage.form).aiRegionalLocationList || Loading Loading @@ -232,10 +233,10 @@ function handleDeviceChange(e, index) { function submit() { function submit() { let algorithms = []; let algorithms = []; algorithmManage.form.value.runningState = '0'; if (algorithmManage.form.value.id) { if (algorithmManage.form.value.id) { algorithms = unref(algorithmManage.form).aiRegionalLocationList; algorithms = unref(algorithmManage.form).aiRegionalLocationList; } else { } else { algorithmManage.form.value.runningState = 0; unref(aiAlgorithm.list).forEach((val) => { unref(aiAlgorithm.list).forEach((val) => { algorithms.push({ algorithms.push({ algorithmId: val.id, algorithmId: val.id, Loading
src/views/videoControl/pointControl/hooks/index.js +10 −4 Original line number Original line Diff line number Diff line import { onMounted, ref, watch } from "vue"; import { onMounted, ref, watch } from "vue"; import request from "@/utils/request"; import request from "@/utils/request"; import { ElMessageBox } from "element-plus"; import { ElMessageBox } from "element-plus"; function useIndex(apis, callback) { function useIndex(apis, callback, listReady, immList = true ) { const visible = ref(false); const visible = ref(false); const search = ref({}); const search = ref({}); const form = ref({ const form = ref({ Loading Loading @@ -50,7 +50,7 @@ function useIndex(apis, callback) { }); }); }); }); } } function getList(params) { function getList(params, isFirst) { request({ request({ url: apis.list, url: apis.list, method: "get", method: "get", Loading @@ -58,6 +58,9 @@ function useIndex(apis, callback) { }).then((res) => { }).then((res) => { list.value = res.data || res.rows; list.value = res.data || res.rows; page.value.total = res.total; page.value.total = res.total; if (isFirst) { listReady && listReady(res.data); } }); }); } } function getDetail(id) { function getDetail(id) { Loading Loading @@ -107,8 +110,8 @@ function useIndex(apis, callback) { visible.value = false; visible.value = false; } } onMounted(() => { onMounted(() => { if (apis.list) { if (apis.list && immList) { getList(); getList({}, true); } } }); }); Loading @@ -125,7 +128,10 @@ function useIndex(apis, callback) { toSubmit, toSubmit, getList, getList, toOpen, toOpen, search, }; }; } } export { useIndex }; export { useIndex };
src/views/videoControl/pointControl/index.vue +31 −9 Original line number Original line Diff line number Diff line Loading @@ -10,13 +10,13 @@ <el-col :xs="0" :sm="2" :md="3" :lg="4"> <el-col :xs="0" :sm="2" :md="3" :lg="4"> <el-card class="left-list"> <el-card class="left-list"> <div class="head-container"> <div class="head-container"> <el-input <!-- <el-input --> v-model="deptName" <!-- v-model="deptName" --> placeholder="请输入" <!-- placeholder="请输入" --> clearable <!-- clearable --> prefix-icon="Search" <!-- prefix-icon="Search" --> style="margin-bottom: 20px" <!-- style="margin-bottom: 20px" --> /> <!-- /> --> </div> </div> <div class="head-container"> <div class="head-container"> <el-tree <el-tree Loading Loading @@ -123,9 +123,10 @@ <!-- }}</el-tag --> <!-- }}</el-tag --> <!-- > --> <!-- > --> <el-switch <el-switch v-model:value="scope.row.runningState" v-model="scope.row.runningState" active-value="0" active-value="0" inactive-value="1" inactive-value="1" @change="(e)=>changeState(scope.row, e)" /> /> </template> </template> </el-table-column> </el-table-column> Loading Loading @@ -356,6 +357,11 @@ const areaManger = useIndex( }, }, ({ data }) => { ({ data }) => { data.parents = data.regionPath.split(",").map((x) => Number(x)); data.parents = data.regionPath.split(",").map((x) => Number(x)); }, (data) => { algorithmManage.form.value.regionalId = data[0].id; algorithmManage.search.value.regionalId = data[0].id; algorithmManage.getList() } } ); ); Loading @@ -367,7 +373,9 @@ const algorithmManage = useIndex( delete: "/yunshou/aiRegionalLocation/", delete: "/yunshou/aiRegionalLocation/", detail: "/yunshou/aiRegionalLocation/", detail: "/yunshou/aiRegionalLocation/", }, }, ({ data }) => {} ({ data }) => {}, ()=>{}, false ); ); function submitAreaForm(e) { function submitAreaForm(e) { const { form } = areaManger; const { form } = areaManger; Loading @@ -382,9 +390,23 @@ function submitAreaForm(e) { } } function handleNodeClick(e) { function handleNodeClick(e) { algorithmManage.form.value.regionalId = e.id; algorithmManage.form.value.regionalId = e.id; algorithmManage.search.value.regionalId = e.id; areaManger.form.value.id = e.id; areaManger.form.value.id = e.id; algorithmManage.getList({ regionalId: e.id }); algorithmManage.getList({ regionalId: e.id }); } } function changeState(data, e) { request({ url:'/yunshou/aiRegionalLocation/updateRunningState', method:'POST', data:{ id:data.id, runningState:e } }).then(()=>{ algorithmManage.getList({regionalId:data.regionalId}) }) } </script> </script> <style scoped lang="scss"> <style scoped lang="scss"> Loading
vite.config.js +2 −2 Original line number Original line Diff line number Diff line Loading @@ -31,8 +31,8 @@ export default defineConfig(({ mode, command }) => { proxy: { proxy: { // https://cn.vitejs.dev/config/#server-proxy // https://cn.vitejs.dev/config/#server-proxy '/dev-api': { '/dev-api': { target: 'http://192.168.4.206:80/ai', // target: 'http://192.168.4.206:80/ai', // target:'http://192.168.14.43:8111/ai', target:'http://192.168.14.43:8111/ai', changeOrigin: true, changeOrigin: true, rewrite: (p) => p.replace(/^\/dev-api/, '') rewrite: (p) => p.replace(/^\/dev-api/, '') } } Loading