Browse Source

带按摩提交

xiao547607 4 years ago
parent
commit
44d56f9998

+ 1 - 0
.env.development

@@ -2,6 +2,7 @@ OUT_PUT_DIR=dist/enterprise-portal
 
 VUE_APP_BACKEND_URL=http://127.0.0.1:8086/enterprise-federation
 #VUE_APP_BACKEND_URL=http://ykt-test.xiaoxinda.com/enterprise-server
+#VUE_APP_BACKEND_URL=http://qylhhapi.xiaoxinda.com/enterprise-server
 
 #手机企业版
 VUE_APP_COMPANY_HEALTH_WECHAT_QY_URL=http://wisdomhousewechat.sudaonline.net/prevention/motemwall.html 

+ 2 - 2
.env.production

@@ -1,6 +1,6 @@
-OUT_PUT_DIR=dist/enterprise-portal
+OUT_PUT_DIR=dist/qylhh-admin
 
-VUE_APP_BACKEND_URL=http://ykt-test.xiaoxinda.com/enterprise-server
+VUE_APP_BACKEND_URL=http://qylhhapi.xiaoxinda.com/enterprise-server
 
 #手机企业版
 VUE_APP_COMPANY_HEALTH_WECHAT_QY_URL=https://xpgjapi.xiaoxinda.com/healthPublicity

+ 50 - 0
src/api/base/industryInfo.js

@@ -0,0 +1,50 @@
+import request from '@/utils/request'
+import constant from '@/constant'
+
+function pageList(formData){
+  return request.post(constant.serverUrl + "/base/industryInfo/pageList", formData);
+}
+
+function create(){
+  return request.get(constant.serverUrl + "/base/industryInfo/create");
+}
+
+function edit(id){
+  return request.get(constant.serverUrl + "/base/industryInfo/edit/" + id);
+}
+
+function add(formModel){
+  return request.post(constant.serverUrl + "/base/industryInfo/add", formModel,{
+    headers: {
+      "Content-Type": "application/json"
+    }
+  });
+}
+
+function update(formModel){  
+  return request.post(constant.serverUrl + "/base/industryInfo/update", formModel,{
+    headers: {
+      "Content-Type": "application/json"
+    }
+  });
+}
+
+function remove(id){
+  return request.post(constant.serverUrl + "/base/industryInfo/delete/" + id);
+}
+
+function batchRemove(idList){
+  return request.post(constant.serverUrl + "/base/industryInfo/batchDelete",idList,{
+    headers: {
+      "Content-Type": "application/json"
+    }
+  });
+}
+
+function list(formData){
+  return request.post(constant.serverUrl + "/base/industryInfo/list",formData);
+}
+
+export default {
+  list,create,edit,add,update,remove,batchRemove,pageList
+}

+ 2 - 2
src/api/base/newsType.js

@@ -41,8 +41,8 @@ function batchRemove(idList){
   });
 }
 
-function list(){
-  return request.post(constant.serverUrl + "/base/newsType/list");
+function list(formData){
+  return request.post(constant.serverUrl + "/base/newsType/list",formData);
 }
 
 export default {

+ 13 - 2
src/routers/modules/base.js

@@ -21,7 +21,7 @@ var routers = [
                         roles: ["admin"],
                         title: '企业人员管理'
                 }
-        },{
+        }, {
                 path: '/base/newsType/list',
                 name: 'BaseNewsTypeList',
                 // route level code-splitting
@@ -32,7 +32,7 @@ var routers = [
                         roles: ["admin"],
                         title: '新闻分类管理'
                 }
-        },{
+        }, {
                 path: '/base/newsInfo/list',
                 name: 'BaseNewsInfoList',
                 // route level code-splitting
@@ -43,6 +43,17 @@ var routers = [
                         roles: ["admin"],
                         title: '新闻管理'
                 }
+        }, {
+                path: '/base/industryInfo/list',
+                name: 'BaseIndustryInfoList',
+                // route level code-splitting
+                // this generates a separate chunk (about.[hash].js) for this route
+                // which is lazy-loaded when the route is visited.
+                component: () => import('@/views/base/industryInfo-list.vue'),
+                meta: {
+                        roles: ["admin"],
+                        title: '行业管理'
+                }
         },
 ]
 

+ 56 - 53
src/views/base/companyInfo-detail.vue

@@ -79,19 +79,13 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="所属行业" prop="industry">
-              <el-select
+              <el-select-tree
+                :props="props"
+                :options="industryList"
                 v-model="formModel.industry"
-                filterable
-                placeholder="请选择"
-                style="width: 200px"
-              >
-                <el-option
-                  v-for="industry in industryResult"
-                  :key="industry.value"
-                  :label="industry.name"
-                  :value="industry.value"
-                ></el-option>
-              </el-select>
+                size=""
+                height="200"
+              ></el-select-tree>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -174,6 +168,8 @@
 import Constant from "@/constant";
 import companyInfoApi from "@/api/base/companyInfo";
 import dataDictionaryApi from "@/api/sys/dataDictionary";
+import industryInfoApi from "@/api/base/industryInfo";
+import SelectTree from "@/components/SelectTree";
 
 import { getToken } from "@/utils/auth"; // get token from cookie
 
@@ -186,34 +182,34 @@ export default {
         companyName: [
           { required: true, message: "企业名称不能为空", trigger: "blur" },
         ],
-        type: [
-          {
-            required: true,
-            message: "企业类型不能为空",
-            trigger: "blur",
-          },
-        ],
-        scale: [
-          {
-            required: true,
-            message: "企业规模不能为空",
-            trigger: "blur",
-          },
-        ],
-        industry: [
-          {
-            required: true,
-            message: "所属行业不能为空",
-            trigger: "blur",
-          },
-        ],
-        region: [
-          {
-            required: true,
-            message: "所在地区不能为空",
-            trigger: "blur",
-          },
-        ],
+        // type: [
+        //   {
+        //     required: true,
+        //     message: "企业类型不能为空",
+        //     trigger: "blur",
+        //   },
+        // ],
+        // scale: [
+        //   {
+        //     required: true,
+        //     message: "企业规模不能为空",
+        //     trigger: "blur",
+        //   },
+        // ],
+        // industry: [
+        //   {
+        //     required: true,
+        //     message: "所属行业不能为空",
+        //     trigger: "blur",
+        //   },
+        // ],
+        // region: [
+        //   {
+        //     required: true,
+        //     message: "所在地区不能为空",
+        //     trigger: "blur",
+        //   },
+        // ],
       },
       showDialog: true,
       loading: false,
@@ -232,11 +228,26 @@ export default {
         Authorization: getToken(),
       },
       //上传图片end
+      industryList: [],
+      props: {
+        // 配置项(必选)
+        value: "id",
+        label: "industryName",
+      },
     };
   },
   created() {
     var self = this;
 
+    industryInfoApi.list().then(function (response) {
+      var jsonData = response.data;
+      if (jsonData.result) {
+        if (jsonData.data != null && jsonData.data != "") {
+          self.industryList = jsonData.data;
+        }
+      }
+    });
+
     dataDictionaryApi
       .findByCatalogName({
         catalogName: "企业类型",
@@ -255,15 +266,6 @@ export default {
         this.scaleResult = jsonData.data;
       });
 
-    dataDictionaryApi
-      .findByCatalogName({
-        catalogName: "所属行业",
-      })
-      .then((response) => {
-        var jsonData = response.data;
-        this.industryResult = jsonData.data;
-      });
-
     dataDictionaryApi
       .findByCatalogName({
         catalogName: "区域",
@@ -316,8 +318,7 @@ export default {
       this.loading = false;
       var self = this;
       self.formModel.businessLicenseUrl = res.data;
-      self.fileUrl =
-        res.data + "?x-oss-process=image/resize,m_lfit,w_200";
+      self.fileUrl = res.data + "?x-oss-process=image/resize,m_lfit,w_200";
     },
     beforeAvatarUpload(file) {
       this.loading = true;
@@ -353,8 +354,7 @@ export default {
           let businessLicenseUrl = self.formModel.businessLicenseUrl;
           if (businessLicenseUrl != null) {
             self.fileUrl =
-              businessLicenseUrl +
-              "?x-oss-process=image/resize,m_lfit,h_200";
+              businessLicenseUrl + "?x-oss-process=image/resize,m_lfit,h_200";
           }
         } else {
           self.$message.error(jsonData.message + "");
@@ -364,5 +364,8 @@ export default {
         self.$message.error(error + "");
       });
   },
+  components: {
+    "el-select-tree": SelectTree,
+  },
 };
 </script>

+ 30 - 25
src/views/base/companyInfo-list.vue

@@ -75,20 +75,13 @@
         </el-select>
       </el-form-item>
       <el-form-item label="所属行业" prop="industry">
-        <el-select
-          v-model="queryModel.industry"
-          filterable
-          placeholder="请选择"
-          style="width: 150px"
-          size="mini"
-        >
-          <el-option
-            v-for="industry in industryResult"
-            :key="industry.value"
-            :label="industry.name"
-            :value="industry.value"
-          ></el-option>
-        </el-select>
+        <el-select-tree
+            :props="props"
+            :options="industryList"
+            v-model="queryModel.industry"
+            size="mini"
+            height="200"
+          ></el-select-tree>
       </el-form-item>
       <el-form-item>
         <el-button
@@ -167,7 +160,7 @@
         width="120"
       ></el-table-column>
       <el-table-column
-        prop="industryN"
+        prop="industryName"
         label="所属行业"
         width="150"
       ></el-table-column>
@@ -305,6 +298,8 @@ import Constant from "@/constant";
 import CompanyInfoDetail from "./companyInfo-detail";
 import companyInfoApi from "@/api/base/companyInfo";
 import dataDictionaryApi from "@/api/sys/dataDictionary";
+import industryInfoApi from "@/api/base/industryInfo";
+import SelectTree from "@/components/SelectTree";
 import NProgress from "nprogress"; // progress bar
 import "nprogress/nprogress.css"; // progress bar style
 
@@ -353,11 +348,26 @@ export default {
       },
       xlsLoading: false,
       //导入E
+      industryList:[],
+      props: {
+        // 配置项(必选)
+        value: "id",
+        label: "industryName",
+      },
     };
   },
   created() {
     var self = this;
 
+    industryInfoApi.list().then(function (response) {
+      var jsonData = response.data;
+      if (jsonData.result) {
+        if (jsonData.data != null && jsonData.data != "") {
+          self.industryList = jsonData.data;
+        }
+      }
+    });
+
     dataDictionaryApi
       .findByCatalogName({
         catalogName: "企业类型",
@@ -376,15 +386,6 @@ export default {
         this.scaleResult = jsonData.data;
       });
 
-    dataDictionaryApi
-      .findByCatalogName({
-        catalogName: "所属行业",
-      })
-      .then((response) => {
-        var jsonData = response.data;
-        this.industryResult = jsonData.data;
-      });
-
     dataDictionaryApi
       .findByCatalogName({
         catalogName: "区域",
@@ -411,9 +412,12 @@ export default {
       formData.append("companyName", self.queryModel.companyName);
       formData.append("type", self.queryModel.type);
       formData.append("scale", self.queryModel.scale);
-      formData.append("industry", self.queryModel.industry);
       formData.append("region", self.queryModel.region);
 
+      if (self.queryModel.industry != null) {
+        formData.append("industry", self.queryModel.industry);
+      }
+
       if (this.field != null) {
         formData.append("field", this.field);
       }
@@ -584,6 +588,7 @@ export default {
   },
   components: {
     "companyInfo-detail": CompanyInfoDetail,
+    "el-select-tree": SelectTree,
   },
 };
 </script>

+ 166 - 0
src/views/base/industryInfo-detail.vue

@@ -0,0 +1,166 @@
+
+<style scoped>
+.user-panel {
+  margin: 10px auto;
+}
+</style>
+<template>
+  <el-dialog
+    :visible.sync="showDialog"
+    :title="title"
+    :modal-append-to-body="false"
+    style="text-align: left"
+    @close="closeDialog"
+    :close-on-click-modal="false"
+  >
+    <div class="user-panel" v-loading="loading">
+      <el-form
+        ref="form"
+        :model="formModel"
+        :rules="ruleValidate"
+        :label-width="'100px'"
+      >
+        <el-form-item label="行业名称" prop="industryName">
+          <el-input
+            v-model="formModel.industryName"
+            placeholder="请输入行业名称"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="上级类型" prop="parentId">
+          <el-select-tree
+            :props="props"
+            :options="industryList"
+            v-model="formModel.parentId"
+            size="mediumn"
+            height="200"
+          ></el-select-tree>
+        </el-form-item>
+        <el-form-item label="排序号" prop="sortNo">
+          <el-input-number
+            v-model="formModel.sortNo"
+            :min="1"
+            style="width: 300px"
+          ></el-input-number>
+        </el-form-item>
+      </el-form>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="closeDialog">取 消</el-button>
+      <el-button type="primary" @click="handleSubmit" :loading="submitting"
+        >确 定</el-button
+      >
+    </span>
+  </el-dialog>
+</template>
+<script>
+import Constant from "@/constant";
+import industryInfoApi from "@/api/base/industryInfo";
+import SelectTree from "@/components/SelectTree";
+
+export default {
+  props: ["businessKey", "title"],
+  data() {
+    return {
+      formModel: {},
+      ruleValidate: {
+        industryName: [
+          { required: true, message: "行业名称不能为空", trigger: "blur" },
+        ],
+        sortNo:[
+          { required: true, message: "不能为空", trigger: "blur" },
+        ]
+      },
+      showDialog: true,
+      loading: false,
+      submitting: false,
+      industryList: [],
+      props: {
+        // 配置项(必选)
+        value: "id",
+        label: "industryName",
+      },
+    };
+  },
+  created() {
+    var self = this;
+    var formData = new FormData();
+    formData.append("queryParent", true);
+    industryInfoApi.list(formData).then(function (response) {
+      var jsonData = response.data;
+      if (jsonData.result) {
+        if (jsonData.data != null && jsonData.data != "") {
+          self.industryList = jsonData.data;
+        }
+      }
+    });
+  },
+  methods: {
+    closeDialog() {
+      this.$emit("close", false);
+    },
+    handleSubmit() {
+      var self = this;
+
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          (function () {
+            var id = self.formModel.id;
+
+            if (id == null || id.length == 0) {
+              return industryInfoApi.add(self.formModel);
+            } else {
+              return industryInfoApi.update(self.formModel);
+            }
+          })().then(function (response) {
+            var jsonData = response.data;
+
+            if (jsonData.result) {
+              self.$message({
+                message: "保存成功!",
+                type: "success",
+              });
+
+              self.$emit("close", true);
+            } else {
+              self.$message({
+                message: jsonData.message + "",
+                type: "warning",
+              });
+
+              self.$emit("close", false);
+            }
+          });
+        }
+      });
+    },
+  },
+  mounted: function () {
+    var self = this;
+
+    (function () {
+      if (self.businessKey.length == 0) {
+        return industryInfoApi.create();
+      } else {
+        return industryInfoApi.edit(self.businessKey);
+      }
+    })()
+      .then((response) => {
+        var jsonData = response.data;
+        self.loading = false;
+
+        if (jsonData.result) {
+          self.formModel = jsonData.data;
+        } else {
+          self.$message.error(jsonData.message + "");
+        }
+      })
+      .catch((error) => {
+        self.$message.error(error + "");
+      });
+  },
+  components: {
+    "el-select-tree": SelectTree,
+  },
+};
+</script>

+ 318 - 0
src/views/base/industryInfo-list.vue

@@ -0,0 +1,318 @@
+<template>
+  <div>
+    <el-breadcrumb separator=">">
+      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
+      <el-breadcrumb-item>
+        <a href="#">系统管理</a>
+      </el-breadcrumb-item>
+      <el-breadcrumb-item>
+        <a href="/industryInfo">行业管理</a>
+      </el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-divider></el-divider>
+    <!--
+      要resetFields起作用,必须配置:model和prop
+    -->
+    <el-form
+      ref="queryForm"
+      :model="queryModel"
+      inline
+      class="demo-form-inline"
+    >
+      <el-form-item label="行业名称" prop="name">
+        <el-input type="text" size="mini" v-model="queryModel.name"></el-input>
+      </el-form-item>
+      <el-form-item label="上级行业" prop="parentName">
+        <el-input
+          type="text"
+          size="mini"
+          v-model="queryModel.parentName"
+        ></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button
+          type="primary"
+          size="mini"
+          icon="ios-search"
+          @click="changePage(1)"
+          :loading="loading"
+          >查询</el-button
+        >&nbsp;
+        <el-button
+          type="info"
+          size="mini"
+          style="margin-left: 8px"
+          @click="handleReset('queryForm')"
+          >重置</el-button
+        >&nbsp;
+      </el-form-item>
+    </el-form>
+    <el-divider></el-divider>
+    <el-row class="button-group">
+      <el-button
+        type="primary"
+        size="small"
+        plain
+        icon="el-icon-circle-plus"
+        @click="handleAdd"
+        >新增</el-button
+      >
+      <el-button
+        type="primary"
+        size="small"
+        plain
+        icon="el-icon-circle-plus"
+        :disabled="multipleSelection.length == 0"
+        @click="handleBatchDelete"
+        >删除选中项</el-button
+      >
+    </el-row>
+    <el-table
+      :data="tableData"
+      style="min-height: 400px"
+      v-loading="loading"
+      stripe
+      @sort-change="sortChange"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55"></el-table-column>
+      <el-table-column
+        type="index"
+        label="序号"
+        :index="indexMethod"
+        width="50"
+      ></el-table-column>
+      <el-table-column
+        prop="industryName"
+        label="行业名称"
+        width="180"
+      ></el-table-column>
+      <el-table-column
+        prop="parentName"
+        label="上级"
+        width="180"
+      ></el-table-column>
+      <el-table-column
+        prop="sortNo"
+        label="排序号"
+        width="80"
+      ></el-table-column>
+      <el-table-column label="操作">
+        <template slot-scope="{ row }">
+          <el-button size="mini" type="warning" @click="handleEdit(row)"
+            >编辑</el-button
+          >
+          <el-button size="mini" type="danger" @click="handleDelete(row)"
+            >删除</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      :current-page.sync="pageIndex"
+      :total="totalElements"
+      :page-sizes="pageSizeList"
+      @current-change="changePage"
+      @size-change="pageSizeChange"
+      layout="total, sizes, prev, pager, next, jumper"
+    ></el-pagination>
+    <industryInfo-detail
+      v-if="showModal"
+      :businessKey="businessKey"
+      :title="modalTitle"
+      @close="onDetailModalClose"
+    ></industryInfo-detail>
+  </div>
+</template>
+<script>
+import Constant from "@/constant";
+import IndustryInfoDetail from "./industryInfo-detail";
+import industryInfoApi from "@/api/base/industryInfo";
+import NProgress from "nprogress"; // progress bar
+import "nprogress/nprogress.css"; // progress bar style
+
+export default {
+  name: "BaseIndustryInfoList",
+  data() {
+    var self = this;
+
+    return {
+      queryModel: {
+        name: "",
+        parentName: "",
+      },
+      loading: false,
+      tableData: [],
+      pageIndex: 1,
+      pageSize: 10,
+      totalPages: 0,
+      totalElements: 0,
+      field: "",
+      direction: "",
+      pageSizeList: [10, 20, 30],
+      multipleSelection: [],
+      showModal: false,
+      modalTitle: "",
+      businessKey: "",
+    };
+  },
+  methods: {
+    indexMethod(index) {
+      return (this.pageIndex - 1) * this.pageSize + (index + 1);
+    },
+    changePage(pageIndex) {
+      var self = this;
+
+      self.loading = true;
+
+      self.pageIndex = pageIndex;
+      var formData = new FormData();
+
+      formData.append("pageIndex", self.pageIndex);
+      formData.append("pageSize", self.pageSize);
+
+      formData.append("name", self.queryModel.name);
+      formData.append("parentName", self.queryModel.parentName);
+
+      if (this.field != null) {
+        formData.append("field", this.field);
+      }
+
+      if (this.direction != null) {
+        formData.append("direction", this.direction);
+      }
+
+      industryInfoApi
+        .pageList(formData)
+        .then(function (response) {
+          self.loading = false;
+
+          var jsonData = response.data.data;
+
+          self.tableData = jsonData.data;
+          self.totalPages = jsonData.totalPages;
+          self.totalElements = jsonData.recordsTotal;
+        })
+        .catch((error) => {
+          self.loading = false;
+          // self.$message.error(error + "");
+        });
+    },
+    pageSizeChange(pageSize) {
+      this.pageSize = pageSize;
+
+      this.$nextTick(() => {
+        this.changePage(this.pageIndex);
+      });
+    },
+    sortChange(data) {
+      this.field = data.column.field;
+      this.direction = data.order;
+
+      this.changePage(this.pageIndex);
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    handleReset(name) {
+      this.$refs[name].resetFields();
+    },
+    handleAdd() {
+      this.modalTitle = "新增";
+      this.businessKey = "";
+      this.showModal = true;
+    },
+    handleEdit(record) {
+      this.modalTitle = "编辑";
+      this.businessKey = record.id;
+      this.showModal = true;
+    },
+    handleDelete(record) {
+      var self = this;
+
+      self
+        .$confirm("是否确认删除?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+        .then(() => {
+          industryInfoApi.remove(record.id).then(function (response) {
+            var jsonData = response.data;
+
+            if (jsonData.result) {
+              // var index = self.tableData.indexOf(record);
+              // self.tableData.splice(index, 1);
+              self.changePage(self.pageIndex);
+
+              self.$message({
+                type: "success",
+                message: "删除成功!",
+              });
+            }
+          });
+        });
+    },
+    handleBatchDelete() {
+      var self = this;
+
+      var idList = this.multipleSelection.map((record) => {
+        return record.id;
+      });
+
+      this.$confirm("是否确认删除选中项?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        industryInfoApi.batchRemove(idList).then(function (response) {
+          var jsonData = response.data;
+
+          if (jsonData.result) {
+            self.changePage(self.pageIndex);
+
+            self.$message({
+              type: "success",
+              message: "删除成功!",
+            });
+          }
+        });
+      });
+    },
+    onDetailModalClose(refreshed) {
+      //保存成功后回调
+      this.showModal = false;
+
+      if (refreshed) {
+        this.changePage(this.pageIndex);
+      }
+    },
+  },
+  mounted: function () {
+    this.changePage(1);
+  },
+  components: {
+    "industryInfo-detail": IndustryInfoDetail,
+  },
+};
+</script>
+<style lang="scss" scoped>
+.el-breadcrumb {
+  margin: 10px;
+  line-height: 20px;
+}
+
+.el-divider {
+  margin: 5px 0;
+}
+
+.demo-form-inline {
+  margin-left: 10px;
+  text-align: left;
+}
+
+.button-group {
+  margin-left: 10px;
+  text-align: left;
+}
+</style>

+ 10 - 0
src/views/base/newsInfo-detail.vue

@@ -89,6 +89,13 @@
             ></mce-editor>
           </el-form-item>
         </el-row>
+        <el-form-item label="排序号" prop="sortNo">
+          <el-input-number
+            v-model="formModel.sortNo"
+            :min="1"
+            style="width: 300px"
+          ></el-input-number>
+        </el-form-item>
         <el-row>
           <el-form-item label="是否首页展示(轮播)" prop="topFlag">
             <el-radio-group v-model="formModel.topFlag">
@@ -129,6 +136,9 @@ export default {
         companyId: [{ required: true, message: "请选择", trigger: "blur" }],
         newsTypeId: [{ required: true, message: "请选择", trigger: "blur" }],
         title: [{ required: true, message: "不能为空", trigger: "blur" }],
+        sortNo:[
+          { required: true, message: "不能为空", trigger: "blur" },
+        ]
       },
       showDialog: true,
       loading: false,

+ 6 - 1
src/views/base/newsInfo-list.vue

@@ -135,7 +135,7 @@
       <el-table-column
         prop="topFlag"
         label="是否主页展示(轮播)"
-        width="180"
+        width="120"
       ><template slot-scope="{ row }">
           <el-switch
             v-model="row.topFlag"
@@ -145,6 +145,11 @@
           ></el-switch>
         </template>
       </el-table-column>
+      <el-table-column
+        prop="sortNo"
+        label="排序号"
+        width="80"
+      ></el-table-column>
       <el-table-column label="操作" width="180" fixed="right">
         <template slot-scope="{ row }">
           <el-button size="mini" type="warning" @click="handleEdit(row)"

+ 14 - 1
src/views/base/newsType-detail.vue

@@ -43,6 +43,13 @@
             style="width: 300px"
           ></el-input>
         </el-form-item>
+        <el-form-item label="排序号" prop="sortNo">
+          <el-input-number
+            v-model="formModel.sortNo"
+            :min="1"
+            style="width: 300px"
+          ></el-input-number>
+        </el-form-item>
         <el-form-item label="是否展示" prop="name">
           <el-radio v-model="formModel.showFlag" :label="true">显示</el-radio>
           <el-radio v-model="formModel.showFlag" :label="false">隐藏</el-radio>
@@ -71,6 +78,9 @@ export default {
         name: [
           { required: true, message: "类型名称不能为空", trigger: "blur" },
         ],
+        sortNo:[
+          { required: true, message: "不能为空", trigger: "blur" },
+        ]
       },
       showDialog: true,
       loading: false,
@@ -85,7 +95,10 @@ export default {
   },
   created() {
     var self = this;
-    newsTypeApi.list().then(function (response) {
+    
+    var formData = new FormData();
+    formData.append("queryParent", true);
+    newsTypeApi.list(formData).then(function (response) {
       var jsonData = response.data;
       if (jsonData.result) {
         if (jsonData.data != null && jsonData.data != "") {

+ 6 - 1
src/views/base/newsType-list.vue

@@ -93,7 +93,7 @@
         width="180"
       ></el-table-column>
       <el-table-column prop="code" label="代码" width="120"></el-table-column>
-      <el-table-column label="是否展示">
+      <el-table-column label="是否展示" width="120">
         <template slot-scope="{ row }">
           <el-switch
             v-model="row.showFlag"
@@ -103,6 +103,11 @@
           ></el-switch>
         </template>
       </el-table-column>
+      <el-table-column
+        prop="sortNo"
+        label="排序号"
+        width="80"
+      ></el-table-column>
       <el-table-column label="操作">
         <template slot-scope="{ row }">
           <el-button size="mini" type="warning" @click="handleEdit(row)"

+ 6 - 6
src/views/base/personInfo-detail.vue

@@ -186,9 +186,9 @@ export default {
         userName: [
           { required: true, message: "用户名称不能为空", trigger: "blur" },
         ],
-        idCard: [
-          { required: true, message: "身份证号码不能为空", trigger: "blur" },
-        ],
+        // idCard: [
+        //   { required: true, message: "身份证号码不能为空", trigger: "blur" },
+        // ],
         companyId: [
           { required: true, message: "对应公司不能为空", trigger: "blur" },
         ],
@@ -199,9 +199,9 @@ export default {
             trigger: "blur",
           },
         ],
-        phone: [
-          { required: true, message: "手机号码不能为空", trigger: "blur" },
-        ],
+        // phone: [
+        //   { required: true, message: "手机号码不能为空", trigger: "blur" },
+        // ],
       },
       showDialog: true,
       loading: false,