From e3f069b4fbb1ddcbc9f1c0832634200555789268 Mon Sep 17 00:00:00 2001
From: master <master@163.com>
Date: 星期二, 22 三月 2022 17:42:53 +0800
Subject: [PATCH] 新增采集数据相关页面
---
src/cool/modules/index.ts | 3
src/cool/modules/coalinventory/service/index.ts | 0
src/cool/modules/periodictask/components/index.ts | 0
src/cool/modules/periodictask/views/index.ts | 0
src/cool/modules/colletMetaData/pages/index.ts | 0
src/cool/modules/coalinventory/directives/index.ts | 0
src/cool/modules/deviceGroup/views/deviceGroup.vue | 95 ++++++++-
src/cool/modules/douMsg/views/douMsg.vue | 135 +++++++++++++
src/cool/modules/coalinventory/pages/index.ts | 0
src/cool/modules/colletMetaData/store/index.ts | 0
src/cool/modules/colletMetaData/components/index.ts | 0
src/cool/modules/coalinventory/store/index.ts | 0
src/cool/modules/colletMeta/service/index.ts | 0
src/cool/modules/coalinventory/views/coalinventory.vue | 5
src/cool/modules/periodictask/index.ts | 0
src/cool/modules/colletMeta/pages/index.ts | 0
src/cool/modules/colletMetaData/views/index.ts | 0
src/cool/modules/colletMeta/components/index.ts | 0
src/cool/modules/taskSetting/views/taskSetting.vue | 5
src/cool/modules/immediateTask/views/immediateTask.vue | 2
src/router/index.ts | 57 ++--
src/cool/modules/colletMeta/directives/index.ts | 0
src/cool/modules/colletMetaData/service/index.ts | 0
src/cool/modules/periodictask/pages/index.ts | 0
src/cool/modules/colletMetaData/directives/index.ts | 0
src/cool/modules/periodictask/service/index.ts | 0
src/cool/modules/colletMetaData/index.ts | 0
src/cool/modules/coalinventory/index.ts | 0
src/cool/modules/periodictask/directives/index.ts | 0
src/cool/modules/colletMeta/store/index.ts | 0
src/cool/modules/colletMeta/views/index.ts | 0
src/cool/modules/device/views/device.vue | 34 +++
src/cool/modules/colletMeta/views/colletMeta.vue | 3
src/cool/modules/colletMeta/index.ts | 0
src/cool/modules/coalinventory/components/index.ts | 0
src/cool/modules/periodictask/views/periodictask.vue | 3
/dev/null | 5
src/cool/modules/coalinventory/views/index.ts | 0
src/cool/modules/colletMetaData/views/colletMetaData.vue | 75 +++++++
src/cool/core/service/device.ts | 0
src/cool/modules/periodictask/store/index.ts | 0
src/cool/modules/base/views/menu.vue | 135 ++++++------
42 files changed, 436 insertions(+), 121 deletions(-)
diff --git a/src/cool/core/service/device.ts b/src/cool/core/service/device.ts
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/cool/core/service/device.ts
diff --git a/src/cool/modules/base/views/menu.vue b/src/cool/modules/base/views/menu.vue
index 6c72440..a760429 100644
--- a/src/cool/modules/base/views/menu.vue
+++ b/src/cool/modules/base/views/menu.vue
@@ -1,80 +1,82 @@
<template>
- <cl-crud :ref="setRefs('crud')" :on-refresh="onRefresh" @load="onLoad">
- <el-row type="flex">
- <cl-refresh-btn />
- <cl-add-btn />
- <cl-menu-quick @success="refresh()" v-if="isDev" />
- </el-row>
+ <cl-crud :ref="setRefs('crud')"
+ :on-refresh="onRefresh"
+ @load="onLoad">
+ <el-row type="flex">
+ <cl-refresh-btn />
+ <cl-add-btn />
+ <cl-menu-quick @success="refresh()"
+ v-if="isDev" />
+ </el-row>
- <el-row>
- <cl-table :ref="setRefs('table')" v-bind="table" @row-click="onRowClick">
- <!-- 鍚嶇О -->
- <template #column-name="{ scope }">
- <span>{{ scope.row.name }}</span>
- <el-tag
- v-if="!scope.row.isShow"
- size="mini"
- effect="dark"
- type="danger"
- style="margin-left: 10px"
- >闅愯棌</el-tag
- >
- </template>
+ <el-row>
+ <cl-table :ref="setRefs('table')"
+ v-bind="table"
+ @row-click="onRowClick">
+ <!-- 鍚嶇О -->
+ <template #column-name="{ scope }">
+ <span>{{ scope.row.name }}</span>
+ <el-tag v-if="!scope.row.isShow"
+ size="mini"
+ effect="dark"
+ type="danger"
+ style="margin-left: 10px">闅愯棌</el-tag>
+ </template>
- <!-- 鍥炬爣 -->
- <template #column-icon="{ scope }">
- <icon-svg :name="scope.row.icon" size="16px" style="margin-top: 5px" />
- </template>
+ <!-- 鍥炬爣 -->
+ <template #column-icon="{ scope }">
+ <icon-svg :name="scope.row.icon"
+ size="16px"
+ style="margin-top: 5px" />
+ </template>
- <!-- 鏉冮檺 -->
- <template #column-perms="{ scope }">
- <el-tag
- v-for="(item, index) in scope.row.permList"
- :key="index"
- size="mini"
- effect="dark"
- style="margin: 2px; letter-spacing: 0.5px"
- >{{ item }}</el-tag
- >
- </template>
+ <!-- 鏉冮檺 -->
+ <template #column-perms="{ scope }">
+ <el-tag v-for="(item, index) in scope.row.permList"
+ :key="index"
+ size="mini"
+ effect="dark"
+ style="margin: 2px; letter-spacing: 0.5px">{{ item }}</el-tag>
+ </template>
- <!-- 璺敱 -->
- <template #column-router="{ scope }">
- <el-link v-if="scope.row.type == 1" type="primary" :href="scope.row.router">{{
+ <!-- 璺敱 -->
+ <template #column-router="{ scope }">
+ <el-link v-if="scope.row.type == 1"
+ type="primary"
+ :href="scope.row.router">{{
scope.row.router
}}</el-link>
- <span v-else>{{ scope.row.router }}</span>
- </template>
+ <span v-else>{{ scope.row.router }}</span>
+ </template>
- <!-- 璺敱缂撳瓨 -->
- <template #column-keepAlive="{ scope }">
- <template v-if="scope.row.type == 1">
- <i v-if="scope.row.keepAlive" class="el-icon-check"></i>
- <i v-else class="el-icon-close"></i>
- </template>
- </template>
+ <!-- 璺敱缂撳瓨 -->
+ <template #column-keepAlive="{ scope }">
+ <template v-if="scope.row.type == 1">
+ <i v-if="scope.row.keepAlive"
+ class="el-icon-check"></i>
+ <i v-else
+ class="el-icon-close"></i>
+ </template>
+ </template>
- <!-- 琛屾柊澧� -->
- <template #slot-add="{ scope }">
- <el-button
- v-if="scope.row.type != 2"
- type="text"
- size="mini"
- @click="upsertAppend(scope.row)"
- >鏂板</el-button
- >
- </template>
- </cl-table>
- </el-row>
+ <!-- 琛屾柊澧� -->
+ <template #slot-add="{ scope }">
+ <el-button v-if="scope.row.type != 2"
+ type="text"
+ size="mini"
+ @click="upsertAppend(scope.row)">鏂板</el-button>
+ </template>
+ </cl-table>
+ </el-row>
- <el-row type="flex">
- <cl-flex1 />
- <cl-pagination :props="{ layout: 'total' }" />
- </el-row>
+ <el-row type="flex">
+ <cl-flex1 />
+ <cl-pagination :props="{ layout: 'total' }" />
+ </el-row>
- <!-- 缂栬緫 -->
- <cl-upsert v-bind="upsert" />
- </cl-crud>
+ <!-- 缂栬緫 -->
+ <cl-upsert v-bind="upsert" />
+ </cl-crud>
</template>
<script lang="ts">
@@ -139,6 +141,7 @@
// 鍒锋柊
function refresh() {
+ console.log("鍒锋柊鏂规硶鍐呮墦鍗�");
refs.value.crud.refresh();
}
diff --git a/src/cool/modules/cycleTask/components/index.ts b/src/cool/modules/coalinventory/components/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/components/index.ts
copy to src/cool/modules/coalinventory/components/index.ts
diff --git a/src/cool/modules/cycleTask/directives/index.ts b/src/cool/modules/coalinventory/directives/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/directives/index.ts
copy to src/cool/modules/coalinventory/directives/index.ts
diff --git a/src/cool/modules/cycleTask/index.ts b/src/cool/modules/coalinventory/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/index.ts
copy to src/cool/modules/coalinventory/index.ts
diff --git a/src/cool/modules/cycleTask/pages/index.ts b/src/cool/modules/coalinventory/pages/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/pages/index.ts
copy to src/cool/modules/coalinventory/pages/index.ts
diff --git a/src/cool/modules/cycleTask/service/index.ts b/src/cool/modules/coalinventory/service/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/service/index.ts
copy to src/cool/modules/coalinventory/service/index.ts
diff --git a/src/cool/modules/cycleTask/store/index.ts b/src/cool/modules/coalinventory/store/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/store/index.ts
copy to src/cool/modules/coalinventory/store/index.ts
diff --git a/src/cool/modules/coalinventory/views/coalinventory.vue b/src/cool/modules/coalinventory/views/coalinventory.vue
new file mode 100644
index 0000000..cebc1e8
--- /dev/null
+++ b/src/cool/modules/coalinventory/views/coalinventory.vue
@@ -0,0 +1,5 @@
+<template>
+ <div>
+ <h1>鐩樼叅璁″垝</h1>
+ </div>
+</template>
\ No newline at end of file
diff --git a/src/cool/modules/cycleTask/views/index.ts b/src/cool/modules/coalinventory/views/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/views/index.ts
copy to src/cool/modules/coalinventory/views/index.ts
diff --git a/src/cool/modules/cycleTask/components/index.ts b/src/cool/modules/colletMeta/components/index.ts
similarity index 100%
rename from src/cool/modules/cycleTask/components/index.ts
rename to src/cool/modules/colletMeta/components/index.ts
diff --git a/src/cool/modules/cycleTask/directives/index.ts b/src/cool/modules/colletMeta/directives/index.ts
similarity index 100%
rename from src/cool/modules/cycleTask/directives/index.ts
rename to src/cool/modules/colletMeta/directives/index.ts
diff --git a/src/cool/modules/cycleTask/index.ts b/src/cool/modules/colletMeta/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/index.ts
copy to src/cool/modules/colletMeta/index.ts
diff --git a/src/cool/modules/cycleTask/pages/index.ts b/src/cool/modules/colletMeta/pages/index.ts
similarity index 100%
rename from src/cool/modules/cycleTask/pages/index.ts
rename to src/cool/modules/colletMeta/pages/index.ts
diff --git a/src/cool/modules/cycleTask/service/index.ts b/src/cool/modules/colletMeta/service/index.ts
similarity index 100%
rename from src/cool/modules/cycleTask/service/index.ts
rename to src/cool/modules/colletMeta/service/index.ts
diff --git a/src/cool/modules/cycleTask/store/index.ts b/src/cool/modules/colletMeta/store/index.ts
similarity index 100%
rename from src/cool/modules/cycleTask/store/index.ts
rename to src/cool/modules/colletMeta/store/index.ts
diff --git a/src/cool/modules/colletMeta/views/colletMeta.vue b/src/cool/modules/colletMeta/views/colletMeta.vue
new file mode 100644
index 0000000..d606b2f
--- /dev/null
+++ b/src/cool/modules/colletMeta/views/colletMeta.vue
@@ -0,0 +1,3 @@
+<template>
+ <h1>妫�娴嬪厓鏁版嵁</h1>
+</template>
\ No newline at end of file
diff --git a/src/cool/modules/cycleTask/views/index.ts b/src/cool/modules/colletMeta/views/index.ts
similarity index 100%
rename from src/cool/modules/cycleTask/views/index.ts
rename to src/cool/modules/colletMeta/views/index.ts
diff --git a/src/cool/modules/cycleTask/components/index.ts b/src/cool/modules/colletMetaData/components/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/components/index.ts
copy to src/cool/modules/colletMetaData/components/index.ts
diff --git a/src/cool/modules/cycleTask/directives/index.ts b/src/cool/modules/colletMetaData/directives/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/directives/index.ts
copy to src/cool/modules/colletMetaData/directives/index.ts
diff --git a/src/cool/modules/cycleTask/index.ts b/src/cool/modules/colletMetaData/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/index.ts
copy to src/cool/modules/colletMetaData/index.ts
diff --git a/src/cool/modules/cycleTask/pages/index.ts b/src/cool/modules/colletMetaData/pages/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/pages/index.ts
copy to src/cool/modules/colletMetaData/pages/index.ts
diff --git a/src/cool/modules/cycleTask/service/index.ts b/src/cool/modules/colletMetaData/service/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/service/index.ts
copy to src/cool/modules/colletMetaData/service/index.ts
diff --git a/src/cool/modules/cycleTask/store/index.ts b/src/cool/modules/colletMetaData/store/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/store/index.ts
copy to src/cool/modules/colletMetaData/store/index.ts
diff --git a/src/cool/modules/colletMetaData/views/colletMetaData.vue b/src/cool/modules/colletMetaData/views/colletMetaData.vue
new file mode 100644
index 0000000..22f6e39
--- /dev/null
+++ b/src/cool/modules/colletMetaData/views/colletMetaData.vue
@@ -0,0 +1,75 @@
+<template>
+ <cl-crud :ref="setRefs('crud')"
+ @load="onLoad">
+ <el-row type="flex"
+ align="middle">
+ <!-- 鍒锋柊鎸夐挳 -->
+ <cl-refresh-btn />
+ <!-- 鏂板鎸夐挳 -->
+ <cl-add-btn />
+ <!-- 鍒犻櫎鎸夐挳 -->
+ <cl-multi-delete-btn />
+ <cl-flex1 />
+ <!-- 鍏抽敭瀛楁悳绱� -->
+ <cl-search-key />
+ </el-row>
+
+ <el-row>
+ <!-- 鏁版嵁琛ㄦ牸 -->
+ <cl-table :ref="setRefs('table')"
+ v-bind="table" />
+ </el-row>
+
+ <el-row type="flex">
+ <cl-flex1 />
+ <!-- 鍒嗛〉鎺т欢 -->
+ <cl-pagination />
+ </el-row>
+ <div>閲囬泦妫�娴嬪厓鏁版嵁</div>
+ <!-- 鏂板銆佺紪杈� -->
+ <cl-upsert :ref="setRefs('upsert')"
+ v-bind="upsert" />
+ </cl-crud>
+</template>
+
+<script lang="ts">
+import { defineComponent, reactive } from "vue";
+import { CrudLoad, Upsert, Table } from "@cool-vue/crud/types";
+import { useCool } from "/@/cool";
+
+export default defineComponent({
+ setup() {
+ const { refs, setRefs, service } = useCool();
+
+ // 鏂板銆佺紪杈戦厤缃�
+ const upsert = reactive<Upsert>({
+ items: []
+ });
+
+ // 琛ㄦ牸閰嶇疆
+ const table = reactive<Table>({
+ columns: [
+ {
+ label: "鍚嶇О",
+ prop: "name"
+ }
+ ]
+ });
+
+ // crud 鍔犺浇
+ function onLoad({ ctx, app }: CrudLoad) {
+ // 缁戝畾 service
+ ctx.service(service.business.basedeviceinfo).done();
+ app.refresh();
+ }
+
+ return {
+ refs,
+ setRefs,
+ upsert,
+ table,
+ onLoad
+ };
+ }
+});
+</script>
diff --git a/src/cool/modules/cycleTask/views/index.ts b/src/cool/modules/colletMetaData/views/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/views/index.ts
copy to src/cool/modules/colletMetaData/views/index.ts
diff --git a/src/cool/modules/cycleTask/views/cycleTask.vue b/src/cool/modules/cycleTask/views/cycleTask.vue
deleted file mode 100644
index b3c303e..0000000
--- a/src/cool/modules/cycleTask/views/cycleTask.vue
+++ /dev/null
@@ -1,5 +0,0 @@
-<template>
- <div>
- <h1>鍛ㄦ湡浠诲姟</h1>
- </div>
-</template>
\ No newline at end of file
diff --git a/src/cool/modules/device/views/device.vue b/src/cool/modules/device/views/device.vue
index b941143..f91b1e4 100644
--- a/src/cool/modules/device/views/device.vue
+++ b/src/cool/modules/device/views/device.vue
@@ -34,12 +34,13 @@
<script lang="ts">
import { defineComponent, reactive } from "vue";
-import { CrudLoad, Upsert, Table } from "@cool-vue/crud/types";
+import { CrudLoad, Upsert, Table, RefreshOp } from "@cool-vue/crud/types";
import { useCool } from "/@/cool";
+import { deepTree } from "/@/cool/utils";
export default defineComponent({
setup() {
- const { refs, setRefs, service } = useCool();
+ const { refs, setRefs, service, router } = useCool();
// 鏂板銆佺紪杈戦厤缃�
const upsert = reactive<Upsert>({
@@ -185,13 +186,40 @@
// crud 鍔犺浇
function onLoad({ ctx, app }: CrudLoad) {
// 缁戝畾 service
- ctx.service(service.device.device).done();
+ console.log(service);
+ ctx.service(service.business.basedeviceinfo).done();
app.refresh();
}
+ // 鍒锋柊鐩戝惉
+ function onRefresh(_: any, { render }: RefreshOp) {
+ console.log("寮�濮嬫墽琛屽埛鏂�");
+ service.business.basedeviceinfo.list().then((list: any[]) => {
+ list.map((e) => {
+ e.permList = e.perms ? e.perms.split(",") : [];
+ });
+ console.log("鍒锋柊鐩戝惉鍐呮墦鍗�");
+ render(deepTree(list), {
+ total: list.length
+ });
+ });
+ }
+ // 鍒锋柊
+ function refresh() {
+ console.log("鍒锋柊鍐呮墦鍗�");
+ refs.value.crud.refresh();
+ }
+
+ // 璺宠浆
+ function toUrl(url: string) {
+ router.push(url);
+ }
return {
refs,
setRefs,
+ onRefresh,
+ refresh,
+ toUrl,
upsert,
table,
onLoad
diff --git a/src/cool/modules/deviceGroup/views/deviceGroup.vue b/src/cool/modules/deviceGroup/views/deviceGroup.vue
index 13d8177..b3bdba1 100644
--- a/src/cool/modules/deviceGroup/views/deviceGroup.vue
+++ b/src/cool/modules/deviceGroup/views/deviceGroup.vue
@@ -45,6 +45,15 @@
const upsert = reactive<Upsert>({
items: [
{
+ label: "鍚嶇О",
+ prop: "name",
+ component: {
+ name: "el-input"
+ },
+ //鏄惁涓哄繀濉」,娉細鎺ュ彛閰嶇疆瀛楁鏃舵病鏈夎缃粯璁ゅ�兼椂锛岄兘闇�瑕侀�夋嫨蹇呭~
+ required: true
+ },
+ {
label: "閫昏緫ID",
prop: "logic_id",
component: {
@@ -53,16 +62,45 @@
required: true
},
{
- label: "閰嶇疆浜哄悕绉�",
- prop: "configurator",
+ label: "鐗╃悊ID",
+ prop: "device_id",
component: {
name: "el-input"
},
required: true
},
{
- label: "澶囨敞",
- prop: "remark",
+ label: "璐熻矗浜�",
+ prop: "operator",
+ component: {
+ name: "el-input"
+ },
+ required: true
+ },
+ {
+ label: "缁忓害",
+ prop: "longitude",
+ component: {
+ name: "el-input"
+ }
+ },
+ {
+ label: "绾害",
+ prop: "latitude",
+ component: {
+ name: "el-input"
+ }
+ },
+ {
+ label: "楂樺害",
+ prop: "altitude",
+ component: {
+ name: "el-input"
+ }
+ },
+ {
+ label: "瀹夎浣嶇疆",
+ prop: "location",
component: {
name: "el-input"
}
@@ -70,6 +108,13 @@
{
label: "鐘舵��",
prop: "status",
+ component: {
+ name: "el-input"
+ }
+ },
+ {
+ label: "澶囨敞",
+ prop: "remark",
component: {
name: "el-input"
}
@@ -85,25 +130,50 @@
align: "center"
},
{
- label: "搴忓彿",
+ label: "id",
prop: "id",
sortable: true //鏄惁鎺掑簭鍔熻兘
+ },
+ {
+ label: "杩愯鐘舵��",
+ prop: "status",
+ filters: [
+ { text: 0, value: 0 },
+ { text: 1, value: 1 }
+ ]
+ // filters:"[{ text: '瀹�', value: '瀹�' }, { text: '鍏徃', value: '鍏徃' }]"
+ },
+ {
+ label: "鍚嶇О",
+ prop: "name"
+ },
+ {
+ label: "浣嶇疆",
+ prop: "location",
+ width: 200
},
{
label: "閫昏緫ID",
prop: "logic_id"
},
{
- label: "閰嶇疆浜哄悕绉�",
- prop: "configurator"
+ label: "鐗╃悊ID",
+ prop: "device_id",
+ width: 100
},
{
- label: "澶囨敞",
- prop: "remark"
+ label: "缁忓害",
+ prop: "longitude",
+ width: 150
},
{
- label: "鐘舵��",
- prop: "status"
+ label: "绾害",
+ prop: "latitude",
+ width: 150
+ },
+ {
+ label: "楂樺害",
+ prop: "altitude"
},
{
label: "鎿嶄綔",
@@ -115,7 +185,8 @@
// crud 鍔犺浇
function onLoad({ ctx, app }: CrudLoad) {
// 缁戝畾 service
- ctx.service(service.deviceGroup.deviceGroup).done();
+ console.log(service);
+ ctx.service(service.business.devicegroup).done();
app.refresh();
}
diff --git a/src/cool/modules/douMsg/views/douMsg.vue b/src/cool/modules/douMsg/views/douMsg.vue
index f5171ac..3a2f8d1 100644
--- a/src/cool/modules/douMsg/views/douMsg.vue
+++ b/src/cool/modules/douMsg/views/douMsg.vue
@@ -1,5 +1,132 @@
<template>
- <div>
- <h1>鏂楄疆鏈鸿鎯呴〉</h1>
- </div>
-</template>
\ No newline at end of file
+ <cl-crud :ref="setRefs('crud')"
+ @load="onLoad">
+ <el-row type="flex"
+ align="middle">
+ <!-- 鍒锋柊鎸夐挳 -->
+ <cl-refresh-btn />
+ <!-- 鏂板鎸夐挳 -->
+ <cl-add-btn />
+ <!-- 鍒犻櫎鎸夐挳 -->
+ <cl-multi-delete-btn />
+ <cl-flex1 />
+ <!-- 鍏抽敭瀛楁悳绱� -->
+ <cl-search-key />
+ </el-row>
+
+ <el-row>
+ <!-- 鏁版嵁琛ㄦ牸 -->
+ <cl-table :ref="setRefs('table')"
+ v-bind="table" />
+ </el-row>
+
+ <el-row type="flex">
+ <cl-flex1 />
+ <!-- 鍒嗛〉鎺т欢 -->
+ <cl-pagination />
+ </el-row>
+
+ <!-- 鏂板銆佺紪杈� -->
+ <cl-upsert :ref="setRefs('upsert')"
+ v-bind="upsert" />
+ </cl-crud>
+</template>
+
+<script lang="ts">
+import { defineComponent, reactive } from "vue";
+import { CrudLoad, Upsert, Table } from "@cool-vue/crud/types";
+import { useCool } from "/@/cool";
+
+export default defineComponent({
+ setup() {
+ const { refs, setRefs, service } = useCool();
+
+ // 鏂板銆佺紪杈戦厤缃�
+ const upsert = reactive<Upsert>({
+ items: [
+ {
+ label: "鍚嶇О",
+ prop: "trubine_name",
+ component: {
+ name: "el-input"
+ },
+ //鏄惁涓哄繀濉」,娉細鎺ュ彛閰嶇疆瀛楁鏃舵病鏈夎缃粯璁ゅ�兼椂锛岄兘闇�瑕侀�夋嫨蹇呭~
+ required: true
+ },
+ {
+ label: "缂栧彿",
+ prop: "trubine_no",
+ component: {
+ name: "el-input"
+ }
+ },
+ {
+ label: "灏哄",
+ prop: "trubine_size",
+ component: {
+ name: "el-input"
+ }
+ },
+ {
+ label: "澶囨敞",
+ prop: "remark",
+ component: {
+ name: "el-input"
+ }
+ }
+ ]
+ });
+
+ // 琛ㄦ牸閰嶇疆
+ const table = reactive<Table>({
+ columns: [
+ {
+ type: "selection",
+ align: "center"
+ },
+ {
+ label: "id",
+ prop: "id",
+ sortable: true //鏄惁鎺掑簭鍔熻兘
+ },
+ {
+ label: "鍚嶇О",
+ prop: "trubine_name"
+ },
+ {
+ label: "缂栧彿",
+ prop: "trubine_no",
+ width: 200
+ },
+ {
+ label: "灏哄鍨嬪彿",
+ prop: "trubine_size"
+ },
+ {
+ label: "澶囨敞",
+ prop: "remark"
+ },
+ {
+ label: "鎿嶄綔",
+ type: "op"
+ }
+ ]
+ });
+
+ // crud 鍔犺浇
+ function onLoad({ ctx, app }: CrudLoad) {
+ // 缁戝畾 service
+ ctx.service(service.business.doutrubine).done();
+ app.refresh();
+ }
+
+ return {
+ refs,
+ setRefs,
+ upsert,
+ table,
+ onLoad
+ };
+ }
+});
+</script>
diff --git a/src/cool/modules/immediateTask/views/immediateTask.vue b/src/cool/modules/immediateTask/views/immediateTask.vue
index e8de2d1..df0d115 100644
--- a/src/cool/modules/immediateTask/views/immediateTask.vue
+++ b/src/cool/modules/immediateTask/views/immediateTask.vue
@@ -54,7 +54,7 @@
// crud 鍔犺浇
function onLoad({ ctx, app }: CrudLoad) {
// 缁戝畾 service
- ctx.service(service.xx).done();
+ ctx.service(service.business.basedeviceinfo).done();
app.refresh();
}
diff --git a/src/cool/modules/index.ts b/src/cool/modules/index.ts
index 95cb9d2..7b2ccd3 100644
--- a/src/cool/modules/index.ts
+++ b/src/cool/modules/index.ts
@@ -20,5 +20,6 @@
"huaneng",
"device",
"deviceGroup",
- "taskSetting"
+ "taskSetting",
+ "business"
];
diff --git a/src/cool/modules/cycleTask/components/index.ts b/src/cool/modules/periodictask/components/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/components/index.ts
copy to src/cool/modules/periodictask/components/index.ts
diff --git a/src/cool/modules/cycleTask/directives/index.ts b/src/cool/modules/periodictask/directives/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/directives/index.ts
copy to src/cool/modules/periodictask/directives/index.ts
diff --git a/src/cool/modules/cycleTask/index.ts b/src/cool/modules/periodictask/index.ts
similarity index 100%
rename from src/cool/modules/cycleTask/index.ts
rename to src/cool/modules/periodictask/index.ts
diff --git a/src/cool/modules/cycleTask/pages/index.ts b/src/cool/modules/periodictask/pages/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/pages/index.ts
copy to src/cool/modules/periodictask/pages/index.ts
diff --git a/src/cool/modules/cycleTask/service/index.ts b/src/cool/modules/periodictask/service/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/service/index.ts
copy to src/cool/modules/periodictask/service/index.ts
diff --git a/src/cool/modules/cycleTask/store/index.ts b/src/cool/modules/periodictask/store/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/store/index.ts
copy to src/cool/modules/periodictask/store/index.ts
diff --git a/src/cool/modules/cycleTask/views/index.ts b/src/cool/modules/periodictask/views/index.ts
similarity index 100%
copy from src/cool/modules/cycleTask/views/index.ts
copy to src/cool/modules/periodictask/views/index.ts
diff --git a/src/cool/modules/periodictask/views/periodictask.vue b/src/cool/modules/periodictask/views/periodictask.vue
new file mode 100644
index 0000000..f915001
--- /dev/null
+++ b/src/cool/modules/periodictask/views/periodictask.vue
@@ -0,0 +1,3 @@
+<template>
+ <h1>鍛ㄦ湡浠诲姟</h1>
+</template>
\ No newline at end of file
diff --git a/src/cool/modules/taskSetting/views/taskSetting.vue b/src/cool/modules/taskSetting/views/taskSetting.vue
index a05bcf5..3bbfbad 100644
--- a/src/cool/modules/taskSetting/views/taskSetting.vue
+++ b/src/cool/modules/taskSetting/views/taskSetting.vue
@@ -43,7 +43,10 @@
// 鏂板銆佺紪杈戦厤缃�
const upsert = reactive<Upsert>({
- items: []
+ items: [
+ // {
+ // }
+ ]
});
// 琛ㄦ牸閰嶇疆
diff --git a/src/router/index.ts b/src/router/index.ts
index 73f503f..2ccd64a 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -1,45 +1,46 @@
import {
- createRouter,
- createWebHashHistory,
- createWebHistory,
- Router,
- RouteRecordRaw
+ createRouter,
+ createWebHashHistory,
+ createWebHistory,
+ Router,
+ RouteRecordRaw
} from "vue-router";
import { routerMode } from "/@/config/env";
declare interface CoolRouter extends Router {
- $plugin?: {
- addViews(list: any[], options?: any): void;
- };
+ $plugin?: {
+ addViews(list: any[], options?: any): void;
+ };
}
const routes: Array<RouteRecordRaw> = [
- {
- path: "/",
- name: "index",
- component: () => import(`/@/pages/layout/index.vue`),
- children: [
- {
- path: "/",
- name: "鏁版嵁缁熻",
- component: () => import("/@/views/home/index.vue")
- }
- ]
- },
- {
- path: "/:catchAll(.*)",
- name: "404",
- redirect: "/404"
- }
+ {
+ path: "/",
+ name: "index",
+ component: () => import(`/@/pages/layout/index.vue`),
+ children: [
+ {
+ path: "/",
+ name: "鏁版嵁缁熻",
+ component: () => import("/@/views/home/index.vue")
+ }
+ ]
+ },
+
+ {
+ path: "/:catchAll(.*)",
+ name: "404",
+ redirect: "/404"
+ }
];
const router = createRouter({
- history: routerMode == "history" ? createWebHistory() : createWebHashHistory(),
- routes
+ history: routerMode == "history" ? createWebHistory() : createWebHashHistory(),
+ routes
}) as CoolRouter;
export default router;
export const ignore: any = {
- token: ["/login", "/403", "/404", "/500", "/502"]
+ token: ["/login", "/403", "/404", "/500", "/502"]
};
--
Gitblit v1.9.1