Преглед на файлове

操作按钮 输入框 下拉框选项id的添加以及回车事件

zhangdan преди 4 години
родител
ревизия
64ac0a3f4f

+ 8 - 2
src/views/appSetting/addEditionSetting.vue

@@ -16,6 +16,7 @@
                     rules: [{ required: true, message: '请输入版本号' }]
                   },
                 ]"
+				id="addEditionSetting-version"
                 placeholder="请输入版本号"
               />
             </a-form-item>
@@ -28,6 +29,7 @@
             >
               <a-date-picker
                 show-time
+				id="addEditionSetting-publicDate"
                 placeholder="年/月/日 时/分/秒"
                 v-decorator="[
                   'formData.publicDate',
@@ -44,6 +46,7 @@
             >
               <a-radio-group
                 name="radioGroup"
+				id="addEditionSetting-forceUpgrade"
                 @change="onChange"
                 v-decorator="[
                   'formData.forceUpgrade',
@@ -70,6 +73,7 @@
                     rules: [{ message: '请输入下载链接' }]
                   },
                 ]"
+				id="addEditionSetting-downloadUrl"
                 placeholder="请输入下载链接"
               />
             </a-form-item>
@@ -83,6 +87,7 @@
 
               <a-textarea
                 placeholder="请输入升级内容"
+				id="addEditionSetting-upgradeContent"
                 auto-size
                 v-decorator="[
                   'formData.upgradeContent',
@@ -104,6 +109,7 @@
               <div style="display: block;">
                 <Upload
                   ref="upfile"
+				  id="addEditionSetting-attachment"
                   :maxNums="1"
                   :fileSize="100"
                   v-decorator="[
@@ -121,10 +127,10 @@
           </a-col>
         </a-row>
         <a-form-item :label-col="formTailLayout.labelCol" :wrapper-col="formTailLayout.wrapperCol">
-          <a-button htmlType="submit" type="primary">
+          <a-button htmlType="submit" type="primary" id="addEditionSetting-submit">
             保存
           </a-button>
-          <a-button style="margin-left: 20px;" @click="cansel">
+          <a-button style="margin-left: 20px;" @click="cansel" id="addEditionSetting-cansel">
             返回列表
           </a-button>
         </a-form-item>

+ 14 - 9
src/views/appSetting/bannerSetting.vue

@@ -1,7 +1,7 @@
 <template>
   <a-card :bordered="false">
     <div class="add">
-      <a-button type="primary" icon="plus" class="addBtn" @click="showModal">新建</a-button>
+      <a-button type="primary" icon="plus" class="addBtn" @click="showModal" id="bannerSetting-showModal">新建</a-button>
     </div>
     <v-select ref="position" style="display: none;" code="ADVERT_POSITION"></v-select>
     <!-- table列表 -->
@@ -14,18 +14,18 @@
       :data="loadData"
       bordered>
       <!-- 广告图位置 -->
-      <span slot="position" slot-scope="text,record">
+      <span slot="position" slot-scope="text">
         {{ $refs.position.getNameByCode(text) }}
       </span>
       <span slot="action" slot-scope="text, record">
         <template>
-          <a-icon type="eye" :style="{ fontSize: '20px', color: '#e29e14', padding: '0 10px' }" @click="handleEdit(record, 1)" />
-          <a-icon type="edit" v-if="record.status == '0'" style="font-size: 20px;color: #1890FF;padding: 0 10px;" @click="handleEdit(record, 0)" />
-          <a-icon type="delete" v-if="record.status == '0'" style="font-size: 20px;color: red;padding: 0 10px;" @click="delect(record)" />
+          <a-icon type="eye" id="bannerSetting-handleDel" :style="{ fontSize: '20px', color: '#e29e14', padding: '0 10px' }" @click="handleEdit(record, 1)" />
+          <a-icon type="edit" id="bannerSetting-handleEdit" v-if="record.status == '0'" style="font-size: 20px;color: #1890FF;padding: 0 10px;" @click="handleEdit(record, 0)" />
+          <a-icon type="delete" id="bannerSetting-delect" v-if="record.status == '0'" style="font-size: 20px;color: red;padding: 0 10px;" @click="delect(record)" />
         </template>
       </span>
       <span slot="status" slot-scope="text,record">
-        <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model=" record.status==1 ? true : false " @change="changeFlagHandle(text, record)" />
+        <a-switch checkedChildren="启用" unCheckedChildren="禁用" id="bannerSetting-changeFlagHandle" v-model=" record.status==1 ? true : false " @change="changeFlagHandle(text, record)" />
       </span>
     </s-table>
     <!-- 弹窗 -->
@@ -45,6 +45,7 @@
         :hideRequiredMark="hideRequiredMark">
         <a-form-item label="名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
           <a-input
+            id="bannerSetting-title"
             :maxLength="30"
             v-decorator="['formData.title', { initialValue:formData.title,rules: [{ required: true, message: '请输入轮播图名称30个字以内!' }] }]"
             :disabled="disabled"
@@ -56,6 +57,7 @@
             code="ADVERT_POSITION"
             v-model="formData.position"
             allowClear
+            id="bannerSetting-position"
             placeholder="请选择广告图位置"
             :disabled="disabled"
             v-decorator="['formData.position', { initialValue:formData.position,rules: [{ required: true, message: '请选择广告图位置!' }] }]"></v-select>
@@ -64,6 +66,7 @@
           <a-input
             v-decorator="['formData.url', { initialValue:formData.url,rules: [{ required: false, message: '请填写跳转链接!' }] }]"
             :disabled="disabled"
+            id="bannerSetting-url"
             placeholder="请输入跳转链接" />
         </a-form-item>
         <a-form-item label="排序" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
@@ -71,10 +74,11 @@
             type="number"
             v-decorator="['formData.sort', { initialValue:formData.sort, rules: [{ required: true, message: '请排序!' }] }]"
             :disabled="disabled"
+            id="bannerSetting-sort"
             placeholder="请输入序号值" />
         </a-form-item>
         <a-form-item label="状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-          <a-radio-group :disabled="disabled" v-decorator="['formData.status', { initialValue:formData.status,rules: [{ required: true, message: '请选择状态!' }] }]">
+          <a-radio-group :disabled="disabled" id="bannerSetting-status" v-decorator="['formData.status', { initialValue:formData.status,rules: [{ required: true, message: '请选择状态!' }] }]">
             <a-radio value="1">
               启用
             </a-radio>
@@ -87,6 +91,7 @@
           <div style="border: 1px solid #eee;overflow: hidden;padding: 8px 8px 0;">
             <Upload
               v-if="title != '查看详情'"
+              id="bannerSetting-photoPath"
               v-decorator="[
                 'formData.photoPath',
                 {
@@ -104,10 +109,10 @@
           </div>
         </a-form-item>
         <a-form-item :wrapper-col="{ span: 12, offset: 5 }" style="text-align: center;">
-          <a-button type="primary" html-type="submit" v-if="!disabled">
+          <a-button type="primary" html-type="submit" v-if="!disabled" id="bannerSetting-submit">
             保存
           </a-button>
-          <a-button @click="close()" style="margin-left: 8px">
+          <a-button @click="close()" style="margin-left: 8px" id="bannerSetting-close">
             返回列表
           </a-button>
         </a-form-item>

+ 2 - 2
src/views/appSetting/editionSetting.vue

@@ -2,7 +2,7 @@
   <a-card :bordered="false">
     <!-- 新建 -->
     <div class="add">
-      <a-button type="primary" icon="plus" class="addBtn" @click="openModal()">新建</a-button>
+      <a-button type="primary" icon="plus" class="addBtn" @click="openModal()" id="editionSetting-openModal">新建</a-button>
     </div>
     <!-- table列表 -->
     <s-table
@@ -15,7 +15,7 @@
     >
       <span slot="action" slot-scope="text, record">
         <template>
-          <a-icon v-if="currentDate < new Date(record.publicDate).getTime()" type="edit" style="font-size: 20px;color: #1890FF;padding: 0 10px;" @click="handleEdit(record)" />
+          <a-icon v-if="currentDate < new Date(record.publicDate).getTime()" type="edit" id="editionSetting-handleEdit" style="font-size: 20px;color: #1890FF;padding: 0 10px;" @click="handleEdit(record)" />
           <span v-if="currentDate > new Date(record.publicDate).getTime()">-</span>
         </template>
       </span>

+ 11 - 6
src/views/bnSetting/menu/adminMenus.vue

@@ -1,9 +1,9 @@
 <template>
   <a-card :bordered="false">
     <a-row :gutter="24">
-      <a-button style="margin-right: 10px;" type="primary" icon="plus" @click="addChild">添加子菜单</a-button>
-      <a-button style="margin-right: 10px;background-color: #19be6b;color: #fff;" type="" icon="plus" @click="addTitle">添加顶部菜单</a-button>
-      <a-button style="margin-right: 10px;background-color: red;color: #fff;" type="" icon="delete" @click="delect()">删除</a-button>
+      <a-button style="margin-right: 10px;" type="primary" icon="plus" @click="addChild" id="adminMenus-addChild">添加子菜单</a-button>
+      <a-button style="margin-right: 10px;background-color: #19be6b;color: #fff;" type="" icon="plus" @click="addTitle" id="adminMenus-addTitle">添加顶部菜单</a-button>
+      <a-button style="margin-right: 10px;background-color: red;color: #fff;" type="" icon="delete" @click="delect()" id="adminMenus-delect">删除</a-button>
 
     </a-row>
     <a-row :gutter="24">
@@ -15,7 +15,7 @@
         </a-row>
 
         <a-row :gutter="24" >
-          <a-input-search placeholder="输入搜索菜单名搜索" style="width: 100%" @change="onChange" />
+          <a-input-search placeholder="输入搜索菜单名搜索" style="width: 100%" @change="onChange" id="adminMenus-onChange"/>
           <a-tree
             @expand="onExpand"
             :treeData="getMenus"
@@ -54,6 +54,7 @@
           <!-- 名称 -->
           <a-form-item label="名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-input
+              id="adminMenus-name"
               placeholder="请输入名称"
               v-decorator="['formData.name', {
                 initialValue: formData.name,
@@ -90,6 +91,7 @@
           <!-- 前端权限编码 -->
           <a-form-item label="前端权限编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-input
+              id="adminMenus-code"
               placeholder="请输入前端权限编码"
               v-decorator="[
                 'formData.code',
@@ -102,6 +104,7 @@
           <!-- 后台权限编码 -->
           <a-form-item label="后台权限编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-input
+              id="adminMenus-permission"
               placeholder="请输入后台权限编码"
               v-decorator="[
                 'formData.permission',
@@ -143,6 +146,7 @@
           <!-- 排序值 -->
           <a-form-item label="排序值" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-input
+              id="adminMenus-sort"
               type="number"
               placeholder="请输入排序值"
               v-decorator="['formData.sort', {
@@ -153,6 +157,7 @@
           <!-- 状态 -->
           <a-form-item label="启用" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-radio-group
+              id="adminMenus-status"
               name="radioGroup"
               v-decorator="[
                 'formData.status',
@@ -167,10 +172,10 @@
           </a-form-item>
 
           <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
-            <a-button type="primary" @click="handleSubmit()">
+            <a-button type="primary" @click="handleSubmit()" id="adminMenus-handleSubmit">
               保存
             </a-button>
-            <a-button :style="{ marginLeft: '8px' }" @click="clear">
+            <a-button :style="{ marginLeft: '8px' }" @click="clear" id="adminMenus-clear">
               重置
             </a-button>
           </a-form-item>

+ 8 - 2
src/views/bnSetting/menu/childModal.vue

@@ -12,6 +12,7 @@
         <!-- 类型 -->
         <a-form-item label="类型" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-select
+		  id="childModal-type"
             @change="selectChange"
             :disabled="disabled"
             v-decorator="[
@@ -32,6 +33,7 @@
         <a-form-item label="名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-input
             placeholder="请输入名称"
+			 id="childModal-name"
             v-decorator="['formData.name', {
               initialValue: formData.name,
               rules: [{ required: true, message: '请输入名称!' },{pattern:'^[^<|>]{1,20}$',message:'请输入不含<或>的字符,最多20个字符'}] }]"
@@ -66,6 +68,7 @@
         <a-form-item label="前端权限编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-input
             placeholder="请输入前端权限编码"
+			 id="childModal-code"
             v-decorator="[
               'formData.code',
               {
@@ -79,6 +82,7 @@
         <a-form-item label="后台权限编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-input
             placeholder="请输入后台权限编码"
+			 id="childModal-permission"
             v-decorator="[
               'formData.permission',
               {initialValue: formData.permission},
@@ -121,6 +125,7 @@
           <a-input
             type="number"
             placeholder="请输入排序值"
+			 id="childModal-sort"
             v-decorator="['formData.sort', {
               initialValue: formData.sort,
               rules: [] }]"
@@ -160,6 +165,7 @@
         <a-form-item label="启用" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-radio-group
             name="radioGroup"
+			 id="childModal-status"
             v-decorator="[
               'formData.status',
               {
@@ -173,10 +179,10 @@
         </a-form-item>
 
         <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
-          <a-button type="primary" @click="handleSubmit()">
+          <a-button type="primary" @click="handleSubmit()" id="childModal-handleSubmit">
             保存
           </a-button>
-          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
+          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()" id="childModal-handleCancel">
             取消
           </a-button>
         </a-form-item>

+ 12 - 7
src/views/bnSetting/menu/storeMenus.vue

@@ -1,9 +1,9 @@
 <template>
   <a-card :bordered="false">
     <a-row :gutter="24">
-      <a-button style="margin-right: 10px;" type="primary" icon="plus" @click="addChild">添加子菜单</a-button>
-      <a-button style="margin-right: 10px;background-color: #19be6b;color: #fff;" type="" icon="plus" @click="addTitle">添加顶部菜单</a-button>
-      <a-button style="margin-right: 10px;background-color: red;color: #fff;" type="" icon="delete" @click="delect()">删除</a-button>
+      <a-button style="margin-right: 10px;" type="primary" icon="plus" @click="addChild" id="storeMenus-addChild">添加子菜单</a-button>
+      <a-button style="margin-right: 10px;background-color: #19be6b;color: #fff;" type="" icon="plus" @click="addTitle" id="storeMenus-addTitle">添加顶部菜单</a-button>
+      <a-button style="margin-right: 10px;background-color: red;color: #fff;" type="" icon="delete" @click="delect()" id="storeMenus-delect">删除</a-button>
 
     </a-row>
     <a-row :gutter="24">
@@ -15,7 +15,7 @@
         </a-row>
 
         <a-row :gutter="24" >
-          <a-input-search placeholder="输入搜索菜单名搜索" style="width: 100%" @change="onChange" />
+          <a-input-search placeholder="输入搜索菜单名搜索" style="width: 100%" @change="onChange" id="storeMenus-onChange"/>
           <a-tree
             @expand="onExpand"
             :treeData="getMenus"
@@ -54,6 +54,7 @@
           <!-- 名称 -->
           <a-form-item label="名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-input
+              id="storeMenus-name"
               placeholder="请输入名称"
               v-decorator="['formData.name', {
                 initialValue: formData.name,
@@ -90,6 +91,7 @@
           <!-- 前端权限编码 -->
           <a-form-item label="前端权限编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-input
+              id="storeMenus-code"
               placeholder="请输入前端权限编码"
               v-decorator="[
                 'formData.code',
@@ -102,6 +104,7 @@
           <!-- 后台权限编码 -->
           <a-form-item label="后台权限编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-input
+              id="storeMenus-permission"
               placeholder="请输入后台权限编码"
               v-decorator="[
                 'formData.permission',
@@ -144,6 +147,7 @@
           <a-form-item label="排序值" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-input
               type="number"
+              id="storeMenus-sort"
               placeholder="请输入排序值"
               v-decorator="['formData.sort', {
                 initialValue: formData.sort,
@@ -166,7 +170,7 @@
             </a-radio-group>
           </a-form-item> -->
           <!-- 单店可用 -->
-         <!-- <a-form-item label="单店可用" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
+          <!-- <a-form-item label="单店可用" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-radio-group
               name="radioGroup"
               v-decorator="[
@@ -183,6 +187,7 @@
           <!-- 状态 -->
           <a-form-item label="启用" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-radio-group
+              id="storeMenus-status"
               name="radioGroup"
               v-decorator="[
                 'formData.status',
@@ -197,10 +202,10 @@
           </a-form-item>
 
           <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
-            <a-button type="primary" @click="handleSubmit()">
+            <a-button type="primary" @click="handleSubmit()" id="storeMenus-handleSubmit">
               保存
             </a-button>
-            <a-button :style="{ marginLeft: '8px' }" @click="clear">
+            <a-button :style="{ marginLeft: '8px' }" @click="clear" id="storeMenus-clear">
               重置
             </a-button>
           </a-form-item>

+ 1 - 1
src/views/bnSetting/menusAuth.vue

@@ -11,7 +11,7 @@
       />
     </a-form>
     <a-form-item :wrapper-col="{ offset: 3 }">
-      <a-button type="primary" @click="handleSubmit()">
+      <a-button id="menusAuth-handleSubmit" type="primary" @click="handleSubmit()">
         保存
       </a-button>
     </a-form-item>

+ 10 - 4
src/views/power/OperateJournal/OperateJournal.vue

@@ -7,15 +7,21 @@
           <a-row :gutter="48">
             <a-col :md="8" :sm="24">
               <a-form-item label="操作时间">
-                <a-range-picker :format="dateFormat" show-time :placeholder="['开始时间', '结束时间']" v-model="time" @change="onChange" />
+                <a-range-picker
+                  :format="dateFormat"
+                  show-time
+                  :placeholder="['开始时间', '结束时间']"
+                  v-model="time"
+                  @change="onChange"
+                  id="OperateJournal-onChange"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="操作人"><a-input allowClear v-model.trim="searchData.queryWord" placeholder="请输入" /></a-form-item>
+              <a-form-item label="操作人"><a-input allowClear v-model.trim="searchData.queryWord" placeholder="请输入" id="OperateJournal-queryWord"/></a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-button style="margin-right: 10px;" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
-              <a-button type="" @click="resetForm">重置</a-button>
+              <a-button style="margin-right: 10px;" type="primary" @click="$refs.table.refresh(true)" id="OperateJournal-refreshTable">查询</a-button>
+              <a-button type="" @click="resetForm" id="OperateJournal-resetForm">重置</a-button>
             </a-col>
           </a-row>
         </a-form>

+ 14 - 2
src/views/power/dataDictionary/codeItemModal.vue

@@ -9,6 +9,7 @@
               <a-input
                 disabled
                 placeholder=""
+                id="codeItemModal-lookupCode"
                 v-decorator="['formData.lookupCode', {
                   initialValue: formData.lookupCode,
                   rules: [] }]"
@@ -23,6 +24,7 @@
             <a-form-item label="名称" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
               <a-input
                 placeholder="请输入名称"
+                id="codeItemModal-dispName"
                 v-decorator="['formData.dispName', {
                   initialValue: formData.dispName,
                   rules: [{ required: true, message: '请输入名称!' }] }]"
@@ -34,6 +36,7 @@
             <a-form-item label="项编码" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
               <a-input
                 placeholder="请输入项编码"
+                id="codeItemModal-code"
                 v-decorator="['formData.code', {
                   initialValue: formData.code,
                   rules: [{ required: true, message: '请输入项编码!' }] }]"
@@ -46,6 +49,7 @@
             <a-form-item label="启用" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
               <a-radio-group
                 name="radioGroup"
+                id="codeItemModal-isEnable"
                 v-decorator="[
                   'formData.isEnable',
                   {
@@ -64,6 +68,7 @@
               <a-input
                 type="number"
                 placeholder="请输入排序值"
+                id="codeItemModal-sort"
                 v-decorator="['formData.sort', {
                   initialValue: formData.sort,
                   rules: [{ required: true, message: '请输入排序值!' }] }]"
@@ -78,6 +83,7 @@
             <a-form-item label="扩展一" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
               <a-input
                 placeholder=""
+                id="codeItemModal-attr1"
                 v-decorator="['formData.attr1', {
                   initialValue: formData.attr1,
                   rules: [] }]"
@@ -89,6 +95,7 @@
             <a-form-item label="扩展二" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
               <a-input
                 placeholder=""
+                id="codeItemModal-attr2"
                 v-decorator="['formData.attr2', {
                   initialValue: formData.attr2,
                   rules: [] }]"
@@ -100,6 +107,7 @@
             <a-form-item label="扩展三" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
               <a-input
                 placeholder=""
+                id="codeItemModal-attr3"
                 v-decorator="['formData.attr3', {
                   initialValue: formData.attr3,
                   rules: [] }]"
@@ -111,6 +119,7 @@
             <a-form-item label="扩展四" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
               <a-input
                 placeholder=""
+                id="codeItemModal-attr4"
                 v-decorator="['formData.attr4', {
                   initialValue: formData.attr4,
                   rules: [] }]"
@@ -122,6 +131,7 @@
             <a-form-item label="扩展五" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
               <a-input
                 placeholder=""
+                id="codeItemModal-attr5"
                 v-decorator="['formData.attr5', {
                   initialValue: formData.attr5,
                   rules: [] }]"
@@ -133,6 +143,7 @@
             <a-form-item label="扩展六" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
               <a-input
                 placeholder=""
+                id="codeItemModal-attr6"
                 v-decorator="['formData.attr6', {
                   initialValue: formData.attr6,
                   rules: [] }]"
@@ -153,16 +164,17 @@
                 ]"
                 style="min-height: 50px;"
                 placeholder=""
+                id="codeItemModal-remarks"
                 autosize />
             </a-form-item>
           </a-col>
         </a-row>
 
         <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
-          <a-button type="primary" @click="handleSubmit()">
+          <a-button type="primary" @click="handleSubmit()" id="codeItemModal-handleSubmit">
             保存
           </a-button>
-          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
+          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()" id="codeItemModal-handleCancel">
             取消
           </a-button>
         </a-form-item>

+ 7 - 2
src/views/power/dataDictionary/codeModal.vue

@@ -5,6 +5,7 @@
         <!-- 类别编码 -->
         <a-form-item label="类别编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-input
+            id="codeModal-code"
             placeholder="请输入类别编码"
             :disabled="true"
             v-decorator="['formData.code', {
@@ -17,6 +18,7 @@
         <a-form-item label="名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-input
             placeholder="请输入名称"
+            id="codeModal-name"
             v-decorator="['formData.name', {
               initialValue: formData.name,
               rules: [{ required: true, message: '请输入名称!' }] }]"
@@ -28,6 +30,7 @@
           <a-input
             type="number"
             placeholder="请输入排序值"
+            id="codeModal-sort"
             v-decorator="['formData.sort', {
               initialValue: formData.sort,
               rules: [{ required: true, message: '请输入排序值!' }] }]"
@@ -37,6 +40,7 @@
         <a-form-item label="启用" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-radio-group
             name="radioGroup"
+            id="codeModal-isEnable"
             v-decorator="[
               'formData.isEnable',
               {
@@ -56,16 +60,17 @@
               { initialValue: formData.remarks,
                 rules: [] },
             ]"
+            id="codeModal-remarks"
             style="min-height: 60px;"
             placeholder=""
             autosize />
         </a-form-item>
 
         <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
-          <a-button type="primary" @click="handleSubmit()">
+          <a-button type="primary" @click="handleSubmit()" id="codeModal-handleSubmit">
             保存
           </a-button>
-          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
+          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()" id="codeModal-handleCancel">
             取消
           </a-button>
         </a-form-item>

+ 279 - 277
src/views/power/dataDictionary/dataDictionary.vue

@@ -3,26 +3,26 @@
     <a-row :gutter="24">
       <!-- 左侧字典列表 -->
       <a-col :span="6">
-        <a-row :gutter="24">        
-             <!-- <a-button style="margin-right: 10px;" type="primary" icon="plus" @click="addCode">添加字典</a-button> -->   
-              <a-button style="margin-right: 10px;" type="primary" icon="plus" @click="editCode">编辑字典</a-button>
-             <!-- <a-select style="width: 110px" placeholder="更多操作" allowClear >
+        <a-row :gutter="24">
+          <!-- <a-button style="margin-right: 10px;" type="primary" icon="plus" @click="addCode">添加字典</a-button> -->
+          <a-button style="margin-right: 10px;" type="primary" icon="plus" @click="editCode">编辑字典</a-button>
+          <!-- <a-select style="width: 110px" placeholder="更多操作" allowClear >
                <a-select-option @click="editCode" value="编辑字典">编辑字典</a-select-option>
                <a-select-option @click="delectCode" value="删除字典">删除字典</a-select-option>
-             </a-select> -->              
+             </a-select> -->
         </a-row>
-        <a-row :gutter="24"  class="textCount">
+        <a-row :gutter="24" class="textCount">
           <a-icon type="info-circle" style="color: #1890FF;margin-right: 10px;" />
-          <span>当前选择:<span style="color: #40a9ff;font-weight: 600;">{{selectedMenu}}</span><span v-if="selectedKey.length" class="imgSize" @click="cancelSel">取消选择</span></span>
+          <span>当前选择:<span style="color: #40a9ff;font-weight: 600;">{{ selectedMenu }}</span><span v-if="selectedKey.length" class="imgSize" @click="cancelSel">取消选择</span></span>
         </a-row>
         <a-row :gutter="24" >
-          <a-input-search v-model="code" placeholder="输入编码类别/名称 搜索字典" style="width: 100%" @search="getCodeList" />
+          <a-input-search v-model="code" placeholder="输入编码类别/名称 搜索字典" style="width: 100%" @search="getCodeList" id="dataDictionary-getCodeList"/>
         </a-row>
         <a-row :gutter="24" >
-         <a-menu class="menu-box" style="border-right: 0;max-height: 650px;overflow: auto;" v-model="selectedKey" >
-              <a-menu-item  style="margin-bottom: 0px;height: 30px; line-height: 30px;" v-for="(item,index) in codeList" :key="index" :value="item">{{item.name}}</a-menu-item>            
-            </a-menu>
-            <span v-if="noData" style="line-height: 50px; font-weight: 600;">暂无数据</span>
+          <a-menu class="menu-box" style="border-right: 0;max-height: 650px;overflow: auto;" v-model="selectedKey" >
+            <a-menu-item style="margin-bottom: 0px;height: 30px; line-height: 30px;" v-for="(item,index) in codeList" :key="index" :value="item">{{ item.name }}</a-menu-item>
+          </a-menu>
+          <span v-if="noData" style="line-height: 50px; font-weight: 600;">暂无数据</span>
         </a-row>
       </a-col>
       <!-- 右侧数据列表 -->
@@ -33,19 +33,22 @@
               <a-row :gutter="48">
                 <a-col :md="6" :sm="24">
                   <a-form-item label="数据名称">
-                    <a-input allowClear v-model="queryParam.dispName" placeholder="请输入数据名称"/>
+                    <a-input allowClear v-model="queryParam.dispName" placeholder="请输入数据名称" id="dataDictionary-dispName"/>
                   </a-form-item>
                 </a-col>
-          
+
                 <a-col :md="6" :sm="24">
                   <a-form-item label="状态">
-                    <a-select allowClear v-model="queryParam.isEnable"
-                              placeholder="请选择"
+                    <a-select
+                      allowClear
+                      id="dataDictionary-isEnable"
+                      v-model="queryParam.isEnable"
+                      placeholder="请选择"
                     >
-                      <a-select-option  :value = '1'>
+                      <a-select-option :value="1">
                       </a-select-option>
-                      <a-select-option  :value = '0'>
+                      <a-select-option :value="0">
                       </a-select-option>
                     </a-select>
@@ -53,7 +56,7 @@
                   </a-form-item>
                 </a-col>
                 <a-col :md="2" :sm="24">
-                  <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+                  <a-button type="primary" @click="$refs.table.refresh(true)" id="dataDictionary-handSubmit">查询</a-button>
                 </a-col>
                 <!-- <a-col :md="2" :sm="24">
                   <a-button type="primary" @click="queryParam=''">重置</a-button>
@@ -63,11 +66,11 @@
           </div>
           <!-- <a-divider/> -->
           <div class="table-operator">
-            <a-button type="primary" icon="plus" @click="openCodeItemModal">添加数据</a-button>
+            <a-button type="primary" icon="plus" @click="openCodeItemModal" id="dataDictionary-openCodeItemModal">添加数据</a-button>
             <!-- <a-button type="" icon="delete" @click="delectAll">批量删除</a-button> -->
-            <a-button type="" icon="reload" @click="$refs.table.refresh(true)">刷新数据</a-button>
+            <a-button type="" icon="reload" @click="$refs.table.refresh(true)" id="dataDictionary-refreshTable">刷新数据</a-button>
           </div>
-         <!-- <div  class="textCount">
+          <!-- <div  class="textCount">
             <a-icon type="info-circle" style="color: #1890FF;margin-right: 10px;" />
             <span>已选择<span style="color: #40a9ff;font-weight: 600;margin-left: 10px;">{{selectedNum}}项</span><span class="imgSize">清空</span></span>
           </div> -->
@@ -78,16 +81,16 @@
             :columns="columns"
             :data="loadData"
             bordered
-          >         
+          >
             <span slot="action" slot-scope="text, record">
               <template>
-                <a class="action-button" @click="handleEdit(record)">修改</a>
-                <a v-if="!record.isEnable" class="action-button red-text" @click="delect(record)">删除</a>
+                <a class="action-button" @click="handleEdit(record)" id="dataDictionary-handleEdit">修改</a>
+                <a v-if="!record.isEnable" class="action-button red-text" @click="delect(record)" id="dataDictionary-delect">删除</a>
               </template>
             </span>
           </s-table>
         </div>
-        
+
       </a-col>
     </a-row>
     <codeModal :visible="showCodeModal" :data="codeData" @refresh="getCodeList" @close="showCodeModal = false"></codeModal>
@@ -96,272 +99,271 @@
 </template>
 
 <script>
-  import { STable, VSelect } from '@/components'
-  import codeModal from './codeModal.vue'
-  import codeItemModal from './codeItemModal.vue'
-  import { listLookUp, delLookUp, getLookUpItem, delLookUpItem } from '@/api/lookup.js'
-  export default {
-    name: 'dataDictionary',
-    components: {
-      STable, VSelect, codeModal, codeItemModal
-    },
-    props: {},
-    data () {
-       // const rowSelection = {
-       //    onChange: (selectedRowKeys, selectedRows) => {
-       //      console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
-       //    },
-       //    onSelect: (record, selected, selectedRows) => {
-       //      this.selectedNum = selectedRows.length
-       //      console.log(record,'record')
-       //      console.log(selectedRows,'selectedRows')
-       //    },
-       //    onSelectAll: (selected, selectedRows, changeRows) => {
-       //      this.selectedNum = selectedRows.length
-       //      console.log(selected, selectedRows, changeRows)
-       //    }
-       //  }
-      return {
-        // 查询参数
-        queryParam: {
-          dispName: '',
-          isEnable: undefined,
-          lookupCode: ''
+import { STable, VSelect } from '@/components'
+import codeModal from './codeModal.vue'
+import codeItemModal from './codeItemModal.vue'
+import { listLookUp, delLookUp, getLookUpItem, delLookUpItem } from '@/api/lookup.js'
+export default {
+  name: 'DataDictionary',
+  components: {
+    STable, VSelect, codeModal, codeItemModal
+  },
+  props: {},
+  data () {
+    // const rowSelection = {
+    //    onChange: (selectedRowKeys, selectedRows) => {
+    //      console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
+    //    },
+    //    onSelect: (record, selected, selectedRows) => {
+    //      this.selectedNum = selectedRows.length
+    //      console.log(record,'record')
+    //      console.log(selectedRows,'selectedRows')
+    //    },
+    //    onSelectAll: (selected, selectedRows, changeRows) => {
+    //      this.selectedNum = selectedRows.length
+    //      console.log(selected, selectedRows, changeRows)
+    //    }
+    //  }
+    return {
+      // 查询参数
+      queryParam: {
+        dispName: '',
+        isEnable: undefined,
+        lookupCode: ''
+      },
+      noData: false,
+      code: '', // 根据输入编码类别/名称搜索字典
+      selectedNum: '',
+      selectedKey: [], // 选中的字典编码项
+      selectedMenu: '',
+      formLayout: 'horizontal',
+      form: this.$form.createForm(this, { name: 'miniForm' }),
+      codeList: [],
+      showCodeModal: false,
+      showItemCodeModal: false,
+      codeData: {}, // 编辑字典行数据
+      itemCodeData: {},
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'no',
+          width: '40',
+          align: 'center'
+        },
+        {
+          title: '名称',
+          dataIndex: 'dispName',
+          width: '100',
+          align: 'center'
+        },
+        {
+          title: '项编码',
+          dataIndex: 'code',
+          width: '100',
+          align: 'center'
+        },
+        {
+          title: '排序值',
+          dataIndex: 'sort',
+          width: '100',
+          align: 'center'
         },
-        noData: false, 
-        code: '', // 根据输入编码类别/名称搜索字典
-        selectedNum: '',
-        selectedKey: [], // 选中的字典编码项
-        selectedMenu: '',
-        formLayout: 'horizontal',
-        form: this.$form.createForm(this, { name: 'miniForm' }),
-        codeList: [],
-        showCodeModal: false,
-        showItemCodeModal: false,
-        codeData: {}, // 编辑字典行数据
-        itemCodeData: {}, 
-          // 表头
-          columns: [
-            {
-              title: '序号',
-              dataIndex: 'no',
-              width: '40',
-              align: 'center'
-            },
-            {
-              title: '名称',
-              dataIndex: 'dispName',
-              width: '100',
-              align: 'center'
-            },
-            {
-              title: '项编码',
-              dataIndex: 'code',
-              width: '100',
-              align: 'center'
-            },
-            {
-              title: '排序值',
-              dataIndex: 'sort',
-              width: '100',
-              align: 'center'
-            },
-            {
-              title: '是否启用',
-              width: '100',
-              align: 'center',
-              dataIndex: 'isEnable',
-              customRender: function(text) {
-                if (text == 1) {
-                  return '启用'
-                } else {
-                  return '禁用'
-                }
-              }
-            },
-            {
-              title: '创建时间',
-              dataIndex: 'createDate',
-              width: '120',
-              align: 'center'
-            },
-            {
-              title: '备注',
-              dataIndex: 'remarks',
-              width: '100',
-              align: 'center'
-            },
-            {
-              title: '操作',
-              width: '100',
-              align: 'center',
-              scopedSlots: { customRender: 'action' }
+        {
+          title: '是否启用',
+          width: '100',
+          align: 'center',
+          dataIndex: 'isEnable',
+          customRender: function (text) {
+            if (text == 1) {
+              return '启用'
+            } else {
+              return '禁用'
             }
-          ],
-          // 加载数据方法 必须为 Promise 对象
-          loadData: parameter => {
-            console.log(parameter, 'parameter')
-              
-            return getLookUpItem(Object.assign(parameter, this.queryParam)).then(res => {
-              const no = (res.data.pageNo - 1) * res.data.pageSize
-              for (let i = 0; i < res.data.list.length; i++) {
-                const _item = res.data.list[i]
-                _item.no = no + i + 1
-                _item.isEnable = _item.isEnable + '' === '1'
-              }
-              return res.data
-            })
-          },
-          optionAlertShow: false
+          }
+        },
+        {
+          title: '创建时间',
+          dataIndex: 'createDate',
+          width: '120',
+          align: 'center'
+        },
+        {
+          title: '备注',
+          dataIndex: 'remarks',
+          width: '100',
+          align: 'center'
+        },
+        {
+          title: '操作',
+          width: '100',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
         }
-    },
-    methods: {
-     
-      // 获取字典列表
-      getCodeList () {
-        console.log({code:this.code})
-        listLookUp({code:this.code}).then(res => {
-          console.log(res, 'res1111111')
-          if (res.status == 200) {
-            this.codeList = res.data
-            this.noData = false
-            if (!res.data.length) {
-              this.noData = true
-            }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        console.log(parameter, 'parameter')
+
+        return getLookUpItem(Object.assign(parameter, this.queryParam)).then(res => {
+          const no = (res.data.pageNo - 1) * res.data.pageSize
+          for (let i = 0; i < res.data.list.length; i++) {
+            const _item = res.data.list[i]
+            _item.no = no + i + 1
+            _item.isEnable = _item.isEnable + '' === '1'
           }
+          return res.data
         })
       },
-     // 添加字典
-     addCode () {
-       this.showCodeModal = true
-       this.codeData = {}
-     },
-     // 编辑字典
-     editCode () {
-       if (!this.selectedKey.length) {
-        return this.$message.warning('您还未选择要编辑的字典');
-       }
-       this.showCodeModal = true
-       this.codeData = this.codeList[this.selectedKey]
-     },
-     // 删除字典
-     delectCode () {
-       if (!this.selectedKey.length) {
-        return this.$message.warning('您还未选择要删除的字典');
-       }
-       let _this = this
-       let id = this.codeList[this.selectedKey].id
-       this.$confirm({
-         title: '警告',
-         content: `确定要删除 ${this.codeList[this.selectedKey].name} 吗?`,
-         okText: '确定',
-         cancelText: '取消',
-         onOk () {
-           delLookUp({
-             id: id
-           }).then(res => {
-             if (res.status == 200) {
-               _this.$message.success('删除成功')
-               _this.getCodeList()
-             }
-           }).catch(() => {
-             _this.$message.success('删除失败, 请稍后重试')
-           })
-         }
-       })
-     },
+      optionAlertShow: false
+    }
+  },
+  methods: {
+
+    // 获取字典列表
+    getCodeList () {
+      console.log({ code: this.code })
+      listLookUp({ code: this.code }).then(res => {
+        console.log(res, 'res1111111')
+        if (res.status == 200) {
+          this.codeList = res.data
+          this.noData = false
+          if (!res.data.length) {
+            this.noData = true
+          }
+        }
+      })
+    },
+    // 添加字典
+    addCode () {
+      this.showCodeModal = true
+      this.codeData = {}
+    },
+    // 编辑字典
+    editCode () {
+      if (!this.selectedKey.length) {
+        return this.$message.warning('您还未选择要编辑的字典')
+      }
+      this.showCodeModal = true
+      this.codeData = this.codeList[this.selectedKey]
+    },
+    // 删除字典
+    delectCode () {
+      if (!this.selectedKey.length) {
+        return this.$message.warning('您还未选择要删除的字典')
+      }
+      const _this = this
+      const id = this.codeList[this.selectedKey].id
+      this.$confirm({
+        title: '警告',
+        content: `确定要删除 ${this.codeList[this.selectedKey].name} 吗?`,
+        okText: '确定',
+        cancelText: '取消',
+        onOk () {
+          delLookUp({
+            id: id
+          }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success('删除成功')
+              _this.getCodeList()
+            }
+          }).catch(() => {
+            _this.$message.success('删除失败, 请稍后重试')
+          })
+        }
+      })
+    },
     // 字典 取消选择
     cancelSel () {
       this.selectedKey = []
       this.selectedMenu = ''
     },
-    
-     // 新增数据
-     openCodeItemModal () {
-       if (!this.selectedKey.length) {
-        return this.$message.warning('请先选择一个字典类别');
-       }
-       this.showItemCodeModal = true
-       this.itemCodeData = {lookupCode:this.codeList[this.selectedKey].code}
-     },   
-     
-     // 批量删除数据
-      delectAll () {
-        if (!this.selectedNum) {
-         return this.$message.warning('您还未选择要删除的数据');
-        }
-        let _this = this
-        this.$confirm({
-          title: '警告',
-          content: `确定要删除您选择的这${this.selectedNum}条数据吗?`,
-          okText: '确定',
-          cancelText: '取消',
-          onOk () {
-            // delectUserPower({
-            //   id: row.id
-            // }).then(res => {
-            //   if (res.status == 200) {
-            //     _this.$message.success('删除成功')
-            //     _this.$refs.table.refresh()
-            //   }
-            // }).catch(() => {
-            //   _this.$message.success('删除失败, 请稍后重试')
-            // })
-          }
-        })
-      },
-      // 删除
-      delect (row) { 
-        let _this = this
-        this.$confirm({
-          title: '警告',
-          content: '确定要删除吗?',
-          okText: '确定',
-          cancelText: '取消',
-          onOk () {
-            delLookUpItem({
-              id: row.id
-            }).then(res => {
-              console.log(res, 'res1111')
-              if (res.status == 200) {
-                _this.$message.success('删除成功')
-                _this.$refs.table.refresh()
-              }
-            }).catch(() => {
-              _this.$message.success('删除失败, 请稍后重试')
-            })
-          }
-        })
-      },
-      handleEdit (row) {
-        console.log(row, 'row')
-        this.showItemCodeModal = true
-        this.itemCodeData = row 
-      },
-      
-    },
-    mounted () {
-    },
-    beforeCreate () {
-      this.form = this.$form.createForm(this, { name: 'miniForm' })
+
+    // 新增数据
+    openCodeItemModal () {
+      if (!this.selectedKey.length) {
+        return this.$message.warning('请先选择一个字典类别')
+      }
+      this.showItemCodeModal = true
+      this.itemCodeData = { lookupCode: this.codeList[this.selectedKey].code }
     },
-    beforeRouteEnter (to, from, next) {
-      next(vm => {
-        vm.getCodeList()
+
+    // 批量删除数据
+    delectAll () {
+      if (!this.selectedNum) {
+        return this.$message.warning('您还未选择要删除的数据')
+      }
+      const _this = this
+      this.$confirm({
+        title: '警告',
+        content: `确定要删除您选择的这${this.selectedNum}条数据吗?`,
+        okText: '确定',
+        cancelText: '取消',
+        onOk () {
+          // delectUserPower({
+          //   id: row.id
+          // }).then(res => {
+          //   if (res.status == 200) {
+          //     _this.$message.success('删除成功')
+          //     _this.$refs.table.refresh()
+          //   }
+          // }).catch(() => {
+          //   _this.$message.success('删除失败, 请稍后重试')
+          // })
+        }
       })
     },
-    watch: {
-      selectedKey(newValue, oldValue) {
-        console.log(newValue, 'newValue')
-        if (newValue.length) {
-          
-          this.selectedMenu = this.codeList[this.selectedKey].name + " " + '(' + this.codeList[this.selectedKey].code + ')'
-          this.queryParam.lookupCode = this.codeList[this.selectedKey].code
-          this.$refs.table.refresh(true)
+    // 删除
+    delect (row) {
+      const _this = this
+      this.$confirm({
+        title: '警告',
+        content: '确定要删除吗?',
+        okText: '确定',
+        cancelText: '取消',
+        onOk () {
+          delLookUpItem({
+            id: row.id
+          }).then(res => {
+            console.log(res, 'res1111')
+            if (res.status == 200) {
+              _this.$message.success('删除成功')
+              _this.$refs.table.refresh()
+            }
+          }).catch(() => {
+            _this.$message.success('删除失败, 请稍后重试')
+          })
         }
-      }
+      })
     },
+    handleEdit (row) {
+      console.log(row, 'row')
+      this.showItemCodeModal = true
+      this.itemCodeData = row
+    }
+
+  },
+  mounted () {
+  },
+  beforeCreate () {
+    this.form = this.$form.createForm(this, { name: 'miniForm' })
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getCodeList()
+    })
+  },
+  watch: {
+    selectedKey (newValue, oldValue) {
+      console.log(newValue, 'newValue')
+      if (newValue.length) {
+        this.selectedMenu = this.codeList[this.selectedKey].name + ' ' + '(' + this.codeList[this.selectedKey].code + ')'
+        this.queryParam.lookupCode = this.codeList[this.selectedKey].code
+        this.$refs.table.refresh(true)
+      }
+    }
   }
+}
 </script>
 
 <style scoped>
@@ -369,7 +371,7 @@
     width: 6px;
     height: 6px ;
   }
-  
+
   .menu-box::-webkit-scrollbar-thumb{
     width: 6px;
     height: 6px ;
@@ -377,7 +379,7 @@
     -webkit-box-shadow: inset 0 0 2px #d1d1d1;
     background: #e4e4e4;
   }
- 
+
   .textCount{
     border: 1px solid #91d5ff;
     background-color: #e6f7ff;

+ 15 - 15
src/views/power/job/jobs.vue

@@ -5,20 +5,20 @@
         <a-row :gutter="20">
           <a-col :md="6" :sm="24">
             <a-form-item style="margin-bottom: 0;">
-              <a-input v-model.trim="queryParam.name" placeholder="定时器名称" allowClear/>
+              <a-input v-model.trim="queryParam.name" id="jobs-name" placeholder="定时器名称" allowClear @pressEnter="$refs.table.refresh(true)"/>
             </a-form-item>
           </a-col>
           <a-col :md="4" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+            <a-button type="primary" @click="$refs.table.refresh(true)" id="jobs-handSubmit">查询</a-button>
           </a-col>
         </a-row>
       </a-form>
     </div>
     <a-divider />
     <div class="btns">
-      <a-button @click="addJob()" type="primary" icon="plus-circle">添加JOB</a-button>
-      <a-button @click="startJob()" type="default" icon="play-circle">启动</a-button>
-      <a-button @click="stopJob()" type="default" icon="stop">停止</a-button>
+      <a-button @click="addJob()" type="primary" icon="plus-circle" id="jobs-addJob">添加JOB</a-button>
+      <a-button @click="startJob()" type="default" icon="play-circle" id="jobs-startJob">启动</a-button>
+      <a-button @click="stopJob()" type="default" icon="stop" id="jobs-stopJob">停止</a-button>
     </div>
 
     <s-table
@@ -32,11 +32,11 @@
     >
       <span slot="action" slot-scope="text, record">
         <template>
-          <a @click="editJob(record)">编辑</a>
+          <a @click="editJob(record)" id="jobs-editJob">编辑</a>
           <a-divider type="vertical" />
-          <a @click="deleteRow(record)">删除</a>
+          <a @click="deleteRow(record)" id="jobs-deleteRow">删除</a>
           <a-divider type="vertical" />
-          <a @click="syncJob(record)">立即运行一次</a>
+          <a @click="syncJob(record)" id="jobs-syncJob">立即运行一次</a>
         </template>
       </span>
       <span slot="isEnable" slot-scope="text, record">
@@ -64,28 +64,28 @@
           :label-col="{ span: 6 }"
           :wrapper-col="{ span: 17 }"
         >
-          <a-input v-decorator="['formData.name',{initialValue: formData.name,rules:[{ required: true, message: '请输入JOB名称' }]}]"/>
+          <a-input id="jobs-name" v-decorator="['formData.name',{initialValue: formData.name,rules:[{ required: true, message: '请输入JOB名称' }]}]"/>
         </a-form-item>
         <a-form-item
           label="JOB分组"
           :label-col="{ span: 6 }"
           :wrapper-col="{ span: 17 }"
         >
-          <a-input v-decorator="['formData.group',{initialValue: formData.group,rules:[{ required: true, message: '请输入JOB分组称' }]}]"/>
+          <a-input id="jobs-group" v-decorator="['formData.group',{initialValue: formData.group,rules:[{ required: true, message: '请输入JOB分组称' }]}]"/>
         </a-form-item>
         <a-form-item
           label="JOB业务类名"
           :label-col="{ span: 6 }"
           :wrapper-col="{ span: 17 }"
         >
-          <a-input v-decorator="['formData.className',{initialValue: formData.className,rules:[{ required: true, message: '请输入JOB业务类名' }]}]"/>
+          <a-input id="jobs-className" v-decorator="['formData.className',{initialValue: formData.className,rules:[{ required: true, message: '请输入JOB业务类名' }]}]"/>
         </a-form-item>
         <a-form-item
           label="CRON表达式"
           :label-col="{ span: 6 }"
           :wrapper-col="{ span: 17 }"
         >
-          <a-input @click="openCronModal" v-model="formData.cron" @change="setCorn">
+          <a-input @click="openCronModal" v-model="formData.cron" @change="setCorn" id="jobs-cron">
             <a-icon slot="prefix" type="schedule" title="corn控件"/>
             <a-icon v-if="formData.cron" slot="suffix" type="close-circle" @click="formData.cron=''" title="清空"/>
           </a-input>
@@ -96,13 +96,13 @@
           :label-col="{ span: 6 }"
           :wrapper-col="{ span: 17 }"
         >
-          <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-decorator="['formData.isEnable', { initialValue: formData.isEnable, valuePropName: 'checked' }]" />
+          <a-switch checkedChildren="启用" unCheckedChildren="禁用" id="jobs-isEnable" v-decorator="['formData.isEnable', { initialValue: formData.isEnable, valuePropName: 'checked' }]" />
           <!-- <a-switch checkedChildren="启用" unCheckedChildren="禁用" :checked="formData.isEnable" @change="changeStatus"/> -->
         </a-form-item>
 
         <div class="jobBtns">
-          <a-button key="back" @click="handleCancel">取消</a-button>
-          <a-button htmlType="submit" :loading="loading" type="primary">
+          <a-button key="back" @click="handleCancel" id="jobs-handleCancel">取消</a-button>
+          <a-button htmlType="submit" :loading="loading" type="primary" id="jobs-submit">
             确定
           </a-button>
         </div>

+ 8 - 2
src/views/power/menu/childModal.vue

@@ -13,6 +13,7 @@
         <a-form-item label="类型" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-select
             @change="selectChange"
+            id="childModal-type"
             :disabled="disabled"
             v-decorator="[
               'formData.type',
@@ -32,6 +33,7 @@
         <a-form-item label="名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-input
             placeholder="请输入名称"
+            id="childModal-name"
             v-decorator="['formData.name', {
               initialValue: formData.name,
               rules: [{ required: true, message: '请输入名称!' },{pattern:'^[^<|>]{1,20}$',message:'请输入不含<或>的字符,最多20个字符'}] }]"
@@ -66,6 +68,7 @@
         <a-form-item label="前端权限编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-input
             placeholder="请输入前端权限编码"
+            id="childModal-code"
             v-decorator="[
               'formData.code',
               {
@@ -79,6 +82,7 @@
         <a-form-item label="后台权限编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-input
             placeholder="请输入后台权限编码"
+            id="childModal-permission"
             v-decorator="[
               'formData.permission',
               {initialValue: formData.permission},
@@ -121,6 +125,7 @@
           <a-input
             type="number"
             placeholder="请输入排序值"
+            id="childModal-sort"
             v-decorator="['formData.sort', {
               initialValue: formData.sort,
               rules: [] }]"
@@ -130,6 +135,7 @@
         <a-form-item label="启用" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-radio-group
             name="radioGroup"
+            id="childModal-status"
             v-decorator="[
               'formData.status',
               {
@@ -143,10 +149,10 @@
         </a-form-item>
 
         <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
-          <a-button type="primary" @click="handleSubmit()">
+          <a-button type="primary" @click="handleSubmit()" id="childModal-handleSubmit">
             保存
           </a-button>
-          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
+          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()" id="childModal-handleCancel">
             取消
           </a-button>
         </a-form-item>

+ 11 - 6
src/views/power/menu/menu.vue

@@ -1,9 +1,9 @@
 <template>
   <a-card :bordered="false">
     <a-row :gutter="24">
-      <a-button style="margin-right: 10px;" type="primary" icon="plus" @click="addChild">添加子菜单</a-button>
-      <a-button style="margin-right: 10px;background-color: #19be6b;color: #fff;" type="" icon="plus" @click="addTitle">添加顶部菜单</a-button>
-      <a-button style="margin-right: 10px;background-color: red;color: #fff;" type="" icon="delete" @click="delect()">删除</a-button>
+      <a-button style="margin-right: 10px;" type="primary" icon="plus" @click="addChild" id="menu-addChild">添加子菜单</a-button>
+      <a-button style="margin-right: 10px;background-color: #19be6b;color: #fff;" type="" icon="plus" @click="addTitle" id="menu-addTitle">添加顶部菜单</a-button>
+      <a-button style="margin-right: 10px;background-color: red;color: #fff;" type="" icon="delete" @click="delect()" id="menu-delect">删除</a-button>
 
     </a-row>
     <a-row :gutter="24">
@@ -15,7 +15,7 @@
         </a-row>
 
         <a-row :gutter="24" >
-          <a-input-search placeholder="输入搜索菜单名搜索" style="width: 100%" @change="onChange" />
+          <a-input-search placeholder="输入搜索菜单名搜索" style="width: 100%" @change="onChange" id="menu-onChange" />
           <a-tree
             @expand="onExpand"
             :treeData="getMenus"
@@ -55,6 +55,7 @@
           <a-form-item label="名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-input
               placeholder="请输入名称"
+              id="menu-name"
               v-decorator="['formData.name', {
                 initialValue: formData.name,
                 rules: [{ required: true, message: '请输入名称!' },{pattern:'^[^<|>]{1,20}$',message:'请输入不含<或>的字符,最多20个字符'}] }]"
@@ -91,6 +92,7 @@
           <a-form-item label="前端权限编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-input
               placeholder="请输入前端权限编码"
+              id="menu-code"
               v-decorator="[
                 'formData.code',
                 {
@@ -103,6 +105,7 @@
           <a-form-item label="后台权限编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-input
               placeholder="请输入后台权限编码"
+              id="menu-permission"
               v-decorator="[
                 'formData.permission',
                 {
@@ -145,6 +148,7 @@
             <a-input
               type="number"
               placeholder="请输入排序值"
+              id="menu-sort"
               v-decorator="['formData.sort', {
                 initialValue: formData.sort,
                 rules: [] }]"
@@ -154,6 +158,7 @@
           <a-form-item label="启用" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-radio-group
               name="radioGroup"
+              id="menu-status"
               v-decorator="[
                 'formData.status',
                 {
@@ -167,10 +172,10 @@
           </a-form-item>
 
           <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
-            <a-button type="primary" @click="handleSubmit()">
+            <a-button type="primary" @click="handleSubmit()" id="menu-handleSubmit">
               保存
             </a-button>
-            <a-button :style="{ marginLeft: '8px' }" @click="clear">
+            <a-button :style="{ marginLeft: '8px' }" @click="clear" id="menu-clear">
               重置
             </a-button>
           </a-form-item>

+ 13 - 6
src/views/power/register/register.vue

@@ -10,7 +10,7 @@
 
         <a-row :gutter="24" >
           <a-row :gutter="24" >
-            <a-input-search placeholder="搜索" style="width: 100%" @change="onChange" />
+            <a-input-search placeholder="搜索" style="width: 100%" @change="onChange" id="register-onChange"/>
           </a-row>
           <a-tree
             @expand="onExpand"
@@ -36,15 +36,16 @@
 
         <a-form :form="form" @submit="handleSubmit">
           <a-form-item label=" " :colon="false" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-button style="margin-right: 10px;" type="primary" icon="plus" @click="addChild">添加子分类</a-button>
-            <a-button style="margin-right: 10px;background-color: #19be6b;color: #fff;" type="" icon="plus" @click="addTop">添加根节点</a-button>
-            <a-button style="margin-right: 10px;background-color: red;color: #fff;" type="" icon="delete" @click="remove()">删除</a-button>
+            <a-button style="margin-right: 10px;" type="primary" icon="plus" @click="addChild" id="register-addChild">添加子分类</a-button>
+            <a-button style="margin-right: 10px;background-color: #19be6b;color: #fff;" type="" icon="plus" @click="addTop" id="register-addTop">添加根节点</a-button>
+            <a-button style="margin-right: 10px;background-color: red;color: #fff;" type="" icon="delete" @click="remove()" id="register-remove">删除</a-button>
           </a-form-item>
           <!-- 父路径 -->
           <a-form-item label="父路径" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-input
               disabled
               placeholder=""
+              id="register-parentPath"
               v-decorator="['formData.parentPath', {
                 initialValue: formData.parentPath,
                 rules: [] }]"
@@ -54,6 +55,7 @@
           <a-form-item label="显示名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-input
               placeholder="请输入节点显示名称"
+              id="register-dispname"
               v-decorator="['formData.dispname', {
                 initialValue: formData.dispname,
                 rules: [{ required: true, message: '请输入节点显示名称!' }] }]"
@@ -63,6 +65,7 @@
           <a-form-item label="编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-input
               placeholder="请输入节点code"
+              id="register-name"
               v-decorator="['formData.name', {
                 initialValue: formData.name,
                 rules: [{ required: true, message: '请输入节点code!' }] }]"
@@ -74,6 +77,7 @@
             <a-input
               :maxlength="20"
               placeholder="请输入节点值"
+              id="register-value"
               v-decorator="['formData.value', {
                 initialValue: formData.value,
                 rules: [{ required: true, message: '请输入节点值!' }] }]"
@@ -85,6 +89,7 @@
             <a-input
               type="number"
               :maxlength="20"
+              id="register-index"
               placeholder="请输入正确的序号"
               v-decorator="['formData.index', {
                 initialValue: formData.index,
@@ -96,6 +101,7 @@
           <a-form-item label="是否启用" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-radio-group
               name="radioGroup"
+              id="register-isEnable"
               v-decorator="[
                 'formData.isEnable',
                 {
@@ -116,14 +122,15 @@
               ]"
               style="min-height: 60px;"
               placeholder=""
+              id="register-desc"
               autosize />
           </a-form-item>
 
           <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
-            <a-button type="primary" @click="handleSubmit()">
+            <a-button type="primary" @click="handleSubmit()" id="register-handleSubmit">
               保存
             </a-button>
-            <a-button :style="{ marginLeft: '8px' }" @click="reset">
+            <a-button :style="{ marginLeft: '8px' }" @click="reset" id="register-reset">
               重置
             </a-button>
           </a-form-item>

+ 2 - 2
src/views/power/role/menuModal.vue

@@ -13,10 +13,10 @@
         />
       </a-form>
       <a-form-item :wrapper-col="{ offset: 15 }">
-        <a-button type="primary" @click="handleSubmit()">
+        <a-button type="primary" @click="handleSubmit()" id="menuModal-handleSubmit">
           保存
         </a-button>
-        <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
+        <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()" id="menuModal-handleCancel">
           取消
         </a-button>
       </a-form-item>

+ 8 - 8
src/views/power/role/roleList.vue

@@ -5,24 +5,24 @@
         <a-row :gutter="48">
           <a-col :md="6" :sm="24">
             <a-form-item label="角色名称">
-              <a-input allowClear v-model="queryParam.name" placeholder="请输入角色名称"/>
+              <a-input allowClear v-model.trim="queryParam.name" placeholder="请输入角色名称" id="roleList-name" @pressEnter="$refs.table.refresh(true)"/>
             </a-form-item>
           </a-col>
 
           <a-col :md="6" :sm="24">
             <a-form-item label="状态">
-              <v-select code="CHECK_ENABLE_STATE" v-model="queryParam.isEnable" allowClear placeholder="请选择状态" ></v-select>
+              <v-select code="CHECK_ENABLE_STATE" v-model="queryParam.isEnable" allowClear placeholder="请选择状态" id="roleList-isEnable"></v-select>
             </a-form-item>
           </a-col>
           <a-col :md="4" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+            <a-button type="primary" @click="$refs.table.refresh(true)" id="roleList-handSubmit">查询</a-button>
           </a-col>
         </a-row>
       </a-form>
     </div>
     <a-divider/>
     <div class="table-operator">
-      <a-button type="primary" icon="plus" @click="openModal">新建</a-button>
+      <a-button type="primary" icon="plus" @click="openModal" id="roleList-openModal">新建</a-button>
     </div>
 
     <s-table
@@ -34,14 +34,14 @@
       bordered
     >
       <span slot="status" slot-scope="text, record">
-        <a-switch checkedChildren="" unCheckedChildren="" v-model="record.isEnable" @change="changeFlagHandle(text, record)"/>
+        <a-switch checkedChildren="启用" unCheckedChildren="禁用" id="roleList-isEnable" v-model="record.isEnable" @change="changeFlagHandle(text, record)"/>
       </span>
 
       <span slot="action" slot-scope="text, record">
         <template>
-          <a class="action-button menu-text" @click="openMenuModal(record)">菜单权限</a>
-          <a class="action-button" @click="handleEdit(record)">修改</a>
-          <a v-if="!record.isEnable" class="action-button red-text" @click="delect(record)">删除</a>
+          <a class="action-button menu-text" @click="openMenuModal(record)" id="roleList-openMenuModal">菜单权限</a>
+          <a class="action-button" @click="handleEdit(record)" id="roleList-handleEdit">修改</a>
+          <a v-if="!record.isEnable" class="action-button red-text" @click="delect(record)" id="roleList-delect">删除</a>
         </template>
       </span>
     </s-table>

+ 5 - 2
src/views/power/role/roleModal.vue

@@ -6,6 +6,7 @@
         <a-form-item label="角色名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-input
             placeholder="请输入角色名称"
+            id="roleModal-name"
             v-decorator="['formData.name', {
               initialValue: formData.name,
               rules: [{ required: true, message: '请输入角色名称!' },{pattern:'^[^<|>]{1,20}$',message:'请输入不含<或>的字符,最多20个字符'}] }]"
@@ -16,6 +17,7 @@
         <a-form-item label="状态" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-radio-group
             name="radioGroup"
+            id="roleModal-isEnable"
             v-decorator="[
               'formData.isEnable',
               {
@@ -30,6 +32,7 @@
 
         <a-form-item label="角色描述" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-textarea
+            id="roleModal-remarks"
             v-decorator="[
               'formData.remarks',
               { initialValue: formData.remarks,
@@ -41,10 +44,10 @@
         </a-form-item>
 
         <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
-          <a-button type="primary" @click="handleSubmit()">
+          <a-button type="primary" @click="handleSubmit()" id="roleModal-handleSubmit">
             保存
           </a-button>
-          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
+          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()" id="roleModal-handleCancel">
             取消
           </a-button>
         </a-form-item>

+ 9 - 9
src/views/power/user/userList.vue

@@ -5,30 +5,30 @@
         <a-row :gutter="48">
           <a-col :md="6" :sm="24">
             <a-form-item label="用户名称">
-              <a-input allowClear v-model="queryParam.name" placeholder="请输入用户名称"/>
+              <a-input allowClear v-model.trim="queryParam.name" placeholder="请输入用户名称" id="userList-name" @pressEnter="$refs.table.refresh(true)"/>
             </a-form-item>
           </a-col>
 
           <a-col :md="6" :sm="24">
             <a-form-item label="手机号码">
-              <a-input allowClear v-model="queryParam.phone" placeholder="请输入手机号码"/>
+              <a-input allowClear v-model.trim="queryParam.phone" placeholder="请输入手机号码" id="userList-phone" @pressEnter="$refs.table.refresh(true)"/>
             </a-form-item>
           </a-col>
 
           <a-col :md="6" :sm="24">
             <a-form-item label="状态">
-              <v-select code="CHECK_ENABLE_STATE" v-model="queryParam.loginFlag" allowClear placeholder="请选择状态"></v-select>
+              <v-select code="CHECK_ENABLE_STATE" v-model="queryParam.loginFlag" allowClear placeholder="请选择状态" id="userList-check-enable-state"></v-select>
             </a-form-item>
           </a-col>
           <a-col :md="4" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+            <a-button type="primary" @click="$refs.table.refresh(true)" id="userList-handSubmit">查询</a-button>
           </a-col>
         </a-row>
       </a-form>
     </div>
     <a-divider/>
     <div class="table-operator">
-      <a-button type="primary" icon="plus" @click="openModal">新建</a-button>
+      <a-button type="primary" icon="plus" @click="openModal" id="userList-openModal">新建</a-button>
     </div>
 
     <s-table
@@ -40,7 +40,7 @@
       bordered
     >
       <span slot="status" slot-scope="text, record">
-        <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.loginFlag" @change="changeFlagHandle(text, record)"/>
+        <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.loginFlag" @change="changeFlagHandle(text, record)" id="userList-changeFlagHandle"/>
       </span>
       <div slot="roleNames" slot-scope="text, record" :title="record.roleNames">
         <span v-if="record.roleNames">{{ record.roleNames.substr(0,12) + '...' }}</span>
@@ -49,9 +49,9 @@
       <span slot="action" slot-scope="text, record">
         <template>
           <div >
-            <a class="action-button" @click="handleEdit(record)">修改</a>
-            <a v-if="record.loginFlag" class="action-button reset-text" @click="resetPassword(record)">重置密码</a>
-            <a v-if="!record.loginFlag" class="action-button red-text" @click="delect(record)">删除</a>
+            <a class="action-button" @click="handleEdit(record)" id="userList-handleEdit">修改</a>
+            <a v-if="record.loginFlag" class="action-button reset-text" @click="resetPassword(record)" id="userList-resetPassword">重置密码</a>
+            <a v-if="!record.loginFlag" class="action-button red-text" @click="delect(record)" id="userList-delect">删除</a>
           </div>
         </template>
       </span>

+ 8 - 2
src/views/power/user/userModal.vue

@@ -8,6 +8,7 @@
             <a-form-item label="用户名称" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
               <a-input
                 placeholder="请输入用户名称"
+                id="userModal-name"
                 v-decorator="['formData.name', {
                   initialValue: formData.name,
                   rules: [{ required: true, message: '请输入用户名称!' },{pattern:'^[^<|>]{1,20}$',message:'请输入不含<或>的字符,最多20个字符'}] }]"
@@ -19,6 +20,7 @@
             <a-form-item label="手机号码" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
               <a-input
                 placeholder="请输入手机号码"
+                id="userModal-phone"
                 v-decorator="['formData.phone', {
                   initialValue: formData.phone,
                   rules: [{ required: true, message: '请输入手机号码!' },{pattern:/^[1][0-9]{10}$/, message: '请输入正确的手机号码!'}] }]"
@@ -33,6 +35,7 @@
             <a-form-item label="性别" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
               <v-select
                 code="SEX"
+                id="userModal-sex"
                 v-decorator="[
                   'formData.sex',
                   {
@@ -48,6 +51,7 @@
             <a-form-item label="状态" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
               <a-radio-group
                 name="radioGroup"
+                id="userModal-loginFlag"
                 v-decorator="[
                   'formData.loginFlag',
                   {
@@ -66,6 +70,7 @@
           <a-col :span="24">
             <a-form-item label="角色" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
               <a-select
+                id="userModal-roleNames"
                 v-decorator="[
                   'formData.roleNames',
                   {
@@ -91,6 +96,7 @@
           <a-col :span="24">
             <a-form-item label="备注" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
               <a-textarea
+                id="userModal-remarks"
                 v-decorator="[
                   'formData.remarks',
                   {
@@ -105,10 +111,10 @@
         </a-row>
 
         <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
-          <a-button type="primary" @click="handleSubmit()">
+          <a-button type="primary" @click="handleSubmit()" id="userModal-handleSubmit">
             保存
           </a-button>
-          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
+          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()" id="userModal-handleCancel">
             取消
           </a-button>
         </a-form-item>