8个文件已修改
1个文件已删除
5个文件已添加
7 文件已重命名
21 文件已复制
| | |
| | | <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"> |
| | |
| | | |
| | | // 刷新 |
| | | function refresh() { |
| | | console.log("刷新方法内打印"); |
| | | refs.value.crud.refresh(); |
| | | } |
| | | |
copy from src/cool/modules/cycleTask/components/index.ts
copy to src/cool/modules/coalinventory/components/index.ts
copy from src/cool/modules/cycleTask/directives/index.ts
copy to src/cool/modules/coalinventory/directives/index.ts
copy from src/cool/modules/cycleTask/index.ts
copy to src/cool/modules/coalinventory/index.ts
copy from src/cool/modules/cycleTask/pages/index.ts
copy to src/cool/modules/coalinventory/pages/index.ts
copy from src/cool/modules/cycleTask/service/index.ts
copy to src/cool/modules/coalinventory/service/index.ts
copy from src/cool/modules/cycleTask/store/index.ts
copy to src/cool/modules/coalinventory/store/index.ts
| New file |
| | |
| | | <template>
|
| | | <div>
|
| | | <h1>盘煤计划</h1>
|
| | | </div>
|
| | | </template> |
copy from src/cool/modules/cycleTask/views/index.ts
copy to src/cool/modules/coalinventory/views/index.ts
copy from src/cool/modules/cycleTask/index.ts
copy to src/cool/modules/colletMeta/index.ts
| New file |
| | |
| | | <template>
|
| | | <h1>检测元数据</h1>
|
| | | </template> |
copy from src/cool/modules/cycleTask/components/index.ts
copy to src/cool/modules/colletMetaData/components/index.ts
copy from src/cool/modules/cycleTask/directives/index.ts
copy to src/cool/modules/colletMetaData/directives/index.ts
copy from src/cool/modules/cycleTask/index.ts
copy to src/cool/modules/colletMetaData/index.ts
copy from src/cool/modules/cycleTask/pages/index.ts
copy to src/cool/modules/colletMetaData/pages/index.ts
copy from src/cool/modules/cycleTask/service/index.ts
copy to src/cool/modules/colletMetaData/service/index.ts
copy from src/cool/modules/cycleTask/store/index.ts
copy to src/cool/modules/colletMetaData/store/index.ts
| New file |
| | |
| | | <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>
|
copy from src/cool/modules/cycleTask/views/index.ts
copy to src/cool/modules/colletMetaData/views/index.ts
| | |
| | |
|
| | | <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>({
|
| | |
| | | // 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
|
| | |
| | | const upsert = reactive<Upsert>({
|
| | | items: [
|
| | | {
|
| | | label: "名称",
|
| | | prop: "name",
|
| | | component: {
|
| | | name: "el-input"
|
| | | },
|
| | | //是否为必填项,注:接口配置字段时没有设置默认值时,都需要选择必填
|
| | | required: true
|
| | | },
|
| | | {
|
| | | label: "逻辑ID",
|
| | | prop: "logic_id",
|
| | | component: {
|
| | |
| | | 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"
|
| | | }
|
| | |
| | | {
|
| | | label: "状态",
|
| | | prop: "status",
|
| | | component: {
|
| | | name: "el-input"
|
| | | }
|
| | | },
|
| | | {
|
| | | label: "备注",
|
| | | prop: "remark",
|
| | | component: {
|
| | | name: "el-input"
|
| | | }
|
| | |
| | | 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: "操作",
|
| | |
| | | // crud 加载
|
| | | function onLoad({ ctx, app }: CrudLoad) {
|
| | | // 绑定 service
|
| | | ctx.service(service.deviceGroup.deviceGroup).done();
|
| | | console.log(service);
|
| | | ctx.service(service.business.devicegroup).done();
|
| | | app.refresh();
|
| | | }
|
| | |
|
| | |
| | | <template>
|
| | | <div>
|
| | | <h1>斗轮机详情页</h1>
|
| | | </div>
|
| | | </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>
|
| | |
|
| | | <!-- 新增、编辑 -->
|
| | | <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>
|
| | |
| | | // crud 加载
|
| | | function onLoad({ ctx, app }: CrudLoad) {
|
| | | // 绑定 service
|
| | | ctx.service(service.xx).done();
|
| | | ctx.service(service.business.basedeviceinfo).done();
|
| | | app.refresh();
|
| | | }
|
| | |
|
| | |
| | | "huaneng", |
| | | "device", |
| | | "deviceGroup", |
| | | "taskSetting" |
| | | "taskSetting", |
| | | "business" |
| | | ]; |
copy from src/cool/modules/cycleTask/components/index.ts
copy to src/cool/modules/periodictask/components/index.ts
copy from src/cool/modules/cycleTask/directives/index.ts
copy to src/cool/modules/periodictask/directives/index.ts
copy from src/cool/modules/cycleTask/pages/index.ts
copy to src/cool/modules/periodictask/pages/index.ts
copy from src/cool/modules/cycleTask/service/index.ts
copy to src/cool/modules/periodictask/service/index.ts
copy from src/cool/modules/cycleTask/store/index.ts
copy to src/cool/modules/periodictask/store/index.ts
copy from src/cool/modules/cycleTask/views/index.ts
copy to src/cool/modules/periodictask/views/index.ts
| New file |
| | |
| | | <template>
|
| | | <h1>周期任务</h1>
|
| | | </template> |
| | |
| | |
|
| | | // 新增、编辑配置
|
| | | const upsert = reactive<Upsert>({
|
| | | items: []
|
| | | items: [
|
| | | // {
|
| | | // }
|
| | | ]
|
| | | });
|
| | |
|
| | | // 表格配置
|
| | |
| | | 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"] |
| | | }; |