dev01 1 year ago
parent
commit
2a492952d6

+ 398 - 139
src/views/project/list/index.vue

@@ -15,100 +15,269 @@
       </el-col> -->
       <!--用户数据-->
       <el-col :span="24" :xs="24">
-        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+        <el-form
+          :model="queryParams"
+          ref="queryForm"
+          size="small"
+          :inline="true"
+          v-show="showSearch"
+          label-width="68px"
+        >
           <el-form-item label="项目编号" prop="projectNumber">
-            <el-input v-model="queryParams.projectNumber" placeholder="请输入项目编号" clearable style="width: 240px"
-              @keyup.enter.native="handleQuery" />
+            <el-input
+              v-model="queryParams.projectNumber"
+              placeholder="请输入项目编号"
+              clearable
+              style="width: 240px"
+              @keyup.enter.native="handleQuery"
+            />
           </el-form-item>
           <el-form-item label="项目名称" prop="name">
-            <el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable style="width: 240px"
-              @keyup.enter.native="handleQuery" />
+            <el-input
+              v-model="queryParams.name"
+              placeholder="请输入项目名称"
+              clearable
+              style="width: 240px"
+              @keyup.enter.native="handleQuery"
+            />
           </el-form-item>
           <el-form-item label="研发人员" prop="staffId">
-            <el-autocomplete v-model="superiorName" value-key="nickName" :fetch-suggestions="getDatas"
-              :filter-multiple="true" clearable placeholder="请输入关键字" @select="selectUser" />
+            <el-autocomplete
+              v-model="superiorName"
+              value-key="nickName"
+              :fetch-suggestions="getDatas"
+              :filter-multiple="true"
+              clearable
+              placeholder="请输入关键字"
+              @select="selectUser"
+            />
           </el-form-item>
           <el-form-item label="项目年份" prop="projectYear">
-            <el-date-picker v-model="queryParams.projectYear" value-format="yyyy" type="year" placeholder="选择项目年份">
+            <el-date-picker
+              v-model="queryParams.projectYear"
+              value-format="yyyy"
+              type="year"
+              placeholder="选择项目年份"
+            >
             </el-date-picker>
           </el-form-item>
           <el-form-item label="是否跨年" prop="crossYear">
-            <el-select v-model="queryParams.crossYear" placeholder="是否跨年" clearable style="width: 240px">
-              <el-option v-for="dict in year" :key="dict.value" :label="dict.label" :value="dict.value" />
+            <el-select
+              v-model="queryParams.crossYear"
+              placeholder="是否跨年"
+              clearable
+              style="width: 240px"
+            >
+              <el-option
+                v-for="dict in year"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
             </el-select>
           </el-form-item>
           <el-form-item label="起止时间">
-            <el-date-picker v-model="dateRange" style="width: 240px" value-format="yyyy-MM-dd" type="daterange"
-              range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
+            <el-date-picker
+              v-model="dateRange"
+              style="width: 240px"
+              value-format="yyyy-MM-dd"
+              type="daterange"
+              range-separator="-"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+            ></el-date-picker>
           </el-form-item>
           <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-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-item>
         </el-form>
 
         <el-row :gutter="10" class="mb8">
           <el-col :span="1.5">
-            <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
-              v-hasPermi="['system:user:add']">新增</el-button>
+            <el-button
+              type="primary"
+              plain
+              icon="el-icon-plus"
+              size="mini"
+              @click="handleAdd"
+              v-hasPermi="['system:user:add']"
+              >新增</el-button
+            >
           </el-col>
           <el-col :span="1.5">
-            <el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport"
-              v-hasPermi="['system:user:import']">导入</el-button>
+            <el-button
+              type="info"
+              plain
+              icon="el-icon-upload2"
+              size="mini"
+              @click="handleImport"
+              v-hasPermi="['system:user:import']"
+              >导入</el-button
+            >
           </el-col>
           <el-col :span="1.5">
-            <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
-              v-hasPermi="['system:user:export']">导出</el-button>
+            <el-button
+              type="warning"
+              plain
+              icon="el-icon-download"
+              size="mini"
+              @click="handleExport"
+              v-hasPermi="['system:user:export']"
+              >导出</el-button
+            >
           </el-col>
-          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
+          <right-toolbar
+            :showSearch.sync="showSearch"
+            @queryTable="getList"
+            :columns="columns"
+          ></right-toolbar>
         </el-row>
 
-        <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
+        <el-table
+          v-loading="loading"
+          :data="userList"
+          @selection-change="handleSelectionChange"
+        >
           <el-table-column type="selection" width="50" align="center" />
-          <el-table-column label="项目编号" align="center" key="projectNumber" prop="projectNumber"
-            v-if="columns[0].visible" />
-          <el-table-column label="项目年份" align="center" width="80" key="projectYear" prop="projectYear" v-if="columns[1].visible" />
-          <el-table-column label="是否跨年" align="center" width="80" key="crossYear" prop="crossYear" v-if="columns[2].visible">
+          <el-table-column
+            label="项目编号"
+            align="center"
+            key="projectNumber"
+            prop="projectNumber"
+            v-if="columns[0].visible"
+          />
+          <el-table-column
+            label="项目年份"
+            align="center"
+            width="80"
+            key="projectYear"
+            prop="projectYear"
+            v-if="columns[1].visible"
+          />
+          <el-table-column
+            label="是否跨年"
+            align="center"
+            width="80"
+            key="crossYear"
+            prop="crossYear"
+            v-if="columns[2].visible"
+          >
             <template slot-scope="scope">
               <span>{{ ["非跨年", "跨年"][scope.row.crossYear] }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="项目名称" align="center" key="name" prop="name" v-if="columns[3].visible"
-            :show-overflow-tooltip="true" />
-          <el-table-column label="负责人" align="center" key="adminName" prop="adminName" v-if="columns[4].visible" />
-          <el-table-column label="参与研发人员" align="center" key="staffName" prop="staffName" v-if="columns[5].visible" />
-          <el-table-column label="项目状态" align="center" width="80" key="projectStatus" prop="projectStatus"
-            v-if="columns[6].visible"></el-table-column>
-          <el-table-column label="累积工时" align="center" width="80" key="duration" prop="duration"
-            v-if="columns[6].visible"></el-table-column>
-          <el-table-column label="创建年份" align="center" width="80" key="createYear" prop="createYear" v-if="columns[7].visible" />
-          <el-table-column label="起止时间" align="center" width="100" key="startTime" prop="startTime" v-if="columns[8].visible">
+          <el-table-column
+            label="项目名称"
+            align="center"
+            key="name"
+            prop="name"
+            v-if="columns[3].visible"
+            :show-overflow-tooltip="true"
+          />
+          <el-table-column
+            label="负责人"
+            align="center"
+            key="adminName"
+            prop="adminName"
+            v-if="columns[4].visible"
+          />
+          <el-table-column
+            label="参与研发人员"
+            align="center"
+            key="staffName"
+            prop="staffName"
+            v-if="columns[5].visible"
+          />
+          <el-table-column
+            label="项目状态"
+            align="center"
+            width="80"
+            key="projectStatus"
+            prop="projectStatus"
+            v-if="columns[6].visible"
+          ></el-table-column>
+          <el-table-column
+            label="累积工时"
+            align="center"
+            width="80"
+            key="duration"
+            prop="duration"
+            v-if="columns[7].visible"
+          ></el-table-column>
+          <el-table-column
+            label="创建年份"
+            align="center"
+            width="80"
+            key="createYear"
+            prop="createYear"
+            v-if="columns[8].visible"
+          />
+          <el-table-column
+            label="起止时间"
+            align="center"
+            key="startTime"
+            prop="startTime"
+            v-if="columns[9].visible"
+          >
             <template slot-scope="scope">
-              <div>{{ scope.row.startTime }}</div>
-              <div>至</div>
-              <div>{{ scope.row.endTime }}</div>
+              <div>{{ scope.row.startTime + " 至 " + scope.row.endTime }}</div>
             </template>
           </el-table-column>
-          <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
+          <el-table-column
+            label="操作"
+            align="center"
+            width="80"
+            class-name="small-padding fixed-width"
+          >
             <template slot-scope="scope" v-if="scope.row.userId !== 1">
-              <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
-                v-hasPermi="['system:user:edit']">修改</el-button>
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="handleUpdate(scope.row)"
+                v-hasPermi="['system:user:edit']"
+                >修改</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" />
+        <pagination
+          v-show="total > 0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
       </el-col>
     </el-row>
 
     <!-- 添加或修改项目配置对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body :close-on-click-modal="false">
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="700px"
+      append-to-body
+      :close-on-click-modal="false"
+    >
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-row>
           <el-col :span="12">
             <el-form-item label="项目编号" prop="projectNumber">
-              <el-input v-model="form.projectNumber" placeholder="请输入项目编号" maxlength="30" />
+              <el-input
+                v-model="form.projectNumber"
+                placeholder="请输入项目编号"
+                maxlength="30"
+              />
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -120,14 +289,30 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="起止时间">
-              <el-date-picker v-model="dateRange1" style="width:250px" value-format="yyyy-MM-dd" type="daterange"
-                range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
+              <el-date-picker
+                v-model="dateRange1"
+                style="width: 250px"
+                value-format="yyyy-MM-dd"
+                type="daterange"
+                range-separator="-"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+              ></el-date-picker>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="是否跨年" prop="crossYear">
-              <el-select v-model="form.crossYear" style="width:250px" placeholder="请选择是否跨年">
-                <el-option v-for="dict in year" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
+              <el-select
+                v-model="form.crossYear"
+                style="width: 250px"
+                placeholder="请选择是否跨年"
+              >
+                <el-option
+                  v-for="dict in year"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                ></el-option>
               </el-select>
             </el-form-item>
           </el-col>
@@ -135,15 +320,25 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="创建年份" prop="createYear">
-              <el-date-picker v-model="form.createYear" style="width:250px" value-format="yyyy" type="year"
-                placeholder="选择创建年份">
+              <el-date-picker
+                v-model="form.createYear"
+                style="width: 250px"
+                value-format="yyyy"
+                type="year"
+                placeholder="选择创建年份"
+              >
               </el-date-picker>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="项目年份" prop="projectYear">
-              <el-date-picker v-model="form.projectYear" style="width: 250px" value-format="yyyy" type="year"
-                placeholder="选择项目年份">
+              <el-date-picker
+                v-model="form.projectYear"
+                style="width: 250px"
+                value-format="yyyy"
+                type="year"
+                placeholder="选择项目年份"
+              >
               </el-date-picker>
             </el-form-item>
           </el-col>
@@ -151,29 +346,50 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="负责人" prop="superiorName1">
-              <el-autocomplete v-model="superiorName1" style="width:250px" value-key="nickName"
-                :fetch-suggestions="getDatas1" :filter-multiple="true" clearable placeholder="请输入关键字"
-                @select="selectUser1" />
+              <el-autocomplete
+                v-model="superiorName1"
+                style="width: 250px"
+                value-key="nickName"
+                :fetch-suggestions="getDatas1"
+                :filter-multiple="true"
+                clearable
+                placeholder="请输入关键字"
+                @select="selectUser1"
+              />
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="12">
             <el-form-item label="项目成员">
-              <el-autocomplete v-model="superiorName2" style="width:250px" value-key="nickName"
-                :fetch-suggestions="getDatas2" :filter-multiple="true" clearable placeholder="输入查询"
-                @select="selectUser2" />
+              <el-autocomplete
+                v-model="superiorName2"
+                style="width: 250px"
+                value-key="nickName"
+                :fetch-suggestions="getDatas2"
+                :filter-multiple="true"
+                clearable
+                placeholder="输入查询"
+                @select="selectUser2"
+              />
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-button type="primary" style="margin-left: 15px;" @click="addStaff">添加成员</el-button>
+            <el-button type="primary" style="margin-left: 15px" @click="addStaff"
+              >添加成员</el-button
+            >
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="24">
             <el-form-item>
-              <el-tag v-for="tag in tags" :key="tag.name" style="margin-right:10px ;" closable
-                @close="deleteStaff(tag.id)">
+              <el-tag
+                v-for="tag in tags"
+                :key="tag.name"
+                style="margin-right: 10px"
+                closable
+                @close="deleteStaff(tag.id)"
+              >
                 {{ tag.name }}
               </el-tag>
             </el-form-item>
@@ -183,7 +399,11 @@
         <el-row>
           <el-col :span="24">
             <el-form-item label="备注">
-              <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
+              <el-input
+                v-model="form.remark"
+                type="textarea"
+                placeholder="请输入内容"
+              ></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -195,10 +415,24 @@
     </el-dialog>
 
     <!-- 项目导入对话框 -->
-    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
-      <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
-        :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
-        :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
+    <el-dialog
+      :title="upload.title"
+      :visible.sync="upload.open"
+      width="400px"
+      append-to-body
+    >
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
         <i class="el-icon-upload"></i>
         <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
         <div class="el-upload__tip text-center" slot="tip">
@@ -206,8 +440,13 @@
             <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
           </div>
           <span>仅允许导入xls、xlsx格式文件。</span>
-          <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
-            @click="importTemplate">下载模板</el-link>
+          <el-link
+            type="primary"
+            :underline="false"
+            style="font-size: 12px; vertical-align: baseline"
+            @click="importTemplate"
+            >下载模板</el-link
+          >
         </div>
       </el-upload>
       <div slot="footer" class="dialog-footer">
@@ -219,15 +458,22 @@
 </template>
 
 <script>
-import { listProject, addProject, updateProject, addStaff, listStaff, deleteStaff } from "@/api/system/project";
-import { selectName, } from "@/api/system/user";
+import {
+  listProject,
+  addProject,
+  updateProject,
+  addStaff,
+  listStaff,
+  deleteStaff,
+} from "@/api/system/project";
+import { selectName } from "@/api/system/user";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
 export default {
   name: "User",
-  dicts: ['sys_normal_disable', 'sys_user_sex'],
+  dicts: ["sys_normal_disable", "sys_user_sex"],
   components: { Treeselect },
   data() {
     return {
@@ -270,10 +516,13 @@ export default {
       roleOptions: [],
       // 表单参数
       form: {},
-      year: [{ label: "非跨年", value: 0 }, { label: "跨年", value: 1 }],
+      year: [
+        { label: "非跨年", value: 0 },
+        { label: "跨年", value: 1 },
+      ],
       defaultProps: {
         children: "children",
-        label: "label"
+        label: "label",
       },
       // 用户导入参数
       upload: {
@@ -288,7 +537,7 @@ export default {
         // 设置上传的请求头部
         headers: { Authorization: "Bearer " + getToken() },
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/api/project/importData"
+        url: process.env.VUE_APP_BASE_API + "/api/project/importData",
       },
       // 查询参数
       queryParams: {
@@ -315,59 +564,53 @@ export default {
       ],
       // 表单校验
       rules: {
-        projectNumber: [
-          { required: true, message: "项目编号不能为空", trigger: "blur" },
-        ],
-        name: [
-          { required: true, message: "项目名称不能为空", trigger: "blur" }
-        ],
-        aid:[
-          { required: true, message: "负责人不能为空", trigger: "blur" }
-        ],
-      }
+        projectNumber: [{ required: true, message: "项目编号不能为空", trigger: "blur" }],
+        name: [{ required: true, message: "项目名称不能为空", trigger: "blur" }],
+        aid: [{ required: true, message: "负责人不能为空", trigger: "blur" }],
+      },
     };
   },
   watch: {
     // 根据名称筛选部门树
     deptName(val) {
       this.$refs.tree.filter(val);
-    }
+    },
   },
   created() {
     this.getList();
     // this.getDeptTree();
-    this.getConfigKey("sys.user.initPassword").then(response => {
+    this.getConfigKey("sys.user.initPassword").then((response) => {
       this.initPassword = response.msg;
     });
   },
   methods: {
-    // 根据查询关键词,获取匹配的下拉列表数据  
+    // 根据查询关键词,获取匹配的下拉列表数据
     getDatas(query, cb) {
-      selectName(query, 0).then(response => {
-        cb(response.data)
+      selectName(query, 0).then((response) => {
+        cb(response.data);
       });
     },
     getDatas1(query, cb) {
-      selectName(query, 2).then(response => {
-        cb(response.data)
+      selectName(query, 2).then((response) => {
+        cb(response.data);
       });
     },
     getDatas2(query, cb) {
-      selectName(query, 2).then(response => {
-        cb(response.data)
+      selectName(query, 2).then((response) => {
+        cb(response.data);
       });
     },
     selectUser(item) {
-      this.queryParams.staffId = item.userId
-      this.superiorName = item.nickName
+      this.queryParams.staffId = item.userId;
+      this.superiorName = item.nickName;
     },
     selectUser1(item) {
-      this.form.aid = item.userId
-      this.form.adminName = item.nickName
+      this.form.aid = item.userId;
+      this.form.adminName = item.nickName;
     },
     selectUser2(item) {
-      this.superiorId2 = item.userId
-      this.superiorName2 = item.nickName
+      this.superiorId2 = item.userId;
+      this.superiorName2 = item.nickName;
     },
     /** 查询用户列表 */
     getList() {
@@ -376,16 +619,15 @@ export default {
         this.queryParams.startTime = this.dateRange[0];
         this.queryParams.endTime = this.dateRange[1];
       }
-      listProject(this.queryParams).then(response => {
+      listProject(this.queryParams).then((response) => {
         this.userList = response.rows;
         this.total = response.total;
         this.loading = false;
-      }
-      );
+      });
     },
     /** 查询部门下拉树结构 */
     getDeptTree() {
-      deptTreeSelect().then(response => {
+      deptTreeSelect().then((response) => {
         this.deptOptions = response.data;
       });
     },
@@ -437,13 +679,13 @@ export default {
       this.queryParams.startTime = undefined;
       this.queryParams.endTime = undefined;
       this.queryParams.deptId = undefined;
-      this.superiorName = undefined
+      this.superiorName = undefined;
       // this.$refs.tree.setCurrentKey(null);
       this.handleQuery();
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.userId);
+      this.ids = selection.map((item) => item.userId);
       this.single = selection.length != 1;
       this.multiple = !selection.length;
     },
@@ -456,7 +698,7 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      this.listStaff(row.id)
+      this.listStaff(row.id);
       this.open = true;
       this.title = "修改项目";
       this.form = {
@@ -471,14 +713,18 @@ export default {
         crossYear: row.crossYear,
         remark: row.remark,
       };
-      this.dateRange1 = [row.startTime || "", row.endTime || ""]
+      this.dateRange1 = [row.startTime || "", row.endTime || ""];
       this.superiorName1 = row.adminName;
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('api/project/export', {
-        ...this.queryParams
-      }, `project_${new Date().getTime()}.xlsx`)
+      this.download(
+        "api/project/export",
+        {
+          ...this.queryParams,
+        },
+        `project_${new Date().getTime()}.xlsx`
+      );
     },
     /** 导入按钮操作 */
     handleImport() {
@@ -487,8 +733,11 @@ export default {
     },
     /** 下载模板操作 */
     importTemplate() {
-      this.download('api/project/importTemplate', {
-      }, `project_template_${new Date().getTime()}.xlsx`)
+      this.download(
+        "api/project/importTemplate",
+        {},
+        `project_template_${new Date().getTime()}.xlsx`
+      );
     },
     // 文件上传中处理
     handleFileUploadProgress(event, file, fileList) {
@@ -499,7 +748,13 @@ export default {
       this.upload.open = false;
       this.upload.isUploading = false;
       this.$refs.upload.clearFiles();
-      this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
+      this.$alert(
+        "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
+          response.msg +
+          "</div>",
+        "导入结果",
+        { dangerouslyUseHTMLString: true }
+      );
       this.getList();
     },
     // 提交上传文件
@@ -508,22 +763,22 @@ export default {
     },
     /** 提交按钮 */
     submitForm: function () {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         this.form.startTime = this.dateRange1[0];
         this.form.endTime = this.dateRange1[1];
         if (valid) {
           if (this.form.id != undefined) {
-            updateProject(this.form).then(response => {
+            updateProject(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
             if (this.tags.length > 0) {
-              let result = this.tags.map(obj => obj.id);
-              this.form.staffObject = result.toString()
+              let result = this.tags.map((obj) => obj.id);
+              this.form.staffObject = result.toString();
             }
-            addProject(this.form).then(response => {
+            addProject(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -536,9 +791,9 @@ export default {
     listStaff(id) {
       let data = {
         pid: id,
-      }
-      listStaff(data).then(response => {
-        this.tags = response.data
+      };
+      listStaff(data).then((response) => {
+        this.tags = response.data;
       });
     },
     /** 添加项目成员 */
@@ -547,23 +802,27 @@ export default {
         pid: this.form.id,
         aid: this.superiorId2,
         name: this.superiorName2,
-      }
+      };
       if (!this.form.id) {
-        let result = this.tags.filter(obj => obj.aid === this.superiorId2);
+        let result = this.tags.filter((obj) => obj.aid === this.superiorId2);
         if (result.length != 0) {
           this.$modal.msgWarning("已经添加过该成员了~");
-          return
+          return;
         }
       }
-      addStaff(data).then(response => {
+      addStaff(data).then((response) => {
         if (response.code == 200) {
           this.$modal.msgSuccess("添加成功");
           if (this.form.id != undefined) {
-            this.listStaff(this.form.id)
+            this.listStaff(this.form.id);
           } else {
-            let list = this.tags
-            list.push({ aid: response.data.aid, name: response.data.name, id: response.data.id })
-            this.tags = list
+            let list = this.tags;
+            list.push({
+              aid: response.data.aid,
+              name: response.data.name,
+              id: response.data.id,
+            });
+            this.tags = list;
           }
           this.superiorId2 = undefined;
           this.superiorName2 = undefined;
@@ -573,21 +832,21 @@ export default {
     /** 删除项目成员 */
     deleteStaff(id) {
       if (!this.form.id) {
-        let list = this.tags
-        list.splice(list.indexOf(list.find(item => item.id === id)), 1)
-        this.tags = list
+        let list = this.tags;
+        list.splice(list.indexOf(list.find((item) => item.id === id)), 1);
+        this.tags = list;
       } else {
         let data = {
           id,
-        }
-        deleteStaff(data).then(response => {
+        };
+        deleteStaff(data).then((response) => {
           if (response.code == 200) {
-            this.listStaff(this.form.id)
+            this.listStaff(this.form.id);
             this.$modal.msgSuccess("移除项目成员成功~");
           }
         });
       }
     },
-  }
+  },
 };
-</script>
+</script>

+ 11 - 8
src/views/record/list/index.vue

@@ -81,15 +81,15 @@
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="创段任务" prop="projectStatus">
+          <el-form-item label="研发阶段" prop="projectStatus">
             <el-select
               v-model="queryParams.projectStatus"
-              placeholder="创段任务"
+              placeholder="研发阶段"
               clearable
               style="width: 240px"
             >
               <el-option
-                v-for="dict in pStatusList"
+                v-for="dict in dict.type.syx_record_stage"
                 :key="dict.value"
                 :label="dict.label"
                 :value="dict.value"
@@ -224,12 +224,16 @@
             v-if="columns[8].visible"
           />
           <el-table-column
-            label="创段任务"
+            label="研发阶段"
             align="center"
             key="projectStatus"
             prop="projectStatus"
             v-if="columns[9].visible"
-          />
+            >
+            <template slot-scope="scope">
+              <dict-tag :options="dict.type.syx_record_stage" :value="scope.row.projectStatus"/>
+            </template>
+          </el-table-column>
           <el-table-column
             label="日报内容"
             align="center"
@@ -257,7 +261,7 @@
           <el-table-column
             label="附件"
             align="center"
-            width="160"
+            width="80"
             class-name="small-padding fixed-width"
           >
             <template slot-scope="scope" v-if="scope.row.userId !== 1">
@@ -341,7 +345,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
 export default {
   name: "Record",
-  dicts: ["sys_user_fulljob"],
+  dicts: ["sys_user_fulljob", "syx_record_stage"],
   components: { Treeselect },
   data() {
     return {
@@ -383,7 +387,6 @@ export default {
         { label: "非跨年", value: 0 },
         { label: "跨年", value: 1 },
       ],
-      pStatusList: [{ label: "正常", value: 1 }],
       defaultProps: {
         children: "children",
         label: "label",

+ 2 - 1
src/views/system/dept/index.vue

@@ -168,6 +168,7 @@
               <el-input-number
                 v-model="form.orderNum"
                 controls-position="right"
+                placeholder="数字越小,排序越前"
                 :min="0"
               />
             </el-form-item>
@@ -295,7 +296,7 @@ export default {
       rules: {
         parentId: [{ required: true, message: "上级部门不能为空", trigger: "blur" }],
         deptName: [{ required: true, message: "部门名称不能为空", trigger: "blur" }],
-        orderNum: [{ required: true, message: "显示排序不能为空", trigger: "blur" }],
+        orderNum: [{ required: true, message: "数字越小,排序越前", trigger: "blur" }],
         companyLogo: [{ required: true, message: "请上传企业logo", trigger: "blur" }],
         companyFullName: [
           {

+ 4 - 4
src/views/system/user/index.vue

@@ -292,12 +292,12 @@
             label="全职/兼职"
             align="center"
             key="fullJob"
-            prop="fullJob"
+            prop=""
             v-if="columns[5].visible"
             width="60"
           >
             <template slot-scope="scope">
-              <span>{{ ["兼职", "全职"][scope.row.fullJob] }}</span>
+              <dict-tag :options="dict.type.sys_user_fulljob" :value="scope.row.fullJob"/>
             </template>
           </el-table-column>
           <el-table-column
@@ -337,10 +337,10 @@
             align="center"
             key="status"
             v-if="columns[10].visible"
-            width="50"
+            width="60"
           >
             <template slot-scope="scope">
-              <span>{{ ["正常", "停用", "暂停"][scope.row.status] }}</span>
+              <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
             </template>
             <!-- <template slot-scope="scope">
               <el-switch