Преглед изворни кода

Merge branch 'master' of http://git.xt.wenhq.top:8083/wenhongquan/khyznh-ui

liwei19941102 пре 2 година
родитељ
комит
8abaf74990

+ 63 - 0
src/api/ article/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import {  articleVO,  articleForm,  articleQuery } from '@/api/system/ article/types';
+
+/**
+ * 查询文章列表
+ * @param query
+ * @returns {*}
+ */
+
+export const list article = (query?:  articleQuery): AxiosPromise< articleVO[]> => {
+  return request({
+    url: '/system/ article/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询文章详细
+ * @param id
+ */
+export const get article = (id: string | number): AxiosPromise< articleVO> => {
+  return request({
+    url: '/system/ article/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增文章
+ * @param data
+ */
+export const add article = (data:  articleForm) => {
+  return request({
+    url: '/system/ article',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改文章
+ * @param data
+ */
+export const update article = (data:  articleForm) => {
+  return request({
+    url: '/system/ article',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除文章
+ * @param id
+ */
+export const del article = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/ article/' + id,
+    method: 'delete'
+  });
+};

+ 116 - 0
src/api/ article/types.ts

@@ -0,0 +1,116 @@
+export interface  articleVO {
+  /**
+   * 编号
+   */
+  id: string | number;
+
+  /**
+   * 标题
+   */
+  title: string;
+
+  /**
+   * 副标题
+   */
+  subTitle: string;
+
+  /**
+   * 内容
+   */
+  content: string;
+
+  /**
+   * 状态
+   */
+  status: number;
+
+  /**
+   * 扩展1
+   */
+  ext1: string;
+
+  /**
+   * 扩展2
+   */
+  ext2: string;
+
+}
+
+export interface  articleForm extends BaseEntity {
+  /**
+   * 编号
+   */
+  id?: string | number;
+
+  /**
+   * 标题
+   */
+  title?: string;
+
+  /**
+   * 副标题
+   */
+  subTitle?: string;
+
+  /**
+   * 内容
+   */
+  content?: string;
+
+  /**
+   * 状态
+   */
+  status?: number;
+
+  /**
+   * 扩展1
+   */
+  ext1?: string;
+
+  /**
+   * 扩展2
+   */
+  ext2?: string;
+
+}
+
+export interface  articleQuery extends PageQuery {
+
+  /**
+   * 标题
+   */
+  title?: string;
+
+  /**
+   * 副标题
+   */
+  subTitle?: string;
+
+  /**
+   * 内容
+   */
+  content?: string;
+
+  /**
+   * 状态
+   */
+  status?: number;
+
+  /**
+   * 扩展1
+   */
+  ext1?: string;
+
+  /**
+   * 扩展2
+   */
+  ext2?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 63 - 0
src/api/miniprogram/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { MiniprogramVO, MiniprogramForm, MiniprogramQuery } from '@/api/system/miniprogram/types';
+
+/**
+ * 查询小程序信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listMiniprogram = (query?: MiniprogramQuery): AxiosPromise<MiniprogramVO[]> => {
+  return request({
+    url: '/system/miniprogram/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询小程序信息详细
+ * @param id
+ */
+export const getMiniprogram = (id: string | number): AxiosPromise<MiniprogramVO> => {
+  return request({
+    url: '/system/miniprogram/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增小程序信息
+ * @param data
+ */
+export const addMiniprogram = (data: MiniprogramForm) => {
+  return request({
+    url: '/system/miniprogram',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改小程序信息
+ * @param data
+ */
+export const updateMiniprogram = (data: MiniprogramForm) => {
+  return request({
+    url: '/system/miniprogram',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除小程序信息
+ * @param id
+ */
+export const delMiniprogram = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/miniprogram/' + id,
+    method: 'delete'
+  });
+};

+ 131 - 0
src/api/miniprogram/types.ts

@@ -0,0 +1,131 @@
+export interface MiniprogramVO {
+  /**
+   * 编号
+   */
+  id: string | number;
+
+  /**
+   * 名称
+   */
+  name: string;
+
+  /**
+   * 图标地址
+   */
+  logo: string;
+
+  /**
+   * 链接
+   */
+  url: string;
+
+  /**
+   * 状态
+   */
+  status: number;
+
+  /**
+   * 描述
+   */
+  desc: string;
+
+  /**
+   * 扩展1
+   */
+  ext1: string;
+
+  /**
+   * 扩展2
+   */
+  ext2: string;
+
+}
+
+export interface MiniprogramForm extends BaseEntity {
+  /**
+   * 编号
+   */
+  id?: string | number;
+
+  /**
+   * 名称
+   */
+  name?: string;
+
+  /**
+   * 图标地址
+   */
+  logo?: string;
+
+  /**
+   * 链接
+   */
+  url?: string;
+
+  /**
+   * 状态
+   */
+  status?: number;
+
+  /**
+   * 描述
+   */
+  desc?: string;
+
+  /**
+   * 扩展1
+   */
+  ext1?: string;
+
+  /**
+   * 扩展2
+   */
+  ext2?: string;
+
+}
+
+export interface MiniprogramQuery extends PageQuery {
+
+  /**
+   * 名称
+   */
+  name?: string;
+
+  /**
+   * 图标地址
+   */
+  logo?: string;
+
+  /**
+   * 链接
+   */
+  url?: string;
+
+  /**
+   * 状态
+   */
+  status?: number;
+
+  /**
+   * 描述
+   */
+  desc?: string;
+
+  /**
+   * 扩展1
+   */
+  ext1?: string;
+
+  /**
+   * 扩展2
+   */
+  ext2?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 2 - 2
src/views/yunying/message/index.vue

@@ -46,11 +46,11 @@
         </div>
 
       </el-form-item>
-      <el-form-item label="设备">
+      <!-- <el-form-item label="设备">
         <el-tree-select v-model="formdata.devicelist"
           :data="sites.map(i => { return { value: i.dictLabel, label: i.dictLabel, children: JSON.parse(i.remark).filter(j => { return j.type == 'led' || j.type == 'tts' }).map(j => { return { value: `${i.dictCode}_${j.type}_${j.code}`, label: `${i.dictLabel}—${j.name}` } }) } })"
           multiple :render-after-expand="false" style="width: 100%" />
-      </el-form-item>
+      </el-form-item> -->
 
       <el-form-item>
         <el-button type="primary" @click="sendMessage">发送</el-button>

+ 2 - 2
vite.config.ts

@@ -26,8 +26,8 @@ export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => {
       open: true,
       proxy: {
         [env.VITE_APP_BASE_API]: {
-          // target: 'http://localhost:8080',
-          target: 'http://47.104.97.60/api',
+          target: 'http://localhost:8080',
+          // target: 'http://47.104.97.60/api',
           changeOrigin: true,
           ws: true,
           rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')