coys 2 år sedan
förälder
incheckning
c9acee602c

+ 2 - 2
.env.development

@@ -10,12 +10,12 @@ ENV = 'development'
 #罗俊
 # VUE_APP_BASE_API = 'http://10.87.10.49:8080'
 #罗伟
-VUE_APP_BASE_API = 'http://10.87.10.47:8080'
+# VUE_APP_BASE_API = 'http://10.87.10.47:8080'
 #高雄
 #VUE_APP_BASE_API = 'http://10.87.11.94:8080'
 # VUE_APP_BASE_API = 'http://localhost:8080'
 # 55环境
-# VUE_APP_BASE_API = 'http://10.87.10.55:8080'
+VUE_APP_BASE_API = 'http://10.87.10.55:8080'
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 42 - 0
src/api/scorestatistics/scorestatistics.js

@@ -0,0 +1,42 @@
+import request from "@/utils/request";
+//综合计算得分
+// 查询列表分页
+export function list(query) {
+  return request({
+    url: "/core/safeMonthScore/list",
+    method: "get",
+    params: query,
+  });
+}
+// 评分重新计算
+export function  anewDetail(data) {
+  return request({
+    url: "/core/safetyExceptionData/reCalculate",
+    method: "post",
+    data
+  });
+}
+// 详情
+export function detail(data) {
+  return request({
+    url: "/core/safeMonthScore/detail",
+    method: "post",
+    data,
+  });
+}
+// 编辑规则配置
+export function editTargetEvaluate(data) {
+  return request({
+    url: "/core/safetyIndexRule",
+    method: "put",
+    data,
+  });
+}
+// 获取详情
+export function getEvaluateById(id) {
+  return request({
+    url: `/core/safetyIndexRule/${id}`,
+    method: "get",
+  });
+}
+

+ 168 - 148
src/utils/index.js

@@ -1,18 +1,25 @@
-import { parseTime } from './ruoyi'
+import { parseTime } from "./ruoyi";
 
 /**
  * 表格时间格式化
  */
 export function formatDate(cellValue) {
   if (cellValue == null || cellValue == "") return "";
-  var date = new Date(cellValue) 
-  var year = date.getFullYear()
-  var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
-  var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() 
-  var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() 
-  var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() 
-  var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
-  return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
+  var date = new Date(cellValue);
+  var year = date.getFullYear();
+  var month =
+    date.getMonth() + 1 < 10
+      ? "0" + (date.getMonth() + 1)
+      : date.getMonth() + 1;
+  var day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
+  var hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
+  var minutes =
+    date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
+  var seconds =
+    date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
+  return (
+    year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds
+  );
 }
 
 /**
@@ -21,40 +28,40 @@ export function formatDate(cellValue) {
  * @returns {string}
  */
 export function formatTime(time, option) {
-  if (('' + time).length === 10) {
-    time = parseInt(time) * 1000
+  if (("" + time).length === 10) {
+    time = parseInt(time) * 1000;
   } else {
-    time = +time
+    time = +time;
   }
-  const d = new Date(time)
-  const now = Date.now()
+  const d = new Date(time);
+  const now = Date.now();
 
-  const diff = (now - d) / 1000
+  const diff = (now - d) / 1000;
 
   if (diff < 30) {
-    return '刚刚'
+    return "刚刚";
   } else if (diff < 3600) {
     // less 1 hour
-    return Math.ceil(diff / 60) + '分钟前'
+    return Math.ceil(diff / 60) + "分钟前";
   } else if (diff < 3600 * 24) {
-    return Math.ceil(diff / 3600) + '小时前'
+    return Math.ceil(diff / 3600) + "小时前";
   } else if (diff < 3600 * 24 * 2) {
-    return '1天前'
+    return "1天前";
   }
   if (option) {
-    return parseTime(time, option)
+    return parseTime(time, option);
   } else {
     return (
       d.getMonth() +
       1 +
-      '月' +
+      "月" +
       d.getDate() +
-      '日' +
+      "日" +
       d.getHours() +
-      '时' +
+      "时" +
       d.getMinutes() +
-      '分'
-    )
+      "分"
+    );
   }
 }
 
@@ -63,18 +70,18 @@ export function formatTime(time, option) {
  * @returns {Object}
  */
 export function getQueryObject(url) {
-  url = url == null ? window.location.href : url
-  const search = url.substring(url.lastIndexOf('?') + 1)
-  const obj = {}
-  const reg = /([^?&=]+)=([^?&=]*)/g
+  url = url == null ? window.location.href : url;
+  const search = url.substring(url.lastIndexOf("?") + 1);
+  const obj = {};
+  const reg = /([^?&=]+)=([^?&=]*)/g;
   search.replace(reg, (rs, $1, $2) => {
-    const name = decodeURIComponent($1)
-    let val = decodeURIComponent($2)
-    val = String(val)
-    obj[name] = val
-    return rs
-  })
-  return obj
+    const name = decodeURIComponent($1);
+    let val = decodeURIComponent($2);
+    val = String(val);
+    obj[name] = val;
+    return rs;
+  });
+  return obj;
 }
 
 /**
@@ -83,14 +90,14 @@ export function getQueryObject(url) {
  */
 export function byteLength(str) {
   // returns the byte length of an utf8 string
-  let s = str.length
+  let s = str.length;
   for (var i = str.length - 1; i >= 0; i--) {
-    const code = str.charCodeAt(i)
-    if (code > 0x7f && code <= 0x7ff) s++
-    else if (code > 0x7ff && code <= 0xffff) s += 2
-    if (code >= 0xDC00 && code <= 0xDFFF) i--
+    const code = str.charCodeAt(i);
+    if (code > 0x7f && code <= 0x7ff) s++;
+    else if (code > 0x7ff && code <= 0xffff) s += 2;
+    if (code >= 0xdc00 && code <= 0xdfff) i--;
   }
-  return s
+  return s;
 }
 
 /**
@@ -98,13 +105,13 @@ export function byteLength(str) {
  * @returns {Array}
  */
 export function cleanArray(actual) {
-  const newArray = []
+  const newArray = [];
   for (let i = 0; i < actual.length; i++) {
     if (actual[i]) {
-      newArray.push(actual[i])
+      newArray.push(actual[i]);
     }
   }
-  return newArray
+  return newArray;
 }
 
 /**
@@ -112,13 +119,13 @@ export function cleanArray(actual) {
  * @returns {Array}
  */
 export function param(json) {
-  if (!json) return ''
+  if (!json) return "";
   return cleanArray(
-    Object.keys(json).map(key => {
-      if (json[key] === undefined) return ''
-      return encodeURIComponent(key) + '=' + encodeURIComponent(json[key])
+    Object.keys(json).map((key) => {
+      if (json[key] === undefined) return "";
+      return encodeURIComponent(key) + "=" + encodeURIComponent(json[key]);
     })
-  ).join('&')
+  ).join("&");
 }
 
 /**
@@ -126,21 +133,21 @@ export function param(json) {
  * @returns {Object}
  */
 export function param2Obj(url) {
-  const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
+  const search = decodeURIComponent(url.split("?")[1]).replace(/\+/g, " ");
   if (!search) {
-    return {}
+    return {};
   }
-  const obj = {}
-  const searchArr = search.split('&')
-  searchArr.forEach(v => {
-    const index = v.indexOf('=')
+  const obj = {};
+  const searchArr = search.split("&");
+  searchArr.forEach((v) => {
+    const index = v.indexOf("=");
     if (index !== -1) {
-      const name = v.substring(0, index)
-      const val = v.substring(index + 1, v.length)
-      obj[name] = val
+      const name = v.substring(0, index);
+      const val = v.substring(index + 1, v.length);
+      obj[name] = val;
     }
-  })
-  return obj
+  });
+  return obj;
 }
 
 /**
@@ -148,9 +155,9 @@ export function param2Obj(url) {
  * @returns {string}
  */
 export function html2Text(val) {
-  const div = document.createElement('div')
-  div.innerHTML = val
-  return div.textContent || div.innerText
+  const div = document.createElement("div");
+  div.innerHTML = val;
+  return div.textContent || div.innerText;
 }
 
 /**
@@ -160,21 +167,21 @@ export function html2Text(val) {
  * @returns {Object}
  */
 export function objectMerge(target, source) {
-  if (typeof target !== 'object') {
-    target = {}
+  if (typeof target !== "object") {
+    target = {};
   }
   if (Array.isArray(source)) {
-    return source.slice()
+    return source.slice();
   }
-  Object.keys(source).forEach(property => {
-    const sourceProperty = source[property]
-    if (typeof sourceProperty === 'object') {
-      target[property] = objectMerge(target[property], sourceProperty)
+  Object.keys(source).forEach((property) => {
+    const sourceProperty = source[property];
+    if (typeof sourceProperty === "object") {
+      target[property] = objectMerge(target[property], sourceProperty);
     } else {
-      target[property] = sourceProperty
+      target[property] = sourceProperty;
     }
-  })
-  return target
+  });
+  return target;
 }
 
 /**
@@ -183,18 +190,18 @@ export function objectMerge(target, source) {
  */
 export function toggleClass(element, className) {
   if (!element || !className) {
-    return
+    return;
   }
-  let classString = element.className
-  const nameIndex = classString.indexOf(className)
+  let classString = element.className;
+  const nameIndex = classString.indexOf(className);
   if (nameIndex === -1) {
-    classString += '' + className
+    classString += "" + className;
   } else {
     classString =
       classString.substr(0, nameIndex) +
-      classString.substr(nameIndex + className.length)
+      classString.substr(nameIndex + className.length);
   }
-  element.className = classString
+  element.className = classString;
 }
 
 /**
@@ -202,10 +209,10 @@ export function toggleClass(element, className) {
  * @returns {Date}
  */
 export function getTime(type) {
-  if (type === 'start') {
-    return new Date().getTime() - 3600 * 1000 * 24 * 90
+  if (type === "start") {
+    return new Date().getTime() - 3600 * 1000 * 24 * 90;
   } else {
-    return new Date(new Date().toDateString())
+    return new Date(new Date().toDateString());
   }
 }
 
@@ -216,38 +223,38 @@ export function getTime(type) {
  * @return {*}
  */
 export function debounce(func, wait, immediate) {
-  let timeout, args, context, timestamp, result
+  let timeout, args, context, timestamp, result;
 
-  const later = function() {
+  const later = function () {
     // 据上一次触发时间间隔
-    const last = +new Date() - timestamp
+    const last = +new Date() - timestamp;
 
     // 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait
     if (last < wait && last > 0) {
-      timeout = setTimeout(later, wait - last)
+      timeout = setTimeout(later, wait - last);
     } else {
-      timeout = null
+      timeout = null;
       // 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
       if (!immediate) {
-        result = func.apply(context, args)
-        if (!timeout) context = args = null
+        result = func.apply(context, args);
+        if (!timeout) context = args = null;
       }
     }
-  }
+  };
 
-  return function(...args) {
-    context = this
-    timestamp = +new Date()
-    const callNow = immediate && !timeout
+  return function (...args) {
+    context = this;
+    timestamp = +new Date();
+    const callNow = immediate && !timeout;
     // 如果延时不存在,重新设定延时
-    if (!timeout) timeout = setTimeout(later, wait)
+    if (!timeout) timeout = setTimeout(later, wait);
     if (callNow) {
-      result = func.apply(context, args)
-      context = args = null
+      result = func.apply(context, args);
+      context = args = null;
     }
 
-    return result
-  }
+    return result;
+  };
 }
 
 /**
@@ -258,18 +265,18 @@ export function debounce(func, wait, immediate) {
  * @returns {Object}
  */
 export function deepClone(source) {
-  if (!source && typeof source !== 'object') {
-    throw new Error('error arguments', 'deepClone')
+  if (!source && typeof source !== "object") {
+    throw new Error("error arguments", "deepClone");
   }
-  const targetObj = source.constructor === Array ? [] : {}
-  Object.keys(source).forEach(keys => {
-    if (source[keys] && typeof source[keys] === 'object') {
-      targetObj[keys] = deepClone(source[keys])
+  const targetObj = source.constructor === Array ? [] : {};
+  Object.keys(source).forEach((keys) => {
+    if (source[keys] && typeof source[keys] === "object") {
+      targetObj[keys] = deepClone(source[keys]);
     } else {
-      targetObj[keys] = source[keys]
+      targetObj[keys] = source[keys];
     }
-  })
-  return targetObj
+  });
+  return targetObj;
 }
 
 /**
@@ -277,16 +284,16 @@ export function deepClone(source) {
  * @returns {Array}
  */
 export function uniqueArr(arr) {
-  return Array.from(new Set(arr))
+  return Array.from(new Set(arr));
 }
 
 /**
  * @returns {string}
  */
 export function createUniqueString() {
-  const timestamp = +new Date() + ''
-  const randomNum = parseInt((1 + Math.random()) * 65536) + ''
-  return (+(randomNum + timestamp)).toString(32)
+  const timestamp = +new Date() + "";
+  const randomNum = parseInt((1 + Math.random()) * 65536) + "";
+  return (+(randomNum + timestamp)).toString(32);
 }
 
 /**
@@ -296,7 +303,7 @@ export function createUniqueString() {
  * @returns {boolean}
  */
 export function hasClass(ele, cls) {
-  return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)'))
+  return !!ele.className.match(new RegExp("(\\s|^)" + cls + "(\\s|$)"));
 }
 
 /**
@@ -305,7 +312,7 @@ export function hasClass(ele, cls) {
  * @param {string} cls
  */
 export function addClass(ele, cls) {
-  if (!hasClass(ele, cls)) ele.className += ' ' + cls
+  if (!hasClass(ele, cls)) ele.className += " " + cls;
 }
 
 /**
@@ -315,77 +322,91 @@ export function addClass(ele, cls) {
  */
 export function removeClass(ele, cls) {
   if (hasClass(ele, cls)) {
-    const reg = new RegExp('(\\s|^)' + cls + '(\\s|$)')
-    ele.className = ele.className.replace(reg, ' ')
+    const reg = new RegExp("(\\s|^)" + cls + "(\\s|$)");
+    ele.className = ele.className.replace(reg, " ");
   }
 }
 
 export function makeMap(str, expectsLowerCase) {
-  const map = Object.create(null)
-  const list = str.split(',')
+  const map = Object.create(null);
+  const list = str.split(",");
   for (let i = 0; i < list.length; i++) {
-    map[list[i]] = true
+    map[list[i]] = true;
   }
-  return expectsLowerCase
-    ? val => map[val.toLowerCase()]
-    : val => map[val]
+  return expectsLowerCase ? (val) => map[val.toLowerCase()] : (val) => map[val];
 }
- 
-export const exportDefault = 'export default '
+
+export const exportDefault = "export default ";
 
 export const beautifierConf = {
   html: {
-    indent_size: '2',
-    indent_char: ' ',
-    max_preserve_newlines: '-1',
+    indent_size: "2",
+    indent_char: " ",
+    max_preserve_newlines: "-1",
     preserve_newlines: false,
     keep_array_indentation: false,
     break_chained_methods: false,
-    indent_scripts: 'separate',
-    brace_style: 'end-expand',
+    indent_scripts: "separate",
+    brace_style: "end-expand",
     space_before_conditional: true,
     unescape_strings: false,
     jslint_happy: false,
     end_with_newline: true,
-    wrap_line_length: '110',
+    wrap_line_length: "110",
     indent_inner_html: true,
     comma_first: false,
     e4x: true,
-    indent_empty_lines: true
+    indent_empty_lines: true,
   },
   js: {
-    indent_size: '2',
-    indent_char: ' ',
-    max_preserve_newlines: '-1',
+    indent_size: "2",
+    indent_char: " ",
+    max_preserve_newlines: "-1",
     preserve_newlines: false,
     keep_array_indentation: false,
     break_chained_methods: false,
-    indent_scripts: 'normal',
-    brace_style: 'end-expand',
+    indent_scripts: "normal",
+    brace_style: "end-expand",
     space_before_conditional: true,
     unescape_strings: false,
     jslint_happy: true,
     end_with_newline: true,
-    wrap_line_length: '110',
+    wrap_line_length: "110",
     indent_inner_html: true,
     comma_first: false,
     e4x: true,
-    indent_empty_lines: true
-  }
-}
+    indent_empty_lines: true,
+  },
+};
 
 // 首字母大小
 export function titleCase(str) {
-  return str.replace(/( |^)[a-z]/g, L => L.toUpperCase())
+  return str.replace(/( |^)[a-z]/g, (L) => L.toUpperCase());
 }
 
 // 下划转驼峰
 export function camelCase(str) {
-  return str.replace(/_[a-z]/g, str1 => str1.substr(-1).toUpperCase())
+  return str.replace(/_[a-z]/g, (str1) => str1.substr(-1).toUpperCase());
 }
 
 export function isNumberStr(str) {
-  return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str)
+  return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str);
+}
+//获取当前年月 type 当前月份是否+1
+export function newDateMonth(time, type = "0") {
+  var date = time ? new Date(time) : new Date();
+
+  var y = date.getFullYear();
+  var m = "";
+  if (type == "1") {
+    m = date.getMonth();
+  } else {
+    m = date.getMonth() + 1;
+  }
+  m = m < 10 ? "0" + m : m;
+  var d = date.getDate();
+  d = d < 10 ? "0" + d : d;
+  return y + "-" + m;
 }
 /**
  * 生成全局唯一标识符 guid
@@ -393,10 +414,9 @@ export function isNumberStr(str) {
  */
 export function guid(head) {
   const S4 = () =>
-    (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1)
+    (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
   // 因为第一个字符为数值时,该 guid 不能用作 id 或者 class 所以前面加个 guid 前缀
   return `${
-    head ? head : ''
-  }${S4()}${S4()}-${S4()}-${S4()}-${S4()}-${S4()}${S4()}${S4()}`
+    head ? head : ""
+  }${S4()}${S4()}-${S4()}-${S4()}-${S4()}-${S4()}${S4()}${S4()}`;
 }
- 

+ 167 - 0
src/views/evaluateTable/index.vue

@@ -0,0 +1,167 @@
+<template>
+  <div class="app-container">
+    <el-row slot="rightBar">
+      <!--用户数据-->
+      <el-col>
+        <!--    搜索条件    -->
+        <el-form
+          :model="queryParams"
+          ref="queryForm"
+          size="small"
+          :inline="true"
+          v-show="showSearch"
+          label-width="100px"
+        >
+          <el-form-item label="组织机构" class="formTreeItem">
+            <tree-select
+              v-model="queryParams.orgId"
+              :options="deptOptions"
+              :show-count="true"
+              :normalizer="tenantIdnormalizer"
+              :props="{ checkStrictly: true, label: 'name' }"
+              placeholder="请选择归属机构"
+              clearValueText="清除"
+              :noChildrenText="''"
+              noOptionsText="没有数据"
+              noResultsText="没有搜索结果"
+            />
+          </el-form-item>
+          <el-form-item label="年月">
+            <el-date-picker
+              type="month"
+              v-model="queryParams.date"
+              placeholder="选择年月"
+              value-format="yyyy-MM"
+            >
+            </el-date-picker>
+          </el-form-item>
+          <el-button
+            type="primary"
+            icon="el-icon-search"
+            size="mini"
+            @click="handleQuery"
+            >搜索</el-button
+          >
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+            >重置</el-button
+          >
+        </el-form>
+
+        <el-table
+          border
+          size="small"
+          v-loading="loading"
+          :data="dataList"
+          align="center"
+          fixed
+        >
+          <el-table-column
+            label="序号"
+            type="index"
+            width="50"
+          ></el-table-column>
+
+          <el-table-column label="机构名称" prop="orgName" />
+          <el-table-column label=">90 低" prop="level_gt90" />
+          <el-table-column label="80-90 中" prop="level_80_90" />
+          <el-table-column label="70-80 高" prop="level_70_80" />
+
+          <el-table-column label="70及以下 极高" prop="level_lt70" />
+        </el-table>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+<script>
+import { mapGetters } from "vuex";
+
+import { list } from "@/api/scorestatistics/scorestatistics.js";
+import OrgTree from "@/components/orgTree";
+import { deptTreeSelect } from "@/api/system/public";
+export default {
+  name: "SocWebIndex",
+  dicts: ["plan_status"],
+
+  components: {
+    OrgTree,
+  },
+  data() {
+    return {
+      targetListChild: [],
+      targetListGrandson: [],
+      loading: false,
+      selectedValues: [],
+      planRoles: [],
+
+      queryParams: {
+        orgId: null,
+        date: "",
+      },
+      // 显示搜索条件
+      showSearch: true,
+
+      dataList: [],
+      deptOptions: [], //机构数组
+    };
+  },
+  created() {
+    this.getList();
+    this.getDeptTree();
+  },
+  mounted() {},
+  computed: {
+    ...mapGetters(["orgId"]),
+  },
+  methods: {
+    /** 查询机构树数据 */
+    getDeptTree() {
+      deptTreeSelect().then((response) => {
+        this.deptOptions = response.data;
+      });
+    },
+    /** treeSelect组件自定义数据*/
+    tenantIdnormalizer(node, instanceId) {
+      if (node.children && !node.children.length) {
+        delete node.children;
+      }
+      return {
+        id: node.id,
+        label: node.shortName,
+        children: node.children,
+      };
+    },
+
+    //获取列表
+    getList() {
+      this.loading = true;
+      // this.queryParams.orgId = this.orgId;
+      list(this.queryParams).then((res) => {
+        this.dataList = res?.rows || [];
+
+        this.loading = false;
+      });
+    },
+
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.queryParams = {
+        orgId: null,
+        date: "",
+      };
+
+      this.getList();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+::v-deep.formTreeItem {
+  .el-form-item__content {
+    width: 264px;
+  }
+}
+</style>

+ 243 - 254
src/views/scorestatistics/index.vue

@@ -1,39 +1,53 @@
 <template>
-    <div class="app-container">
-      <el-row slot="rightBar">
-        <!--用户数据-->
-        <el-col>
-          <!--    搜索条件    -->
-          <el-form
-            :model="queryParams"
-            ref="queryForm"
-            size="small"
-            :inline="true"
-            v-show="showSearch"
-            label-width="100px"
+  <div class="app-container">
+    <el-row slot="rightBar">
+      <!--用户数据-->
+      <el-col>
+        <!--    搜索条件    -->
+        <el-form
+          :model="queryParams"
+          ref="queryForm"
+          size="small"
+          :inline="true"
+          v-show="showSearch"
+          label-width="100px"
+        >
+          <el-form-item label="组织机构" class="formTreeItem">
+            <tree-select
+              v-model="queryParams.orgId"
+              :options="deptOptions"
+              :show-count="true"
+              :normalizer="tenantIdnormalizer"
+              :props="{ checkStrictly: true, label: 'name' }"
+              placeholder="请选择归属机构"
+              clearValueText="清除"
+              :noChildrenText="''"
+              noOptionsText="没有数据"
+              noResultsText="没有搜索结果"
+            />
+          </el-form-item>
+          <el-form-item label="年月">
+            <el-date-picker
+              type="month"
+              v-model="queryParams.date"
+              placeholder="选择年月"
+              value-format="yyyy-MM"
+            >
+            </el-date-picker>
+          </el-form-item>
+          <el-button
+            type="primary"
+            icon="el-icon-search"
+            size="mini"
+            @click="handleQuery"
+            >搜索</el-button
           >
-            <el-form-item label="机构类型">
-              <el-select
-                @change="cleanExecOrgList"
-                prop="orgType"
-                label="机构类型"
-                v-model="queryParams.orgType"
-                placeholder="请选择机构类型"
-                clearable
-              >
-                <el-option
-                  v-for="item in dict.type.sys_org_type"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                >
-                </el-option>
-              </el-select>
-            </el-form-item>
-  
-          </el-form>
-  
-             <!-- 按纽   
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+            >重置</el-button
+          >
+        </el-form>
+
+        <!-- 按纽   
           <el-row :gutter="10" class="mb8">
             <el-col :span="1.5">
               <el-button
@@ -47,234 +61,209 @@
               >
             </el-col>
           </el-row> -->
-          <el-table
-            border
-            height="650"
-            size="small"
-            v-loading="loading"
-            :data="dataList"
-            align="center"
-            fixed
-            @selection-change="handleSelectionChange"
-          >
-            <el-table-column
-              label="序号"
-              type="index"
-              width="50"
-            ></el-table-column>
-            <el-table-column label="机构类型" prop="orgTypeText" />
-            <el-table-column label="指标分类" prop="typeCodeText" />
-            <el-table-column label="指标项目" prop="projectCodeText" />
-            <el-table-column label="指标要点" prop="pointCodeText" />
-            <el-table-column
-              label="扣分方式"
-              prop="evaluateCycle"
-              :formatter="formatterScore"
-            />
-            <el-table-column label="分值" prop="score" />
-  
-            <el-table-column
-              label="操作"
-              width="180"
-              fixed="right"
-              class-name="small-padding fixed-width"
-            >
-              <template slot-scope="{ row }">
-                <el-button
-                  size="mini"
-                  @click="editHandler(row)"
-                  type="text"
-                  icon="el-icon-plus"
-                  >查看</el-button
-                ><el-button
-                  size="mini"
-                  @click="deleteHandler(row)"
-                  type="text"
-                  icon="el-icon-plus"
-                  >重新计算</el-button
-                >
-              </template>
-            </el-table-column>
-          </el-table>
-  
-          <pagination
-            v-show="total > 0"
-            :total="total"
-            :page.sync="queryParams.pageNum"
-            :limit.sync="queryParams.pageSize"
-            @pagination="getList"
+        <el-table
+          border
+          height="650"
+          size="small"
+          v-loading="loading"
+          :data="dataList"
+          align="center"
+          fixed
+          @selection-change="handleSelectionChange"
+        >
+          <el-table-column
+            label="序号"
+            type="index"
+            width="50"
+          ></el-table-column>
+          <el-table-column
+            label="年月"
+            
+            :formatter="formatterScore"
           />
-        </el-col>
-      </el-row>
-  
-      <scorestatisticsDialog ref="Evaluate" :targetList="targetList" @success="getList()"></scorestatisticsDialog>
-    </div>
-  </template>
-  <script>
-  import { mapGetters } from "vuex";
-  import { findAllRole } from "@/api/system/role";
-  import { list, getTargetList ,delelteEvaluate} from "@/api/evaluateRule/rule.js";
-  import OrgTree from "@/components/orgTree";
-  import { toTree } from "@/api/tool/tree.js";
-  import scorestatisticsDialog from "./scorestatisticsDialog.vue";
- 
-  
-  export default {
-    name: "SocWebIndex",
-    dicts: ["sys_org_type", "plan_status"],
-   
-    components: {
-      OrgTree,
-      scorestatisticsDialog,
+          <el-table-column label="机构名称" prop="orgName" />
+          <el-table-column label=">90 低" prop="level_gt90" />
+          <el-table-column label="80-90 中" prop="level_80_90" />
+          <el-table-column label="70-80 高" prop="level_70_80" />
+          
+          <el-table-column label="70及以下 极高" prop="level_lt70" />
+
+          <el-table-column
+            label="操作"
+            width="180"
+            fixed="right"
+            class-name="small-padding fixed-width"
+          >
+            <template slot-scope="{ row }">
+              <el-button
+                size="mini"
+                @click="editHandler(row)"
+                type="text"
+                icon="el-icon-plus"
+                >查看</el-button
+              ><el-button
+                size="mini"
+                @click="anewHandler(row)"
+                type="text"
+                icon="el-icon-plus"
+                >重新计算</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <pagination
+          v-show="total > 0"
+          :total="total"
+          :page.sync="queryParams.page"
+          :limit.sync="queryParams.size"
+          @pagination="getList"
+        />
+      </el-col>
+    </el-row>
+
+    <scorestatisticsDialog
+      ref="Evaluate"
+      :targetList="targetList"
+      @success="getList()"
+    ></scorestatisticsDialog>
+  </div>
+</template>
+<script>
+import { mapGetters } from "vuex";
+import { findAllRole } from "@/api/system/role";
+import {
+  list,
+  anewDetail,
+} from "@/api/scorestatistics/scorestatistics.js";
+import OrgTree from "@/components/orgTree";
+import { newDateMonth } from "@/utils/index.js";
+import scorestatisticsDialog from "./scorestatisticsDialog.vue";
+import { deptTreeSelect } from "@/api/system/public";
+export default {
+  name: "SocWebIndex",
+  dicts: ["sys_org_type", "plan_status"],
+
+  components: {
+    OrgTree,
+    scorestatisticsDialog,
+  },
+  data() {
+    const { params, query } = this.$route;
+    return {
+      targetList: [],
+      targetListChild: [],
+      targetListGrandson: [],
+      loading: false,
+      selectedValues: [],
+      planRoles: [],
+
+      queryParams: {
+        orgId: null,
+        date: newDateMonth('','1'),
+
+        page: 1,
+        size: 10,
+      },
+      // 显示搜索条件
+      showSearch: true,
+      total: 0,
+      dataList: [],
+      deptOptions: [], //机构数组
+    };
+  },
+  created() {
+    this.getList();
+    this.getDeptTree();
+  },
+  mounted() {},
+  computed: {
+    ...mapGetters(["orgId"]),
+  },
+  methods: {
+    /** 查询机构树数据 */
+    getDeptTree() {
+      deptTreeSelect().then((response) => {
+        this.deptOptions = response.data;
+      });
     },
-    data() {
-      const { params, query } = this.$route;
+    /** treeSelect组件自定义数据*/
+    tenantIdnormalizer(node, instanceId) {
+      if (node.children && !node.children.length) {
+        delete node.children;
+      }
       return {
-        targetList: [],
-        targetListChild: [],
-        targetListGrandson: [],
-        loading: false,
-        selectedValues: [],
-        planRoles: [],
-  
-        queryParams: {
-          orgType: null,
-          typeCode: null,
-          projectCode: null,
-          pointCode: null,
-          pageNum: 1,
-          pageSize: 10,
-        },
-        // 显示搜索条件
-        showSearch: true,
-        total: 0,
-        dataList: [],
+        id: node.id,
+        label: node.shortName,
+        children: node.children,
       };
     },
-    created() {
-      this.getList();
-      this.getTargetListHandler();
+    formatterScore({ dataYear,dataMonth }) {
+      return dataYear+'-'+dataMonth
     },
-    mounted() {},
-    computed: {
-      ...mapGetters(["orgId"]),
+
+    //获取列表
+    getList() {
+      this.loading = true;
+      // this.queryParams.orgId = this.orgId;
+      list(this.queryParams).then((res) => {
+        this.dataList = res?.rows || [];
+        this.total = res?.total || [];
+        this.loading = false;
+      });
     },
-    methods: {
-      formatterScore({ deductionType }) {
-        switch (deductionType) {
-          case 1:
-            return "直接扣分";
-            break;
-          case 2:
-            return "最高扣分";
-            break;
-  
-          default:
-            break;
-        }
-      },
-      //获取指标列表
-      getTargetListHandler() {
-        getTargetList().then((res) => {
-          let { msg, code, rows } = res;
-          if (code == 200) {
-            this.targetList = toTree(rows, {
-              id: "code",
-              children: "children",
-              pid: "parentCode",
-            });
-          }
-        });
-      },
-      
-      //获取列表
-      getList() {
-        this.loading = true;
-        // this.queryParams.orgId=this.orgId
-        list(this.queryParams).then((res) => {
-          this.dataList = res?.rows || [];
-          this.total = res?.total || [];
-          this.loading = false;
-        });
-      },
-      // 多选框选中数据
-      handleSelectionChange(selection) {},
-      /** 新增按钮操作 */
-      handleAdd() {
-        this.$refs.Evaluate.show();
-      },
-      editHandler(row) {
-       
-        this.$refs.Evaluate.show(row.id);
-      },
-  
-      deleteHandler(row) {
-        this.$modal
-          .confirm("是否确认删除?")
-          .then(function () {})
-          .then(() => {
-            delelteEvaluate(row.id).then((res) => {
-              let { code, msg } = res;
-              if (code == 200) {
-                this.getList();
-                this.$modal.msgSuccess("删除成功");
-              } else {
-                this.$modal.msgSuccess(msg);
-              }
-            });
+    // 多选框选中数据
+    handleSelectionChange(selection) {},
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.$refs.Evaluate.show();
+    },
+    editHandler(row) {
+      this.$refs.Evaluate.show(row);
+    },
+
+    anewHandler(row) {
+      this.$modal
+        .confirm("重新计算将会等待一段时间,你确定要重新计算吗?")
+        .then(function () {})
+        .then(() => {
+          anewDetail({month:row.dataMonth,year:row.dataYear,orgId:row.orgId}).then((res) => {
+            let { code, msg } = res;
+            if (code == 200) {
+              this.getList();
+              this.$modal.msgSuccess("计算成功");
+            } else {
+              this.$modal.msgSuccess(msg);
+            }
           });
-      },
-      //单选框状态改变
-      checkChange(state) {
-        this.queryParams.checkSub = state;
-        this.getList();
-      },
-      // 节点单击事件
-      clickTreeNode(data) {
-        this.queryParams.orgId = data.id;
-        this.getList();
-      },
-      getRolesByOrg() {
-        let params = {
-          orgType: null,
-        };
-        findAllRole(params).then((res) => {
-          this.planRoles = res.data;
         });
-      },
-      cleanExecOrgList() {
-        this.execOrgIds = null;
-        this.queryParams.execOrgList = [];
-      },
-      handleRolesChange(val) {
-        this.selectedValues = val.toString().split(",");
-      },
-      getDefaultKey(key) {
-        this.queryParams.orgId = key;
-        this.getList();
-      },
-      /** 搜索按钮操作 */
-      handleQuery() {
-        this.queryParams.pageNum = 1;
-        this.getList();
-      },
-      /** 重置按钮操作 */
-      resetQuery() {
-        this.queryParams = {
-          orgType: null,
-          typeCode: null,
-          projectCode: null,
-          pointCode: null,
-          pageNum: 1,
-          pageSize: 10,
-        };
-  
-        this.getList();
-      },
-     
+    },
     
+   
+
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.page = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.queryParams = {
+        orgId: null,
+        date: "",
+        page: 1,
+        size: 10,
+      };
+
+      this.getList();
     },
-  };
-  </script>
-  <style lang="scss" scoped></style>
-  
+  },
+};
+</script>
+<style lang="scss" scoped>
+::v-deep.formTreeItem {
+  .el-form-item__content {
+    width: 264px;
+  }
+}
+</style>

+ 146 - 379
src/views/scorestatistics/scorestatisticsDialog.vue

@@ -1,386 +1,153 @@
 <template>
-    <div class="rule-type">
-      <DialogCom
-        @colse="onHide"
-        :title="`${id ? '编辑' : '新增'}评价规则`"
-        :visible.sync="isShow"
-        width="900px"
-        destroy-on-close
-      >
-        <div class="page-body">
-          <el-form
-            :model="queryParams"
-            :rules="formDataRules"
-            size="small"
-            ref="form"
-            label-position="right"
-            label-width="130px"
-            label-prefix=":"
-          >
-            <el-row>
-              <el-col :span="12">
-                <el-form-item prop="orgType" label="机构类型:">
-                  <el-select
-                    label="机构类型"
-                    name="orgType"
-                    v-model="queryParams.orgType"
-                    placeholder="请选择机构类型"
-                    @change="onOrgTypeChanged"
-                    clearable
-                  >
-                    <el-option
-                      v-for="item in dict.type.sys_org_type"
-                      :key="item.value"
-                      :label="item.label"
-                      :value="item.value"
-                    >
-                    </el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item prop="typeCode" label="指标类型:">
-                  <el-select
-                    label="指标类型"
-                    v-model="queryParams.typeCode"
-                    placeholder="请选择指标类型"
-                    @change="changeTargetList"
-                  >
-                    <el-option
-                      v-for="item in targetList"
-                      :key="item.id"
-                      :label="item.name"
-                      :value="item.code"
-                    >
-                    </el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <el-row>
-              <el-col :span="12">
-                <el-form-item prop="projectCode" label="指标项目:">
-                  <el-select
-                    label="指标项目"
-                    v-model="queryParams.projectCode"
-                    placeholder="请选择指标项目"
-                    @change="changeTargetListChild"
-                  >
-                    <el-option
-                      v-for="item in targetListChild"
-                      :key="item.id"
-                      :label="item.name"
-                      :value="item.code"
-                    >
-                    </el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item prop="pointCode" label="指标要点:">
-                  <el-select
-                    label="指标要点"
-                    v-model="queryParams.pointCode"
-                    placeholder="请选择指标要点"
-                  >
-                    <el-option
-                      v-for="item in targetListGrandson"
-                      :key="item.id"
-                      :label="item.name"
-                      :value="item.code"
-                    >
-                    </el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <el-row>
-              <el-col :span="12">
-                <el-form-item label="扣分方式:">
-                  <el-radio-group v-model="queryParams.deductionType">
-                    <el-radio :label="1">直接扣分</el-radio>
-                    <el-radio :label="2">最高扣分</el-radio>
-                  </el-radio-group>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item prop="score" label="分值:">
-                  <el-input
-                    placeholder="请输入分值"
-                    v-model.number="queryParams.score"
-                    clearable
-                  >
-                  </el-input>
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <el-row>
-              <el-col :span="24">
-                <el-form-item prop="formula" label="公式说明:">
-                  <el-input
-                    v-model="queryParams.formula"
-                    clearable
-                    type="textarea"
-                    :autosize="{ minRows: 2, maxRows: 4 }"
-                  />
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <el-row>
-              <el-col :span="24">
-                <el-form-item label="备注:">
-                  <el-input
-                    v-model="queryParams.remark"
-                    type="textarea"
-                    :autosize="{ minRows: 2, maxRows: 4 }"
-                    clearable
-                  />
-                </el-form-item>
-              </el-col>
-            </el-row>
-          </el-form>
-          <el-button @click="openSelect">新增扣分规则</el-button>
-  
-          <el-table :data="tableData" style="width: 100%" height="400px">
-            <el-table-column label="序号" type="index" width="50">
-            </el-table-column>
-            <el-table-column prop="indicatorNote" label="计算项目">
-            </el-table-column>
-            <el-table-column
-              prop="calculateType"
-              label="计算类型"
-              :formatter="formatterCalculateType"
-            >
-            </el-table-column>
-            <el-table-column prop="indicatorDays" label="连续数">
-            </el-table-column>
-            <el-table-column prop="itemValue" label="系数"> </el-table-column>
-            <el-table-column label="操作">
-              <template v-slot="{ row }">
-                <el-button type="text" @click="removeRow(row)">移除</el-button>
-                <el-button type="text" @click="editRow(row)">编辑</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-  
-        <div slot="footer" class="dialog-footer">
-          <el-button @click="onHide">取消</el-button>
-          <el-button type="primary" @click="onSubmit">确定</el-button>
-        </div>
-      </DialogCom>
-     
-    </div>
-  </template>
-  
-  <script>
-  import dayjs from "dayjs";
-  import { mapGetters } from "vuex";
-  import { findAllRole } from "@/api/system/role";
-  import { guid } from "@/utils/index.js";
-  import {
-    addTargetEvaluate,
-    getEvaluateById,
-    editTargetEvaluate,
-  } from "@/api/evaluateRule/rule.js";
-  
-  export default {
-    dicts: ["evaluate_cycle", "sys_org_type"],
-    data() {
-      return {
-        input: "",
-        evaluateName: null,
-        planType: null,
-        typeCode: null,
-        planStatus: null,
-        orgType: null,
-        roleNames: null,
-  
-        tableData: [],
-        id: null,
-        isShow: false,
-        queryParams: {
-          pointCode: "",
-          typeCode: "",
-          orgType: "",
-          projectCode: "",
-          deductionType: 1,
-          formula: "",
-          score:'',
-          remark:'',
-        },
-        formDataRules: {
-          pointCode: [{ required: true, message: "请选择指标要点" }],
-          score: [
-            { type: "number", message: "分值只能为数字" },
-            { required: true, message: "请输入分值" },
-          ],
-          orgType: [{ required: true, message: "请选择评价机构类型" }],
-          typeCode: [{ required: true, message: "请选择指标类型" }],
-          projectCode: [{ required: true, message: "请选择指标项目" }],
-        },
-      };
-    },
-    props: {
-      targetList: {
-        type: Array,
+  <div class="rule-type">
+    <DialogCom
+      @colse="onHide"
+      title="查看"
+      :visible.sync="isShow"
+      width="1400px"
+      destroy-on-close
+      @open="openHandler"
+    >
+      <div class="page-body">
+        <el-form
+          :model="queryParams"
+          size="small"
+          ref="form"
+          label-position="right"
+          label-width="130px"
+          label-prefix=":"
+          :inline="true"
+        >
+          <el-form-item label="年月:"> {{ queryParams.date }}</el-form-item>
+          <el-form-item label="机构名称:"
+            >{{ queryParams.orgName }}
+          </el-form-item>
+        </el-form>
+
+        <el-table :data="tableData" style="width: 100%" height="400px">
+          <el-table-column label="序号" type="index" width="50">
+          </el-table-column>
+          <el-table-column prop="indicatorNote" label="营业场所">
+          </el-table-column>
+          <el-table-column prop="indicatorDays" label="场所分类">
+          </el-table-column>
+          <el-table-column prop="indicatorDays" label="安全指数">
+          </el-table-column>
+          <el-table-column prop="indicatorDays" label="安全等级">
+          </el-table-column>
+        </el-table>
+        <pagination
+          v-show="total > 0"
+          :total="total"
+          :page.sync="queryParams.page"
+          :limit.sync="queryParams.size"
+          @pagination="getDetailList"
+        />
+      </div>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="onHide">取消</el-button>
+        <!-- <el-button type="primary" @click="onSubmit">确定</el-button> -->
+      </div>
+    </DialogCom>
+  </div>
+</template>
+
+<script>
+import dayjs from "dayjs";
+import { mapGetters } from "vuex";
+import { detail } from "@/api/scorestatistics/scorestatistics.js";
+import { guid } from "@/utils/index.js";
+import {
+  addTargetEvaluate,
+  getEvaluateById,
+  editTargetEvaluate,
+} from "@/api/evaluateRule/rule.js";
+
+export default {
+  dicts: ["evaluate_cycle", "sys_org_type"],
+  data() {
+    return {
+      tableData: [],
+      id: null,
+      isShow: false,
+      total: 0,
+      queryParams: {
+        page: 1,
+        size: 10,
+        orgId: "",
+        date: null,
+        levelId: "",
+        orgName: null,
       },
+    };
+  },
+  props: {
+    targetList: {
+      type: Array,
     },
-    watch: {},
-    computed: {
-      ...mapGetters(["orgId", "orgName"]),
-    },
-    mounted() {},
-    methods: {
-      //数据格式化
-      formatterCalculateType(row) {
-        switch (row.calculateType) {
-          case 1:
-            return "累计数";
-            break;
-          case 2:
-            return "连续数";
-            break;
-          case 3:
-            return "分类";
-            break;
-          case 4:
-            return "固化值";
-            break;
-  
-          default:
-            break;
-        }
-      },
-  
+  },
+  watch: {},
+
+  mounted() {},
+  methods: {
+    onOrgTypeChanged() {},
+    show(row) {
      
-      onOrgTypeChanged() {},
-      async show(id = "", other = {}) {
-        this.id = id;
-        this.tableData = [];
-  
-        // await this.refresh(id, other);
-  
-        if (id) {
-          await getEvaluateById(id).then((res) => {
-            let { code, msg, data } = res;
-            if (code == 200) {
-              Object.assign(this.queryParams, data);
-              this.changeTargetList(this.queryParams.typeCode,1)
-              this.changeTargetListChild(this.queryParams.projectCode,1)
-              this.tableData = data.itemList;
-              this.tableData.forEach(item=>{
-                item.uid=guid()
-              })
-              delete this.queryParams.itemList;
-              console.log(this.queryParams);
-            } else {
-              this.$message.error(msg);
-            }
-          });
+      let month=row.dataMonth+''
+      this.queryParams.date = row.dataYear + "-" + (row.dataMonth<10? '0'+month:month);
+      this.queryParams.orgName = row.orgName;
+      this.queryParams.orgId = row.orgId;
+      this.queryParams.levelId = row.levelId;
+      this.tableData = [];
+
+      this.getDetailList();
+    },
+    //获取分页数据
+    getDetailList() {
+      detail(this.queryParams).then((res) => {
+        let { code, msg, data } = res;
+        if (code == 200) {
+          this.tableData = [];
+          this.isShow = true;
+        } else {
+          this.$message.error(msg);
         }
-        this.isShow = true;
-      },
-      removeRow(row) {
-        this.$modal
-          .confirm("是否确认删除?")
-          .then(function () {})
-          .then(() => {
-            this.tableData = this.tableData.filter(
-              (item) => item.uid !== row.uid
-            );
-            this.$modal.msgSuccess("删除成功");
-          });
-      },
-      editRow(row) {
-        this.$refs.dialogEvaluate.show();
-        this.$refs.dialogEvaluate.ruleForm = JSON.parse(JSON.stringify(row));
-      },
-      // 事件
-      onHide() {
-        this.$refs.form.resetFields();
-        this.isShow = false;
-        this.queryParams = {
-          pointCode: "",
-          typeCode: "",
-          orgType: "",
-          score:'',
-          projectCode: "",
-          deductionType: 1,
-          formula: "",
-          remark:'',
-        };
-  
-        this.tableData = [];
-      },
-  
-      openSelect() {
-        this.$refs.dialogEvaluate.show();
-      },
-      onSubmit() {
-        this.$refs.form.validate(async (isValidate) => {
-          if (isValidate) {
-            if (this.tableData.length == 0) {
-              return this.$message.error("扣分规则项不能为空");
-            }
-  
-            let obj = {
-              ...this.queryParams,
-              itemList: this.tableData,
-            };
-  
-            if (this.queryParams.id) {
-              //编辑
-  
-              editTargetEvaluate(obj).then((res) => {
-                let { code, msg } = res;
-                if (code == 200) {
-                  this.$message.success(msg);
-                  this.$emit("success");
-                  this.onHide();
-                } else {
-                  this.$message.error(msg);
-                }
-              });
-            } else {
-              //新增
-              addTargetEvaluate(obj).then((res) => {
-                let { code, msg } = res;
-                if (code == 200) {
-                  this.$message.success(msg);
-                  this.$emit("success");
-                  this.onHide();
-                } else {
-                  this.$message.error(msg);
-                }
-              });
-            }
-            // this.$emit("success");
-            // this.onHide();
-          }
-        });
-      },
-  
-      // 事件
-      //apimark//
+      });
     },
-  };
-  </script>
-  
-  <style lang="scss" scoped>
-  .brand_info {
-    .el-form {
-      width: 600px;
-      padding-top: 40px;
-    }
-  }
-  .form-item-comment {
-    font-size: 12px;
-    color: #999;
-    height: 10px;
-  }
-  .el-select {
-    width: 100%;
+    // 事件
+    onHide() {
+      this.$refs.form.resetFields();
+      this.isShow = false;
+      this.queryParams = {
+        page: 1,
+        size: 10,
+      };
+
+      this.tableData = [];
+    },
+    //打开前的回调
+    openHandler() {},
+
+    // 事件
+    //apimark//
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.brand_info {
+  .el-form {
+    width: 600px;
+    padding-top: 40px;
   }
-  </style>
-  
+}
+.form-item-comment {
+  font-size: 12px;
+  color: #999;
+  height: 10px;
+}
+.el-select {
+  width: 100%;
+}
+</style>