heimawl
2023-06-16 92301a6d7283cabf3fddaa4481636193c27b474a
测试接口
已修改5个文件
150 ■■■■ 文件已修改
package.json 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/system/label.js 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/label/index.vue 91 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json
@@ -52,6 +52,8 @@
    "jsencrypt": "3.0.0-rc.1",
    "nprogress": "0.2.0",
    "quill": "1.3.7",
    "quill-image-drop-module": "^1.0.3",
    "quill-image-resize-module": "^3.0.0",
    "screenfull": "5.0.2",
    "sortablejs": "1.10.2",
    "vue": "2.6.12",
@@ -59,6 +61,7 @@
    "vue-count-to": "1.0.13",
    "vue-cropper": "0.5.5",
    "vue-meta": "2.4.0",
    "vue-quill-editor": "^3.0.6",
    "vue-router": "3.4.9",
    "vuedraggable": "2.24.3",
    "vuex": "3.6.0",
src/api/system/label.js
@@ -2,7 +2,7 @@
import { parseStrEmpty } from "@/utils/ruoyi";//处理字符串,und,null转换为'';
// 修改标签
export function amendtag(data) {
export function toamendtag(data) {
  return request({
    url: '/base/tag',
    method: 'put',
@@ -20,13 +20,13 @@
/**
 * 
 * @param {标签id} userId
 * @param {标签id} tagid
 * 获取标签详情
 * @returns 
 */
export function detailstag(userId) {
export function detailstag(tagid) {
    return request({
      url: '/base/tag/'+ userId,
      url: '/base/tag/'+ tagid,
      method: 'get',
    })
  };
@@ -34,17 +34,22 @@
  
  /**
   * 
   * @param {标签id} userId
   * @param {标签id} tagid
   * 删除标签
   * @returns 
   */
export function deletetag(userId) {
export function deletetag(tagid) {
    return request({
      url: '/base/tag/' + userId,
      url: '/base/tag/' + tagid,
      method: 'delete',
    })
  };
  // 导出标签列表
  /**
   *
   * @param {*} data
   * 导出标签列表
   * @returns
   */
export function exporttag(data) {
    return request({
      url: '/base/tag/export',
@@ -52,7 +57,12 @@
      data: data
    })
  };
  // 查询标签列表
  /**
   *
   * @param {object}
   * 查询标签列表
   * @returns
   */
export function listtag(query) {
    return request({
      url: '/base/tag/list',
@@ -60,3 +70,15 @@
      params: query
    })
  };
  /**
   * @param {name}
   * 获取标签分类列表
   * @returns
   */
  export function tagclassifylist(data) {
    return request({
      url: '/system/tagcategory/baseTagCategoryByName',
      method: 'post',
      data: data
    })
  };
src/main.js
@@ -14,6 +14,18 @@
import directive from './directive' // directive
import plugins from './plugins' // plugins
import { download } from '@/utils/request'
 //引入quill-editor编辑器
//  import VueQuillEditor from 'vue-quill-editor'
//  import 'quill/dist/quill.core.css'
//  import 'quill/dist/quill.snow.css'
//  import 'quill/dist/quill.bubble.css'
 //实现quill-editor编辑器拖拽上传图片
//  import * as Quill from 'quill'
//  import { ImageDrop } from 'quill-image-drop-module'
//  Quill.register('modules/imageDrop', ImageDrop)
 //实现quill-editor编辑器调整图片尺寸
//  import ImageResize from 'quill-image-resize-module'
//  Quill.register('modules/imageResize', ImageResize)
import './assets/icons' // icon
import './permission' // permission control
@@ -77,6 +89,8 @@
Vue.use(VueMeta)
DictData.install()
Vue.use(components)
// Vue.use(VueQuillEditor)
/**
 * If you don't want to use mock-server
src/views/system/label/index.vue
@@ -14,7 +14,7 @@
          size="medium "
        >
          <el-button
            @click="sidecolumnss"
            @click="gitclasify"
            slot="append"
            icon="el-icon-search"
          ></el-button>
@@ -57,7 +57,7 @@
      <div class="leftvlue-top"></div>
      <div class="leftvlue-bg">
        <el-row :gutter="20">
          <!--用户数据-->
          <!--标签数据-->
          <el-col :span="24" :xs="24">
            <el-form
              :model="queryParams"
@@ -118,6 +118,21 @@
                  v-hasPermi="['system:user:remove']"
                  >删除</el-button
                >
              </el-col>
              <el-col :span="1.5">
                <div class="documentf">
                  <div class="document">
                    <el-button
                      type="warning"
                      plain
                      icon="el-icon-download"
                      size="medium"
                      @click="handleExport"
                      v-hasPermi="['system:user:export']"
                      >导出</el-button
                    >
                  </div>
                </div>
              </el-col>
              <!-- <el-col :span="1.5"> </el-col> -->
@@ -289,7 +304,15 @@
  addUser,
  updateUser,
} from "@/api/system/user";
import { getToken } from "@/utils/auth";
import {
  toamendtag,
  addapitag,
  detailstag,
  deletetag,
  listtag,
  tagclassifylist,
} from "@/api/system/label";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
@@ -357,6 +380,7 @@
      goQRCodeVisible: false, //二维码弹框
      sidecolumnval: "", //类别搜索
      propss: { multiple: true },
      topqueryParams: {}, //导出筛选条件
      optionss: [
        {
          value: 1,
@@ -406,9 +430,9 @@
      },
      // 列信息
      columns: [
        { key: 0, label: `用户编号`, visible: true },
        { key: 1, label: `用户名称`, visible: true },
        { key: 2, label: `用户昵称`, visible: true },
        { key: 0, label: `标签编号`, visible: true },
        { key: 1, label: `标签名称`, visible: true },
        { key: 2, label: `标签昵称`, visible: true },
        { key: 3, label: `部门`, visible: true },
        { key: 4, label: `手机号码`, visible: true },
        { key: 5, label: `状态`, visible: true },
@@ -417,23 +441,23 @@
      // 表单校验
      rules: {
        userName: [
          { required: true, message: "用户名称不能为空", trigger: "blur" },
          { required: true, message: "标签名称不能为空", trigger: "blur" },
          {
            min: 2,
            max: 20,
            message: "用户名称长度必须介于 2 和 20 之间",
            message: "标签名称长度必须介于 2 和 20 之间",
            trigger: "blur",
          },
        ],
        nickName: [
          { required: true, message: "用户昵称不能为空", trigger: "blur" },
          { required: true, message: "标签昵称不能为空", trigger: "blur" },
        ],
        password: [
          { required: true, message: "用户密码不能为空", trigger: "blur" },
          { required: true, message: "标签密码不能为空", trigger: "blur" },
          {
            min: 5,
            max: 20,
            message: "用户密码长度必须介于 5 和 20 之间",
            message: "标签密码长度必须介于 5 和 20 之间",
            trigger: "blur",
          },
        ],
@@ -465,22 +489,31 @@
  watch: {},
  created() {
    this.getList();
    this.gitclasify();
  },
  methods: {
    /** 查询用户列表 */
    /** 查询标签列表 */
    getList() {
      //   this.loading = true;
      let forms = {};
      forms.name = this.sidecolumnval;
      listtag(forms).then((response) => {
        console.log(response);
      });
      listUser().then((response) => {
        console.log(response);
        // this.userList = response.data;
        // this.total = response.total;
        // this.loading = false;
        console.log(this.userList);
      });
      //   const { rows } = await listUser();
      //   console.log(rows);
      //   this.list = rows;
    },
    // 获取标签分类
    gitclasify() {
      let forms = {};
      forms.name = this.sidecolumnval;
      tagclassifylist(forms).then((response) => {
        console.log(response);
      });
    },
    // 添加类别
    submitsidecolumn() {
@@ -496,8 +529,6 @@
      this.amendtag = true;
      this.dialogFormVisible = true;
    },
    //搜索类别
    sidecolumnss() {},
    // 切换共享/本地
    tophandleClick() {},
    // 取消按钮
@@ -523,7 +554,7 @@
      };
      this.resetForm("form");
    },
    // 用户状态修改
    // 标签状态修改
    handleStatusChange(row) {
      let text = row.status === "0" ? "启用" : "停用";
      this.$modal
@@ -615,6 +646,16 @@
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download(
        "basetag/export",
        {
          ...this.topqueryParams,
        },
        `user_${new Date().getTime()}.xlsx`
      );
    },
  },
};
@@ -715,6 +756,14 @@
    font-size: 20px;
  }
}
.document {
  width: 100px;
  height: 50px;
}
.documentf {
  display: flex;
  justify-content: flex-end;
}
.button-text {
  color: rgb(70, 204, 238);
}
vue.config.js
@@ -35,7 +35,7 @@
    proxy: {
      // detail: https://cli.vuejs.org/config/#devserver-proxy
      [process.env.VUE_APP_BASE_API]: {
        target1: `http://116.62.18.175:8080`,
        target1: `http://192.168.1.4:8080`,
        target: `http://localhost:8080`,
        changeOrigin: true,
        pathRewrite: {