Browse Source

页面修改80%

周玉佂 4 months ago
parent
commit
15af66e336

+ 2 - 2
src/components/login/Login.vue

@@ -452,8 +452,8 @@ export default {
         } else {
           if (3 > value.length || value.length > 18) {
             callback(new Error("长度需在3~18位之间"));
-          } else if (/[^\w\.V]/gi.test(value)) {
-            callback(new Error("请不要输入中文和空格"));
+          } else if (/[^\w.V]/gi.test(value)) {
+            callback(new Error("请不要输入中文和空格或者特殊符号"));
           } else {
             callback();
           }

+ 4 - 6
src/components/manage/ContainerSys.vue

@@ -504,9 +504,7 @@ export default {
     console.log("--------------------------->")
     // 页面初始化或者刷新页面初始化页签及激活菜单-2020-03-17 lwl
     this.active = this.$route.path
-    this.selectMenu(this.$route.path)
-
-
+    // this.selectMenu(this.$route.path)
   },
   methods: {
     ...mapActions({
@@ -521,17 +519,17 @@ export default {
     handleSelect(index, indexPath) {
       console.log('index, indexPath: ', index, indexPath)
       this.menuList.forEach((item) => {
-        if (item.path === param) {
+        if (item.path === index) {
           this.crumbParent = item.name
           this.crumbChild = null
           return
         } else {
           item.child.forEach((i) => {
-            if (i.path === param) {
+            if (i.path === index) {
               this.crumbParent = i.parentName
               this.crumbChild = i.name
             }
-            if (param != "/ContainerSys/SacleList") {
+            if (index != "/ContainerSys/SacleList") {
               this.setSacleListName(null)
             }
           })

+ 1 - 0
src/components/manage/main/AdminHome.vue

@@ -450,6 +450,7 @@ this.maxTestFlag=res.data.isTestNum;
             return this.$message.error("接口返回值错误");
           }
           if (type == 0) {
+            console.log(res,'index/taskNumber')
             this.TaskNumber = res.data || 0;
           } else {
             this.TaskNumberRenZhi = res.data || 0;

+ 1 - 1
src/components/manage/main/CognitiveTaskList.vue

@@ -69,7 +69,7 @@
 <!--        </el-pagination>-->
 <!--      </el-col>-->
 <!--    </el-row>-->
-    <div class="txt-center" style="margin-top: 20px">
+    <div class="txt-center" style="margin-top: 10px">
       <el-pagination
           background
           @size-change="handleSizeChange"

+ 10 - 13
src/components/manage/main/CognitiveTaskUserList.vue

@@ -30,8 +30,8 @@
       </el-input>
 
       <el-button size="small" class="ml10 button-pub" icon="el-icon-refresh" @click="reset"></el-button>
-      <el-button size="small" class="mrl" type="primary" :disabled="multipleSelection.length == 0" @click="listDown()">批量下载</el-button>
-      <el-button size="small" type="primary" @click="downloadAll"> 全部下载</el-button>
+<!--      <el-button size="small" class="mrl" type="primary" :disabled="multipleSelection.length == 0" @click="listDown()">批量下载</el-button>-->
+<!--      <el-button size="small" type="primary" @click="downloadAll"> 全部下载</el-button>-->
       <el-button size="small" class="mrl" type="primary" :disabled="multipleSelection.length == 0"
         @click="rowDataDownload(0)">原始数据批量下载</el-button>
       <el-button size="small" class="mrl" type="primary" @click="rowDataDownload(1)">原始数据全部下载</el-button>
@@ -40,7 +40,7 @@
     <!--批量下载-->
     <!--记录展示start-->
     <el-table size="small" :header-cell-style="{ background: '#F6F7FB', color: '#606266' }" :data="tableData" border
-      style="margin-top: 20px" class="table-padding" :row-key="getRowKeys" @selection-change="handleSelectionChange">
+              style="margin-top: 20px" class="table-padding center-table" :row-key="getRowKeys" @selection-change="handleSelectionChange">
       <el-table-column type="selection" :reserve-selection="true" width="55">
       </el-table-column>
       <el-table-column prop="petName" label="用户名称" width="auto" align="center">
@@ -53,7 +53,7 @@
       </el-table-column>
       <el-table-column prop="profession" label="职业" width="auto" align="center">
       </el-table-column>
-      <el-table-column prop="testDate" label="测试时间" width="260" align="center">
+      <el-table-column prop="testDate" label="测试时间" width="360" align="center">
       </el-table-column>
       <el-table-column label="操作" width="auto" align="center">
         <template slot-scope="scope">
@@ -64,15 +64,12 @@
     <!--记录展示end-->
 
     <!--分页插件start-->
-    <el-row>
-      <el-col :span="24" style="text-align: right">
-        <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
-          :current-page="currentPage" :page-sizes="[10]" :page-size="pageSize"
-          layout="total, sizes, prev, pager, next, jumper" :total="total">
-        </el-pagination>
-      </el-col>
-    </el-row>
-    <div class="txt-center" style="margin-top: 20px"></div>
+    <div class="txt-center" style="margin-top: 10px">
+      <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="currentPage" :page-sizes="[10,20,50,100]" :page-size="pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="total">
+      </el-pagination>
+    </div>
     <!--分页插件end-->
   </div>
 </template>

+ 1 - 1
src/components/manage/main/GroupAuth.vue

@@ -51,7 +51,7 @@
       </el-col>
     </el-row>
     <!-- 权限列表 -->
-    <el-table :data="authList" border class="table-padding" size="small">
+    <el-table :data="authList" border class="table-padding center-table" size="small">
       <el-table-column prop="name" label="名称" width="auto" align="center">
       </el-table-column>
       <el-table-column label="操作" width="240" align="center">

+ 1 - 1
src/components/manage/main/SacleList.vue

@@ -67,7 +67,7 @@
 <!--        </el-pagination>-->
 <!--      </el-col>-->
 <!--    </el-row>-->
-     <div class="txt-center" style="margin-top: 20px">
+     <div class="txt-center" style="margin-top: 10px">
        <el-pagination
          background
          @size-change="handleSizeChange"

+ 25 - 24
src/components/manage/main/SacleUserList.vue

@@ -7,7 +7,6 @@
         type="date"
         format="yyyy-MM-dd"
         class="mrr"
-        style="width: 160px"
         size="small"
         value-format="yyyy-MM-dd"
         placeholder="选择开始日期"
@@ -15,7 +14,6 @@
 
       <el-date-picker
         v-model="endTime"
-        style="width: 160px"
         class="mrr"
         type="date"
         size="small"
@@ -27,7 +25,7 @@
         v-model="groupValue"
         @change="onSubmit"
         placeholder="分组选择"
-        style="width: 120px"
+        style="width: 100px"
         size="small"
       >
         <el-option
@@ -59,18 +57,18 @@
         size="small"
         @click="reset"
       />
-      <el-button
-        class="mrl"
-        type="primary"
-        size="small"
-        :disabled="multipleSelection.length == 0"
-        @click="listDown()"
-      >
-        批量下载
-      </el-button>
-      <el-button size="small" class="mrl" type="primary" @click="downloadAll">
-        全部下载
-      </el-button>
+<!--      <el-button-->
+<!--        class="mrl"-->
+<!--        type="primary"-->
+<!--        size="small"-->
+<!--        :disabled="multipleSelection.length == 0"-->
+<!--        @click="listDown()"-->
+<!--      >-->
+<!--        批量下载-->
+<!--      </el-button>-->
+<!--      <el-button size="small" class="mrl" type="primary" @click="downloadAll">-->
+<!--        全部下载-->
+<!--      </el-button>-->
       <el-button
         class="mrl"
         size="small"
@@ -106,7 +104,7 @@
       border
       style="margin-top: 20px"
       size="small"
-      class="table-padding"
+      class="table-padding center-table"
       :row-key="getRowKeys"
       @selection-change="handleSelectionChange"
     >
@@ -142,7 +140,7 @@
       <el-table-column
         prop="testDate"
         label="测试时间"
-        width="auto"
+        width="360"
         align="center"
       >
       </el-table-column>
@@ -157,9 +155,9 @@
     <!--记录展示end-->
 
     <!--分页插件start-->
-    <el-row>
-      <el-col :span="24" style="text-align: right">
-        <el-pagination
+
+    <div class="txt-center" style="margin-top: 10px">
+      <el-pagination
           background
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
@@ -168,10 +166,8 @@
           :page-size="pageSize"
           layout="total, sizes, prev, pager, next, jumper"
           :total="total"
-        >
-        </el-pagination>
-      </el-col>
-    </el-row>
+      />
+    </div>
     <div class="txt-center" style="margin-top: 20px"></div>
     <!--分页插件end-->
   </div>
@@ -383,4 +379,9 @@ export default {
 .button-pub {
   border-radius: 4px !important;
 }
+
+.center-table {
+  height: calc(100vh - 1.5rem) !important;
+  overflow-x: hidden !important;
+}
 </style>

+ 2 - 2
src/components/manage/main/ScaleMgr.vue

@@ -30,7 +30,7 @@
         border
         style="width: 100%; margin-top: 20px"
         size="small"
-        class="table-padding"
+        class="table-padding center-table"
     >
       <el-table-column
           prop="name"
@@ -157,7 +157,7 @@ export default {
     // 查询全部量表
     getAllScale() {
       this.$http.get(
-          `subjectInfo/getSubjectListByName?categoryEname=ALL&scaleName=${this.wKeyword}&pageNum=1&pageSize=10`,
+          `subjectInfo/getSubjectListByName?categoryEname=ALL&scaleName=${this.wKeyword}&pageNum=${this.pageNum}&pageSize=${this.pageSize}`,
           {},
           (response) => {
             console.log('response: ', response)

+ 8 - 7
src/components/manage/main/UserGroupInfo.vue

@@ -68,10 +68,11 @@
       ref="multipleTables"
       :data="tableData"
       border
-      style="margin-top: 20px"
-      class="table-padding"
+      style="margin-top: 10px"
+      class="table-padding center-table"
       :row-key="getRowKeys"
       size="small"
+      :header-cell-style="{ background: '#F6F7FB', color: '#606266' }"
       @selection-change="handleSelectionGroup"
     >
       <el-table-column type="selection" :reserve-selection="true" width="55"></el-table-column>
@@ -119,8 +120,10 @@
         </template>
       </el-table-column>
     </el-table>
-    <div class="pageNation">
+
+    <div class="txt-center" style="margin-top: 20px">
       <el-pagination
+        background
         @size-change="handleSizeChange"
         @current-change="handleCurrentChange"
         :current-page="pageNum"
@@ -128,9 +131,7 @@
         :page-size="pageSize"
         layout="total, sizes, prev, pager, next, jumper"
         :total="total"
-        size="small"
-      >
-      </el-pagination>
+      />
     </div>
     <!--记录展示end-->
     <!--添加用户进组-->
@@ -522,7 +523,7 @@ export default {
 
 <style scoped>
 .headerRow {
-  padding: 20px 0 10px;
+  padding: 6px 0;
 }
 
 .headerRow span {

+ 39 - 31
src/components/manage/main/UserManage.vue

@@ -76,42 +76,49 @@
         </el-button>
       </div>
     </div>
-    <el-table size="small" :data="tableData" border style="width: 100%; margin-top: 20px">
+    <el-table
+        size="small"
+        :data="tableData"
+        border
+        style="width: 100%; margin-top: 20px;"
+        class="table-padding center-table"
+        :header-cell-style="{ background: '#F6F7FB', color: '#606266' }"
+    >
       <el-table-column
-        prop="petName"
-        label="用户名称"
-        align="center"
+          prop="petName"
+          label="用户名称"
+          align="center"
       >
       </el-table-column>
       <el-table-column prop="phone" label="账号" width="auto" align="center">
       </el-table-column>
       <el-table-column
-        prop="gender"
-        label="性别"
-        align="center"
-        :formatter="sexFormat"
+          prop="gender"
+          label="性别"
+          align="center"
+          :formatter="sexFormat"
       ></el-table-column>
       <el-table-column prop="birthday" label="生日" width="auto" align="center">
       </el-table-column>
       <!-- <el-table-column prop="institutionName" label="所属机构" width="auto" align="center">
       </el-table-column> -->
       <el-table-column
-        prop="profession"
-        label="职业"
-        align="center"
+          prop="profession"
+          label="职业"
+          align="center"
       >
       </el-table-column>
-         <el-table-column
-        prop="gid"
-        label="分组名称"
-        align="center"
+      <el-table-column
+          prop="gid"
+          label="分组名称"
+          align="center"
       >
       </el-table-column>
       <el-table-column
-        prop="userStatus"
-        label="用户状态"
-        align="center"
-        :formatter="statusFormat"
+          prop="userStatus"
+          label="用户状态"
+          align="center"
+          :formatter="statusFormat"
       >
       </el-table-column>
       <el-table-column label="操作" width="300px" align="center">
@@ -128,9 +135,9 @@
             >查看详情
           </el-button> -->
           <el-button
-            type="primary"
-            size="mini"
-            @click="handleResetPwd(scope.$index, scope.row)"
+              type="primary"
+              size="mini"
+              @click="handleResetPwd(scope.$index, scope.row)"
           >
             重置密码
           </el-button>
@@ -151,16 +158,16 @@
           <!--            </el-form>-->
           <!--          </el-dialog>-->
           <el-button
-            size="mini"
-            type="danger"
-            @click="handleDelete(scope.$index, scope.row)"
-            >删除
+              size="mini"
+              type="danger"
+              @click="handleDelete(scope.$index, scope.row)"
+          >删除
           </el-button>
           <el-button
-            type="primary"
-            v-if="scope.row.userStatus != '2' && scope.row.userStatus != '4'"
-            size="mini"
-            @click="editUser(scope.row)"
+              type="primary"
+              v-if="scope.row.userStatus != '2' && scope.row.userStatus != '4'"
+              size="mini"
+              @click="editUser(scope.row)"
           >
             审核通过
           </el-button>
@@ -180,8 +187,9 @@
         <!--        </template>&ndash;&gt;-->
       </el-table-column>
     </el-table>
-    <div class="txt-center" style="margin-top: 20px">
+    <div class="txt-center" style="margin-top: 6px">
       <el-pagination
+        background
         @size-change="handleSizeChange"
         @current-change="handleCurrentChange"
         :current-page="currentPage"

+ 84 - 105
src/components/manage/main/UserRecords.vue

@@ -17,17 +17,17 @@
       </el-select>
       &nbsp;&nbsp;
       <el-input
-        placeholder="请输入用户名称搜索"
+        placeholder="请输入用户名称或身份证号搜索"
         v-model="searchKeyLin"
         class="input-with-select"
-        style="width: 1.5rem"
+        style="width: 1.8rem"
         @keyup.enter.native="onSubmit"
       >
         <el-button
           slot="append"
           icon="el-icon-search"
           @click="onSubmit"
-          ></el-button>
+        />
       </el-input>
       <el-button
           class="ml10"
@@ -61,110 +61,89 @@
         </div>
       </el-col> -->
     </div>
-    <el-row>
-      <el-col :span="24">
-        <div>
-          <el-table
-            :header-cell-style="{ background: '#F6F7FB', color: '#606266' }"
-            :data="tableData"
-            border
-            style="width: 100%; margin-top: 20px"
-            class="table-padding center-table"
-            :row-key="getRowKeys"
-            @selection-change="handleSelectionChange"
+    <el-table
+      :header-cell-style="{ background: '#F6F7FB', color: '#606266' }"
+      :data="tableData"
+      border
+      style="width: 100%; margin-top: 20px"
+      class="table-padding center-table"
+      :row-key="getRowKeys"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" :reserve-selection="true" width="55" />
+      <el-table-column
+        prop="petName"
+        label="用户名称"
+        align="center"
+      />
+      <el-table-column
+        prop="phone"
+        width="200"
+        label="账号"
+        align="center"
+      />
+      <el-table-column
+        prop="birthday"
+        label="生日"
+        align="center"
+      />
+      <el-table-column
+        prop="gender"
+        label="性别"
+        align="center"
+        :formatter="sexFormat"
+      />
+      <!-- <el-table-column prop="institutionName" label="所属机构" width="auto" align="center">
+</el-table-column> -->
+      <el-table-column
+        prop="gid"
+        label="分组名称"
+        align="center"
+      />
+      <!-- <el-table-column prop="institutionName" label="所属机构" width="auto" align="center">
+</el-table-column> -->
+      <el-table-column
+        prop="profession"
+        label="职业"
+        align="center"
+      />
+      <el-table-column
+        prop="userStatus"
+        label="用户状态"
+        align="center"
+        :formatter="statusFormat"
+      >
+        <template slot-scope="scope">
+          <el-tag type="warning" v-if="scope.row.userStatus === '1'">
+            <span>未审核</span>
+          </el-tag>
+          <el-tag type="success" v-if="scope.row.userStatus === '2'">
+            <span>已审核</span>
+          </el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" width="290px" align="center">
+        <template slot-scope="scope">
+          <!--<el-button type="text"  size="small" @click="getUserRecordsDetail(scope.row)">查看详情</el-button>-->
+          <el-button
+            type="primary"
+            size="small"
+            @click="scaleDetails(scope.row)"
           >
-            <el-table-column type="selection" :reserve-selection="true" width="55" />
-            <el-table-column
-              prop="petName"
-              label="用户名称"
-              align="center"
-            />
-            <el-table-column
-              prop="phone"
-              label="账号"
-              align="center"
-            />
-            <el-table-column
-              prop="birthday"
-              label="生日"
-              align="center"
-            />
-            <el-table-column
-              prop="gender"
-              label="性别"
-              align="center"
-              :formatter="sexFormat"
-            />
-            <!-- <el-table-column prop="institutionName" label="所属机构" width="auto" align="center">
-			</el-table-column> -->
-            <el-table-column
-              prop="gid"
-              label="分组名称"
-              align="center"
-            />
-            <!-- <el-table-column prop="institutionName" label="所属机构" width="auto" align="center">
-			</el-table-column> -->
-            <el-table-column
-              prop="profession"
-              label="职业"
-              align="center"
-            />
-            <el-table-column
-              prop="userStatus"
-              label="用户状态"
-              align="center"
-              :formatter="statusFormat"
-            >
-              <template slot-scope="scope">
-                <el-tag type="warning" v-if="scope.row.userStatus === '1'">
-                  <span>未审核</span>
-                </el-tag>
-                <el-tag type="success" v-if="scope.row.userStatus === '2'">
-                  <span>已审核</span>
-                </el-tag>
-              </template>
-            </el-table-column>
-            <el-table-column label="操作" width="290px" align="center">
-              <template slot-scope="scope">
-                <!--<el-button type="text"  size="small" @click="getUserRecordsDetail(scope.row)">查看详情</el-button>-->
-                <el-button
-                  type="primary"
-                  size="small"
-                  @click="scaleDetails(scope.row)"
-                >
-                  量表
-                </el-button>
-                <el-button
-                  type="primary"
-                  size="small"
-                  @click="cognitiveTask(scope.row)"
-                >
-                  认知任务
-                </el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-      </el-col>
-    </el-row>
-
-<!--    <el-row>-->
-<!--      <el-col :span="24" style="text-align: right">-->
-<!--        <el-pagination-->
-<!--          background-->
-<!--          @size-change="handleSizeChange"-->
-<!--          @current-change="handleCurrentChange"-->
-<!--          :current-page="currentPage"-->
-<!--          :page-sizes="[10, 20, 50, 100]"-->
-<!--          :page-size="pageSize"-->
-<!--          layout="total, sizes, prev, pager, next, jumper"-->
-<!--          :total="total"-->
-<!--        >-->
-<!--        </el-pagination>-->
-<!--      </el-col>-->
-<!--    </el-row>-->
+            量表
+          </el-button>
+          <el-button
+            type="primary"
+            size="small"
+            @click="cognitiveTask(scope.row)"
+          >
+            认知任务
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
 
-    <div class="txt-center" style="margin-top: 20px">
+    <div class="txt-center" style="margin-top: 6px">
       <el-pagination
           background
           @size-change="handleSizeChange"

+ 108 - 93
src/components/manage/main/cognitiveTaskMgr.vue

@@ -3,50 +3,45 @@
   <div>
     <div class="headerRow">
       <el-input
-          placeholder="请输入认知任务名称"
-          v-model="wKeyword"
-          class="input-with-select ml10"
-          style="width:1.5rem"
-          size="small"
-          @keyup.enter.native="onSubmit"
+        placeholder="请输入认知任务名称"
+        v-model="wKeyword"
+        class="input-with-select ml10"
+        style="width: 1.5rem"
+        size="small"
+        @keyup.enter.native="onSubmit"
       >
         <el-button
-            slot="append"
-            icon="el-icon-search"
-            @click="searchAllCognitiveTask"
+          slot="append"
+          icon="el-icon-search"
+          @click="searchAllCognitiveTask"
         />
       </el-input>
       <el-button
-          class="ml10"
-          icon="el-icon-refresh"
-          @click="reset"
-          size="small"
+        class="ml10"
+        icon="el-icon-refresh"
+        @click="reset"
+        size="small"
       />
     </div>
     <!--记录展示start-->
     <el-table
-        :header-cell-style="{ background: '#F6F7FB', color: '#606266' }"
-        :data="tableData"
-        border
-        style="width: 100%; margin-top: 20px"
-        size="small"
-        class="table-padding"
+      :header-cell-style="{ background: '#F6F7FB', color: '#606266' }"
+      :data="tableData"
+      border
+      style="width: 100%; margin-top: 20px"
+      class="table-padding"
+      size="small"
     >
       <el-table-column
-          prop="name"
-          label="认知任务名称"
-          align="center"
-          width="480"
-      />
-      <el-table-column
-          prop="description"
-          label="简介"
-          align="left"
+        prop="name"
+        label="认知任务名称"
+        align="center"
+        width="480"
       />
+      <el-table-column prop="description" label="简介" align="left" />
       <el-table-column label="操作" width="240px" align="center">
         <template slot-scope="scope">
-          <el-button plain size="small" @click="editHandle(scope.row)"
-          >
+          <el-button plain size="small" @click="editHandle(scope.row)">
             编辑
           </el-button>
         </template>
@@ -55,33 +50,47 @@
     <!--记录展示end-->
 
     <!--分页插件-->
-    <div class="pageNation">
+    <div class="txt-center" style="margin-top: 20px">
       <el-pagination
-          size="small"
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="pageNum"
-          :page-sizes="[10, 20, 50, 100]"
-          :page-size="pageSize"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="total"
-      >
-      </el-pagination>
+        background
+        size="small"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="pageNum"
+        :page-sizes="[10, 20, 50, 100]"
+        :page-size="pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="total"
+      />
     </div>
 
     <!-- 认知任务简介设置弹窗 -->
-    <el-dialog :title="`${formTitle}  - 简介修改`" :visible.sync="descriptionVisible" append-to-body>
-      <el-input type="textarea" v-model="description" placeholder="请输入简介" rows="8" style="margin: 16px 0" />
+    <el-dialog
+      :title="`${formTitle}  - 简介修改`"
+      :visible.sync="descriptionVisible"
+      append-to-body
+    >
+      <el-input
+        type="textarea"
+        v-model="description"
+        placeholder="请输入简介"
+        rows="8"
+        style="margin: 16px 0"
+      />
       <div slot="footer" class="dialog-footer">
-        <el-button size="small" @click="descriptionVisible = false">取 消</el-button>
-        <el-button size="small" type="primary" @click="saveDescription">保存</el-button>
+        <el-button size="small" @click="descriptionVisible = false"
+          >取 消</el-button
+        >
+        <el-button size="small" type="primary" @click="saveDescription"
+          >保存</el-button
+        >
       </div>
     </el-dialog>
   </div>
 </template>
 
 <script>
-import {mapActions} from "vuex"
+import { mapActions } from "vuex";
 
 export default {
   name: "CognitiveTaskMgr",
@@ -97,88 +106,89 @@ export default {
       institutionNo: "",
       type: "0",
       flag: "",
-      targetId: '',
-      description: '',
+      targetId: "",
+      description: "",
       descriptionVisible: false,
-      formTitle: '',
+      formTitle: "",
       rulesSettingList: [],
-      wKeyword: ""
-    }
+      wKeyword: "",
+    };
   },
   /*页面初始化*/
   created() {
     this.institutionNo = sessionStorage.getItem(
-        "f7a42fe7211f98ac7a60a285ac3a9527"
-    )
-    this.getAllCognitiveTask()
+      "f7a42fe7211f98ac7a60a285ac3a9527"
+    );
+    this.getAllCognitiveTask();
   },
   methods: {
     ...mapActions({
-      setSacleListName: "setSacleListName"
+      setSacleListName: "setSacleListName",
     }),
 
     // 查询全部认知任务
     getAllCognitiveTask() {
       this.$http.get(
-          `subjectInfo/getCognizeListByName?categoryEname=CALL&scaleName=${this.wKeyword}&pageNum=1&pageSize=10`,
-          {},
-          (response) => {
-            console.log('response: ', response)
-            this.tableData = response.data.data
-            this.total = response.data.allNum
-          }, (err) => {
-            console.log(err)
-            this.loading = false
-          }
-      )
+        `subjectInfo/getCognizeListByName?categoryEname=CALL&scaleName=${this.wKeyword}&pageNum=${this.pageNum}&pageSize=${this.pageSize}`,
+        {},
+        (response) => {
+          console.log("response: ", response);
+          this.tableData = response.data.data;
+          this.total = response.data.allNum;
+        },
+        (err) => {
+          console.log(err);
+          this.loading = false;
+        }
+      );
     },
     searchAllCognitiveTask() {
-      this.pageNum = 1
-      this.getAllCognitiveTask()
+      this.pageNum = 1;
+      this.getAllCognitiveTask();
     },
 
     // 重置预警认知任务搜索
     reset() {
-      this.wKeyword = ""
-      this.searchAllCognitiveTask()
+      this.wKeyword = "";
+      this.searchAllCognitiveTask();
     },
 
     // 全部认知任务分页
     handleCurrentChange(val) {
-      this.pageNum = val
-      this.getAllCognitiveTask()
+      this.pageNum = val;
+      this.getAllCognitiveTask();
     },
 
     handleSizeChange(val) {
-      this.pageSize = val
-      this.getAllCognitiveTask()
+      this.pageSize = val;
+      this.getAllCognitiveTask();
     },
 
     // 编辑认知任务阈值
     editHandle(row) {
-      this.targetId = row.id
-      this.formTitle = row.name
-      this.description = row.description
-      this.descriptionVisible = true
+      this.targetId = row.id;
+      this.formTitle = row.name;
+      this.description = row.description;
+      this.descriptionVisible = true;
     },
 
     // 保存修改后的评分规则信息
     saveDescription() {
       this.$http.post(
-          'cognitive/updateCognitiveTask',
-          {
-            id: this.targetId,
-            description: this.description
-          },
-          () => {
-            this.getAllCognitiveTask()
-            this.$message.success("修改成功")
-            this.descriptionVisible = false
-          }
-      )
-    }
-  }
-}
+        "cognitive/updateCognitiveTask",
+        {
+          id: this.targetId,
+          description: this.description,
+        },
+        () => {
+          this.getAllCognitiveTask();
+          this.$message.success("修改成功");
+          this.descriptionVisible = false;
+        }
+      );
+    },
+  },
+};
 </script>
 
 <style scoped>
@@ -209,7 +219,7 @@ export default {
 ::v-deep .el-pager li.active {
   color: #ffffff;
   cursor: default;
-  background-color: #007EFF;
+  background-color: #007eff;
 }
 
 ::v-deep .el-pagination.is-background .el-pager li {
@@ -227,4 +237,9 @@ export default {
   justify-content: center;
   align-items: center;
 }
+.table-padding {
+  height: calc(100vh - 1.4rem) !important;
+  overflow: auto !important;
+  overflow-x: hidden !important;
+}
 </style>

+ 212 - 15
src/components/manage/main/parameterSetting.vue

@@ -1,37 +1,230 @@
 <template>
   <div class="parameter-setting-container">
     <el-collapse v-model="activeNames" @change="handleChange">
-      <el-collapse-item name="1">
+      <el-collapse-item v-for="(subject, index) in subjectInfos" :key="index" :name="index + ''">
         <template slot="title">
-          <span class="collapse-title">多目标追踪</span>
+          <span class="collapse-title">{{ subject.name }}</span>
         </template>
-        <div>与现实生活一致:与现实生活的流程、逻辑保持一致,遵循用户习惯的语言和概念;</div>
-        <div>在界面中一致:所有的元素和结构需保持一致,比如:设计样式、图标和文本、元素的位置等。</div>
-      </el-collapse-item>
-      <el-collapse-item name="2">
-        <template slot="title">
-          <span class="collapse-title">Go/No-go冲动抑制测试(高级版)</span>
-        </template>
-        <div>控制反馈:通过界面样式和交互动效让用户可以清晰的感知自己的操作;</div>
-        <div>页面反馈:操作后,通过页面元素的变化清晰地展现当前状态。</div>
+        <div v-if="showTools" class="flex-row top-btn">
+          <el-button type="primary" size="mini" @click="addParam(subject, index)">新增</el-button>
+        </div>
+        <el-table
+          :header-cell-style="{ background: '#F6F7FB', color: '#606266' }"
+          :data="subject.options"
+          border
+          style="width: 100%;"
+        >
+          <el-table-column prop="name" label="名称" min-width="3">
+            <template slot-scope="scope">
+              {{ scope.row.name }}
+              <template v-if="scope.row.remaks && scope.row.remaks.length > 0">
+                {{ scope.row.remaks }}
+              </template>
+            </template>
+          </el-table-column>
+          <el-table-column prop="code" label="编码" min-width="1" />
+          <el-table-column prop="value" label="值" min-width="2" >
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.value" placeholder="请输入参数值" @change="editParam(scope.row)"></el-input>
+            </template>
+          </el-table-column>
+        </el-table>
       </el-collapse-item>
     </el-collapse>
+    <el-dialog
+      :title="dialogTitle"
+      :visible.sync="dialogVisible"
+      width="40%"
+      append-to-body
+    >
+      <el-form :model="form" :rules="rules" ref="ruleForm" label-width="160px">
+        <el-form-item label="参数名称" prop="name">
+          <el-input v-model="form.name" placeholder="请输入参数名称"></el-input>
+        </el-form-item>
+        <el-form-item label="参数编码" prop="name">
+          <el-input v-model="form.code" placeholder="请输入参数编码(确认后不可更改)"></el-input>
+        </el-form-item>
+        <el-form-item label="值" prop="name">
+          <el-input v-model="form.value" placeholder="请输入参数值"></el-input>
+        </el-form-item>
+        <el-form-item label="备注" prop="remarks">
+          <el-input v-model="form.remarks" placeholder="请输入备注"></el-input>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="dialogVisible = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="addParamFn">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
 <script>
+
 export default {
   name: "ReportMgr",
   data() {
     return {
-      activeNames: ['1']
-    };
+      activeNames: [],
+      subjectInfos: [],
+      loading: false,
+      uId: '',
+      institutionNo: '',
+
+      dialogTitle: '',
+      dialogVisible: false,
+      targetSubject: {},
+      targetIndex: -1,
+      form: {
+        id: null, // 数据ID
+        taskId: '', // 认知任务ID
+        code: '', // 参数编码
+        name: '', // 参数名称
+        value: '', // 参数值
+        remarks: '' // 备注
+      },
+      rules: {
+        name: [
+          { required: true, message: '请输入参数名称', trigger: 'blur' }
+        ],
+        code: [
+          { required: true, message: '请输入参数编码', trigger: 'blur' }
+        ],
+        value: [
+          { required: true, message: '请输入参数值', trigger: 'blur' }
+        ]
+      },
+
+      showTools: false
+    }
   },
   mounted() {
+    this.showTools = process.env.NODE_ENV === 'development'
+    this.loadData()
   },
   methods: {
     handleChange(val) {
-      console.log(val);
+      val.forEach((item) => {
+        this.$http.get(
+            `/taskParam/getByTaskId?taskId=${this.subjectInfos[Number(item)].id}`,
+            {},
+            (msg) => {
+              this.subjectInfos[Number(item)].options = msg.data
+              console.log('this.subjectInfos[Number(item)].options: ', this.subjectInfos[Number(item)].options)
+            }
+        )
+      })
+    },
+
+    // 加载数据
+    loadData() {
+      this.loading = true
+      this.$http.get(
+          `subjectInfo/getCognizeListByName?categoryEname=CALL&scaleName=&pageNum=1&pageSize=100`,
+          {},
+          (msg) => {
+            console.log(msg,'msg')
+            this.subjectInfos = msg.data.data.filter((item) => ['空间定向任务', '精神运动警觉度测试', '时间知觉能力测试', '多目标追踪', '决策倾向测试'].includes(item.name)).map((item) => {
+              return {
+                id: item.no,
+                name: item.name,
+                isOpen: false,
+                options: []
+              }
+            })
+            console.log('')
+            console.log('-----------------http start-------------------')
+            console.log('this.subjectInfos: ', this.subjectInfos)
+            console.log('-----------------http end-------------------')
+            console.log('')
+            setTimeout(() => {
+              this.loading = false
+            }, 350)
+          }, (err) => {
+            console.log(err)
+            this.loading = false
+          }
+      )
+    },
+
+    /**
+     * 新增参数
+     * @param subject 当前 subjectInfos
+     * @param index 当前索引
+     */
+    addParam(subject, index) {
+      this.form = {
+        id: null, // 数据ID
+        taskId: subject.id, // 认知任务ID
+        code: '', // 参数编码
+        name: '', // 参数名称
+        value: '', // 参数值
+        remaks: '' // 备注
+      }
+      this.targetIndex = index
+      this.dialogTitle = `${subject.name} 参数设置`
+      this.dialogVisible = true
+    },
+
+    addParamFn() {
+      this.$refs.ruleForm.validate((valid) => {
+        if (valid) {
+          this.$http.post(
+              '/taskParam/save',
+              this.form,
+              () => {
+                this.$message({
+                  message: '添加成功',
+                  type: 'success'
+                })
+                this.dialogVisible = false
+                this.subjectInfos[this.targetIndex].options.push(this.form)
+              },
+              (err) => {
+                this.$message.error('添加失败, ' + err.msg)
+              }
+          )
+        }
+      })
+    },
+
+    editParam(row) {
+      console.log(row,'row')
+      let params = {
+        code:row.code,
+        id:row.id,
+        name:row.name,
+        taskId:row.taskId,
+        value:row.value
+      }
+      let valid = true;
+      if (row.code == 'TTC_Target_Count' || row.code =='SOA_Target_Count') {
+        console.log('TTC_Target_Count')
+        const items = row.value.split(",");
+        for (const item of items) {
+          if (Number(item) > 5) {
+            valid = false;
+            break;
+          }
+        }
+      }
+      if (valid) {
+        this.$http.post(
+            '/taskParam/update',
+            params,
+            () => {
+              console.log('修改成功!~')
+              this.$message.success('修改成功')
+            },
+            (err) => {
+              this.$message.error('修改失败, ' + err.msg)
+            }
+        )
+      } else {
+        console.log("字符串中有项大于 5");
+        this.$message.error('修改失败,目标数量最大值不能超过5')
+      }
+
     }
   }
 }
@@ -43,12 +236,16 @@ export default {
   height: calc(100% - 50px);
   padding: 15px 25px;
   border-radius: 8px;
-  overflow: hidden;
+  overflow: auto;
   background-color: white;
 
   .collapse-title {
     font-size: 0.08rem;
     color: #007EFF;
   }
+
+  .top-btn {
+    margin-bottom: 8px;
+  }
 }
 </style>

+ 9 - 0
src/components/manage/main/planHistory.vue

@@ -396,6 +396,15 @@ export default {
           this.total = res.data.totalElements;
         }
       );
+    },
+    handleSelectionChangeForUser(){
+
+    },
+    handleSelectionChangeForTypeTask(){
+
+    },
+    handleSizeChangeForTestRight(){
+
     },
     // 历史计划分页切换
     planCurrentChangeHandle(i) {

+ 9 - 1
src/components/manage/main/testPlan.vue

@@ -1578,7 +1578,15 @@ export default {
           this.testRightDatas = response.data.data
         }
       )
-
+      console.log({
+        pageNum: this.currentPageForAddTypeTask,
+        pageSize: this.pageSizeForAddTypeTask,
+        institutionNo: this.institutionNo,
+        type: this.addTaskType,
+        searchKey: this.searchKeyForTypeTask,
+        testPlanId: this.ingRowId,
+        categoryEname: this.currentMenu
+      },'查看参数')
       this.$http.post(
         "/testPlan/getNoAuth",
         {

+ 1 - 0
src/style/public.scss

@@ -654,6 +654,7 @@
       .el-table__body-wrapper {
         height: calc(100% - 0.125rem);
         overflow: auto;
+        overflow-x: hidden;
       }
     }
   }