xuzuoyun 5 år sedan
förälder
incheckning
06ccc9527c

+ 0 - 1
src/main.js

@@ -62,7 +62,6 @@ Vue.use(preview)
 Vue.use(vueBus);
 Vue.use(JeecgComponents);
 Vue.use(VuePreview);
-
 new Vue({
   router,
   store,

+ 1 - 1
src/mixins/JeecgListMixin.js

@@ -27,7 +27,7 @@ export const JeecgListMixin = {
           return range[0] + "-" + range[1] + " 共" + total + "条"
         },
         showQuickJumper: true,
-        showSizeChanger: true,
+        // showSizeChanger: true,
         total: 0
       },
       /* 排序参数 */

+ 0 - 9
src/views/modules/Statistics/Statistics.vue

@@ -37,19 +37,10 @@
 </style>
 <template>
   <div class="statistics">
-    <a-row class="image-list-heading vm-panel">
-      <a-row>
-        <div class="panel-heading">{{ title }}</div>
-      </a-row>
-    </a-row>
     <a-row>
       <a-col :span="24">
         <a-card :bordered="false" class="search-box">
           <time-check @getAdd="getAdd" :startValue.sync="startValue"></time-check>
-        </a-card>
-      </a-col>
-      <a-col :span="24">
-        <a-card :bordered="false" class="search-box">
           <p @click="visible = true">对比</p>
         </a-card>
       </a-col>

+ 21 - 13
src/views/modules/Statistics/accountMaterStatistics.vue

@@ -98,9 +98,11 @@ th div {
             :dataSource="data"
             bordered
             id="outTable"
-            :pagination="pagination"
+            :pagination="ipagination"
+            size="middle"
             :customRow="rowClick"
             :loading="loading"
+            :scroll="{ x: true }"
           >
             <div slot="url" slot-scope="url">
               <video class="video" :src="url" controls="controls" style="height:200px;width:112.5px">
@@ -133,6 +135,8 @@ import timeCheck from './components/timeCheck'
 import ratioModal from './components/ratioModal'
 import { mapGetters } from 'vuex'
 
+import { JeecgListMixin } from '@/mixins/ipagination'
+
 // import the component
 import Treeselect from './components/Treeselect.vue'
 
@@ -157,7 +161,9 @@ const columns = [
     dataIndex: 'url',
     key: 'url',
     align: 'center',
-    scopedSlots: { customRender: 'url' }
+    scopedSlots: { customRender: 'url' },
+    fixed: 'left',
+    width: 150
   },
   {
     title: '花费',
@@ -349,10 +355,11 @@ export default {
     ratioModal,
     Treeselect
   },
-
+  mixins: [JeecgListMixin],
   data: function() {
     return {
       title: '账户素材报表',
+
       show: true,
       timeList: [
         { label: '今天', value: 1, show: true },
@@ -372,16 +379,16 @@ export default {
       startValue: [],
       allValue: [],
       loading: false,
-      pagination: {
-        // 分页配置器
-        pageSize: 10, // 一页的数据限制
-        current: 1, // 当前页
-        onChange: current => {
-          // 切换分页时的回调,
-          // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
-          this.pagination.current = current
-        }
-      },
+      //   pagination: {
+      //     // 分页配置器
+      //     pageSize: 10, // 一页的数据限制
+      //     current: 1, // 当前页
+      //     onChange: current => {
+      //       // 切换分页时的回调,
+      //       // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+      //       this.pagination.current = current
+      //     }
+      //   },
       rowClick: record => ({
         // 事件
         on: {
@@ -505,6 +512,7 @@ export default {
       }
       getMaterialReportByAccount(params).then(res => {
         this.data = res
+        this.ipagination.total = res.length
         this.loading = false
       })
     },

+ 22 - 26
src/views/modules/Statistics/components/Treeselect.vue

@@ -54,33 +54,31 @@ export default {
     ]
   }),
   components: { Treeselect },
+  watch: {
+    $route(n, o) {
+      console.log(n, o)
+    }
+  },
   methods: {
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
     update(node, id) {
       console.log(node, id)
-      if (node.children == null) {
-        getAction('/ctop/userAllocation/getAccountListByProjectId', { projectId: node.id }).then(res => {
-          console.log(res)
-          if (res.code == 0) {
-            if (res.result.length > 0) {
-              node.children = res.result.map(item => {
-                return {
-                  id: item.accountId,
-                  label: item.authName + '         ' + item.userName
-                }
-              })
-              this.value = res.result.map(item => {
-                return item.accountId
-              })
-            } else {
-              this.$message.error('该项目下无账号')
-              this.value = []
-            }
+      getAction('/ctop/userAllocation/getAccountListByProjectId', { projectId: node.id }).then(res => {
+        console.log(res)
+        if (res.code == 0) {
+          if (res.result.length > 0) {
+            node.children = res.result.map(item => {
+              return {
+                id: item.accountId,
+                label: item.userName + '         ' + item.authName
+              }
+            })
           } else {
-            new Error('Failed to load options: network error.')
           }
-        })
-      }
+        } else {
+          new Error('Failed to load options: network error.')
+        }
+      })
     },
     emitValue() {
       this.$emit('update:appId', this.value)
@@ -99,7 +97,7 @@ export default {
               parentNode.children = res.result.map(item => {
                 return {
                   id: item.accountId,
-                  label: item.authName + '         ' + item.userName
+                  label: item.userName + '         ' + item.authName
                 }
               })
               callback()
@@ -129,10 +127,8 @@ export default {
       })
     }
   },
-  mounted() {
-    this.$nextTick(() => {
-      this.getParticipateList()
-    })
+  activated() {
+    this.getParticipateList()
   }
 }
 </script>

+ 1 - 1
src/views/modules/Statistics/components/lifting.vue

@@ -64,7 +64,7 @@
         :startVal="0"
         :endVal="kuaishou[typeName]"
         :duration="duration"
-        :decimals="2"
+        :decimals="typeName=='cost'||typeName=='discountCost'?2:0"
         style="overflow:auto"
       ></countTo>
       <a-icon

+ 30 - 25
src/views/modules/Statistics/components/ratioModal.vue

@@ -1,17 +1,19 @@
-
+<style>
+th div {
+  white-space: nowrap;
+}
+</style>
 <template>
   <div class="data-display-statistics">
     <a-modal title="环比展示" v-model="visible" @ok="handleOk" width="90%">
       <div v-if="url">
-        <video
-          class="video"
-          :src="url"
-          controls="controls"
-          style="height:200px;"
-          v-show="showVideo"
-        >您的浏览器不支持 video 标签。</video>
+        <video class="video" :src="url" controls="controls" style="height:200px;" v-show="showVideo">
+          您的浏览器不支持 video 标签。
+        </video>
       </div>
-      <a-button type="primary" @click="showVideo = !showVideo">{{!showVideo?"点击查看视频":"点击收起视频"}}</a-button>
+      <a-button type="primary" @click="showVideo = !showVideo">{{
+        !showVideo ? '点击查看视频' : '点击收起视频'
+      }}</a-button>
       <a-card style="width:100%;">
         <a-table
           :columns="columnsDetail"
@@ -20,24 +22,25 @@
           id="outTable"
           :pagination="false"
           :loading="loading"
+          :scroll="{ x: true }"
         >
-          <span slot="photoClickRatio" slot-scope="photoClickRatio">{{photoClickRatio|getBo}}</span>
-          <span slot="actionRatio" slot-scope="actionRatio">{{actionRatio|getBo}}</span>
-          <span slot="impression1kCost" slot-scope="impression1kCost,record">
-            <span v-if="record.statDate=='环比'">{{impression1kCost|getBo}}</span>
-            <span v-else>{{impression1kCost|toFixtwo}}</span>
+          <span slot="photoClickRatio" slot-scope="photoClickRatio">{{ photoClickRatio | getBo }}</span>
+          <span slot="actionRatio" slot-scope="actionRatio">{{ actionRatio | getBo }}</span>
+          <span slot="impression1kCost" slot-scope="impression1kCost, record">
+            <span v-if="record.statDate == '环比'">{{ impression1kCost | getBo }}</span>
+            <span v-else>{{ impression1kCost | toFixtwo }}</span>
           </span>
-          <span slot="photoClickCost" slot-scope="photoClickCost,record">
-            <span v-if="record.statDate=='环比'">{{photoClickCost|getBo}}</span>
-            <span v-else>{{photoClickCost|toFixtwo}}</span>
+          <span slot="photoClickCost" slot-scope="photoClickCost, record">
+            <span v-if="record.statDate == '环比'">{{ photoClickCost | getBo }}</span>
+            <span v-else>{{ photoClickCost | toFixtwo }}</span>
           </span>
-          <span slot="actionCost" slot-scope="actionCost,record">
-            <span v-if="record.statDate=='环比'">{{actionCost|getBo}}</span>
-            <span v-else>{{actionCost|toFixtwo}}</span>
+          <span slot="actionCost" slot-scope="actionCost, record">
+            <span v-if="record.statDate == '环比'">{{ actionCost | getBo }}</span>
+            <span v-else>{{ actionCost | toFixtwo }}</span>
           </span>
-          <span slot="conversionPrice" slot-scope="conversionPrice,record">
-            <span v-if="record.statDate=='环比'">{{conversionPrice|getBo}}</span>
-            <span v-else>{{conversionPrice|toFixtwo}}</span>
+          <span slot="conversionPrice" slot-scope="conversionPrice, record">
+            <span v-if="record.statDate == '环比'">{{ conversionPrice | getBo }}</span>
+            <span v-else>{{ conversionPrice | toFixtwo }}</span>
           </span>
         </a-table>
       </a-card>
@@ -60,7 +63,9 @@ const columnsDetail = [
     title: '日期',
     dataIndex: 'statDate',
     key: 'statDate',
-    align: 'center'
+    align: 'center',
+    fixed: 'left',
+    width: 130
   },
   {
     title: '花费',
@@ -156,7 +161,7 @@ export default {
       dataDetail: [],
       url: '',
       visible: false,
-      loading:true
+      loading: true
     }
   },
   filters: {

+ 3 - 11
src/views/modules/Statistics/dataDisplayStatistics.vue

@@ -141,7 +141,7 @@ th div {
           typeThan="discountCostProportion"
         ></lifting>
       </a-col>
-      <a-col  :sm="24" :md="12" :xl="12" :xxl="5">
+      <a-col :sm="24" :md="12" :xl="12" :xxl="5">
         <lifting
           :kuaishou.sync="kuaishou"
           :active.sync="active"
@@ -150,7 +150,7 @@ th div {
           typeThan="photoClickProportion"
         ></lifting>
       </a-col>
-      <a-col  :sm="24" :md="12" :xl="12" :xxl="5">
+      <a-col :sm="24" :md="12" :xl="12" :xxl="5">
         <lifting
           :kuaishou.sync="kuaishou"
           :active.sync="active"
@@ -1088,15 +1088,7 @@ export default {
   watch: {},
   distoryed() {},
   mounted: function() {
-    this.$nextTick(() => {
-      getAdvertiserList().then(res => {
-        console.log(res)
-        if (res.code == 0) {
-          this.list = res.result
-          this.options = res.result
-        }
-      })
-    })
+    this.$nextTick(() => {})
   }
 }
 </script>

+ 7 - 13
src/views/modules/Statistics/materialStatistics.vue

@@ -89,7 +89,8 @@
             :dataSource="data"
             bordered
             id="outTable"
-            :pagination="pagination"
+            :pagination="ipagination"
+            size="middle"
             :customRow="rowClick"
             :loading="loading"
             :scroll="{ x: 1900 }"
@@ -126,6 +127,8 @@ import { stopOtherVideo, closeAllVideoFun } from '@/utils/videoControl' // 停
 import timeCheck from './components/timeCheck'
 import ratioModal from './components/ratioModal'
 
+import { JeecgListMixin } from '@/mixins/ipagination'
+
 var length = 0
 var active = 1
 const columns = [
@@ -323,7 +326,7 @@ export default {
     timeCheck,
     ratioModal
   },
-
+  mixins: [JeecgListMixin],
   data: function() {
     return {
       title: '素材大盘报表',
@@ -349,16 +352,6 @@ export default {
       dataYestodayDetail: [],
       dataChainRatio: [],
       loading: false,
-      pagination: {
-        // 分页配置器
-        pageSize: 10, // 一页的数据限制
-        current: 1, // 当前页
-        onChange: current => {
-          // 切换分页时的回调,
-          // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
-          this.pagination.current = current
-        }
-      },
       rowClick: record => ({
         // 事件
         on: {
@@ -425,7 +418,7 @@ export default {
       }
       this.active = checked
       active = checked
-      this.pagination.current = 1
+      this.ipagination.current = 1
       this.getList()
     },
     getList() {
@@ -447,6 +440,7 @@ export default {
             }
           })
           this.loading = false
+          this.ipagination.total = res.length
         } else {
           this.loading = false
         }

+ 15 - 24
src/views/modules/advertiser/AdvertiserList.vue

@@ -27,7 +27,7 @@
           <a-col :md="6" :sm="8">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
-              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a-button type="primary" @click="searchRe" icon="reload" style="margin-left: 8px">重置</a-button>
             </span>
           </a-col>
 
@@ -79,7 +79,9 @@
           <a @click="handleEdit(record)">编辑</a>
 
           <a-divider type="vertical"/>
-          <a @click="handleDelete(record)">删除</a>
+         <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
         </span>
 
       </a-table>
@@ -287,27 +289,23 @@
         return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
       }
     },
+    created(){
+        this.queryParam.userId = this.userInfo().id
+    },
     methods: {
       ...mapGetters(["nickname", "avatar", "userInfo"]),
-
-
-
+      searchRe() {
+        this.queryParam.name = ''
+        this.queryParam.industryId = ''
+        this.loadData()
+      },
       handleSubmit() {
-        /*postAction(this.url.getLoginInfo).then((res) => {
-          if (res.success) {
-            alert("绑定成功");
-            this.accountName = '';
-            this.password = '';
-            this.loginType = '';
-          } else {
-            alert("绑定失败");
-          }
-        });*/
+
         let params = {};
         params.advertiserId = this.record.id;
         params.advertiser_name = this.record.name;
         params.userId = this.userInfo().id;
-        params.userName = this.userInfo().username
+        params.userName = this.userInfo().realname
         params.projectId = this.record.projectId
         params.projectName = this.record.projectName
 
@@ -378,14 +376,7 @@
       },
     },
 
-    handleOk(e) {
-      console.log(e);
-      this.visible = false
-    },
-    handleCancel(e) {
-      console.log(e);
-      this.visible = false
-    }
+
 
 
   }

+ 5 - 10
src/views/modules/advertiser/ProjectList.vue

@@ -72,16 +72,11 @@
           <a @click="handleEdit(record)">编辑</a>
 
           <a-divider type="vertical" />
-          <a-dropdown>
-            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                  <a>删除</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
-          </a-dropdown>
+         
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
+
         </span>
 
       </a-table>

+ 99 - 7
src/views/modules/advertiser/ProjectMemberList.vue

@@ -57,7 +57,7 @@
     <a-modal title="查看项目成员" v-model="visible" @ok="handleOk" width="800px">
       <div style="display:flex;line-height:50px;flex-wrap: wrap;">
         <div style="width:25%;text-align:center;" v-for="(item, index) of memberList" :key="index">
-          <a-tag color="#2db7f5"
+          <a-tag color="#2db7f5" @close="log(item.id)" closable
             >{{ item.userName }}
             <a-divider type="vertical" />
             {{ item.roleCode | roleCode }}</a-tag
@@ -68,7 +68,29 @@
 
     <!--  添加项目成员 -->
     <a-modal title="添加项目成员" v-model="visibleAdd" @ok="handleOkAdd">
-      <j-select-user-by-dep multiple v-model="user" @change="add"></j-select-user-by-dep>
+      <!-- /sys/user/getAllUserList -->
+      <a-select
+        v-model="appId"
+        showSearch
+        allowClear
+        mode="multiple"
+        placeholder="请选择成员"
+        optionFilterProp="children"
+        style="width: 100%"
+        @focus="handleFocus"
+        @blur="handleBlur"
+        @change="handleChange"
+        :filterOption="true"
+        @search="search"
+        :maxTagCount="1"
+      >
+        <a-select-option
+          v-for="appModel in options"
+          :key="appModel.userId + new Date().getTime()"
+          :value="appModel.userId"
+          >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option
+        >
+      </a-select>
     </a-modal>
 
     <!-- 账号绑定 -->
@@ -125,7 +147,7 @@
 
 <script>
 import ProjectMemberModal from './modules/ProjectMemberModal'
-import { httpAction, getAction } from '@/api/manage'
+import { httpAction, getAction, deleteAction } from '@/api/manage'
 
 import { mapGetters } from 'vuex'
 
@@ -154,6 +176,7 @@ export default {
         projectId: '',
         userId: ''
       },
+      projectId: '',
       user: '',
       tabListNoTitle: [
         {
@@ -200,7 +223,10 @@ export default {
       itemJson: null,
       visibleBind: false,
       bindAccountLoginUrl: '/ctop/bindAccountLogin/login',
-      bindAuthorizationUrl: '/ctop/bindAccountAuth/authorization'
+      bindAuthorizationUrl: '/ctop/bindAccountAuth/authorization',
+      appId: [],
+      list: [],
+      options: []
     }
   },
   computed: {
@@ -238,6 +264,14 @@ export default {
       }
       this.member = jsonArr
     },
+    log(id) {
+      deleteAction('/ctop/projectMember/delete', { id: id }).then(res => {
+        console.log(res)
+        if (res.success) {
+          this.getMemberList(this.projectId)
+        }
+      })
+    },
     onTabChange(key, type) {
       console.log(key, type)
       this[type] = key
@@ -344,25 +378,34 @@ export default {
     },
     handleOkAdd(e) {
       console.log(e)
+
       var params = {}
       params.projectId = this.itemJson.id
       params.projectName = this.itemJson.projectName
-      params.memberArr = this.member
+      params.memberArr = this.appId
 
       httpAction('/ctop/projectMember/batchAdd', params, 'post').then(res => {
         console.log(res)
         this.visibleAdd = false
-        this.user = ''
+        this.appId = []
       })
     },
     addParams(item) {
       this.visibleAdd = true
       this.itemJson = item
       console.log(this.itemJson)
+      getAction('/sys/user/getAllUserList', '').then(res => {
+        console.log(res)
+        if (res.success) {
+          this.list = res.result
+          this.options = res.result
+        }
+      })
     },
     handleAdd() {},
     handleEdit(item) {
       if (this.noTitleKey == 'myProject') {
+        this.projectId = item.id
         this.getMemberList(item.id)
       } else {
         console.log(item)
@@ -380,7 +423,7 @@ export default {
       params.advertiserId = this.record.advertiserId
       params.advertiser_name = this.record.advertiserName
       params.userId = this.userInfo().id
-      params.userName = this.userInfo().username
+      params.userName = this.userInfo().realname
       params.projectId = this.record.projectId
       params.projectName = this.record.projectName
 
@@ -436,6 +479,55 @@ export default {
       this.dataSource = this.dataElse.filter(item => {
         return item.projectName.toLowerCase().indexOf(this.keyWord.toLowerCase()) > -1
       })
+    },
+    handleChange(value, options) {
+      console.log(value, options)
+      //   this.appId = value
+    },
+    getElseData(value) {
+      this.getStatistics()
+    },
+    handleBlur() {
+      console.log('blur')
+    },
+    handleFocus() {
+      console.log('focus')
+      if (this.appId.length > 0) {
+        this.options = []
+        for (let i = 0; i < this.list.length; i++) {
+          for (let j = 0; j < this.appId.length; j++) {
+            if (this.list[i].userId == this.appId[j]) {
+              this.options.push(this.list[i])
+            }
+          }
+        }
+      } else {
+        this.options = this.list
+      }
+    },
+    search(value) {
+      this.options = []
+      if (value != '') {
+        this.options = this.list.filter(item => {
+          var data = item.realName + ' ' + item.roleName
+          return data.toLowerCase().indexOf(value.toLowerCase()) > -1
+        })
+        this.options = [...this.options]
+        console.log(this.options)
+      } else {
+        if (this.appId.length > 0) {
+          this.options = []
+          for (let i = 0; i < this.list.length; i++) {
+            for (let j = 0; j < this.appId.length; j++) {
+              if (this.list[i].userId == this.appId[j]) {
+                this.options.push(this.list[i])
+              }
+            }
+          }
+        } else {
+          this.options = this.list
+        }
+      }
     }
   },
   mounted() {

+ 39 - 7
src/views/modules/advertiser/modules/ProjectModal.vue

@@ -27,10 +27,23 @@
           </a-select>
         </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="负责人">
-          <j-select-user-by-dep
-            v-decorator="['responsibleName', validatorRules.responsibleName]"
-            @change="get"
-          ></j-select-user-by-dep>
+          <a-select
+            showSearch
+            optionFilterProp="children"
+            style="width: 100%"
+            @focus="handleFocus"
+            @blur="handleBlur"
+            @change="handleChange"
+            :filterOption="filterOption"
+            v-model="resId"
+          >
+            <a-select-option
+              v-for="appModel in options"
+              :key="appModel.userId + new Date().getTime()"
+              :value="appModel.userId"
+              >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option
+            >
+          </a-select>
         </a-form-item>
       </a-form>
     </a-spin>
@@ -78,7 +91,8 @@ export default {
         getList: '/ctop/advertiser/list'
       },
       list: [],
-      resId: ''
+      resId: '',
+      options: []
     }
   },
   created() {},
@@ -88,6 +102,18 @@ export default {
       console.log(`checked = ${e.target.value}`)
     },
     handleChange() {},
+    handleChange(value) {
+      console.log(`selected ${value}`)
+    },
+    handleBlur() {
+      console.log('blur')
+    },
+    handleFocus() {
+      console.log('focus')
+    },
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
     getList() {
       var params = {}
       params.userId = this.userInfo().id
@@ -104,7 +130,6 @@ export default {
     },
     add() {
       this.edit({
-        responsibleName: this.userInfo().realname, //用户名称
         responsibleId: this.userInfo().id, //用户Id
         mediaId: '2'
       })
@@ -120,6 +145,13 @@ export default {
       this.visible = true
       this.$nextTick(() => {
         this.form.setFieldsValue(pick(this.model, 'projectName', 'advertiserId', 'responsibleName'))
+        this.resId = record.responsibleId
+        getAction('/sys/user/getAllUserList', '').then(res => {
+          console.log(res)
+          if (res.success) {
+            this.options = res.result
+          }
+        })
         //时间格式化
       })
     },
@@ -147,7 +179,7 @@ export default {
           //时间格式化
           formData.advertiserId = data.key
           formData.advertiserName = data.label
-          formData.responsibleId = that.resId == '' ? that.userInfo().id : that.resId
+          formData.responsibleId = that.resId
           formData.userId = that.userInfo().id
           httpAction(httpurl, formData, method)
             .then(res => {

+ 82 - 133
src/views/modules/appium/AppiumDeviceList.vue

@@ -1,81 +1,51 @@
 <template>
   <a-card :bordered="false">
+
     <!-- 查询区域 -->
     <div class="table-page-search-wrapper">
       <a-form layout="inline">
         <a-row :gutter="24">
+
           <a-col :md="6" :sm="8">
-            <a-form-item label="IP">
+            <a-form-item label="设备IP">
               <a-input placeholder="请输入IP" v-model="queryParam.ip"></a-input>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8">
-            <a-form-item label="端口号">
+            <a-form-item label="设备端口号">
               <a-input placeholder="请输入端口号" v-model="queryParam.port"></a-input>
             </a-form-item>
           </a-col>
-          <template>
-            <a-col :md="6" :sm="8">
-              <a-form-item label="状态">
-                <!-- <a-input placeholder="请输入状态" v-model="queryParam.status"></a-input> -->
-                <a-select v-model="queryParam.status" allowClear>
-                  <a-select-option value="1">可用</a-select-option>
-                  <a-select-option value="2">任务中</a-select-option>
-                  <a-select-option value="3">不可用</a-select-option>
-                </a-select>
-              </a-form-item>
-            </a-col>
+        <template>
+        <a-col :md="6" :sm="8">
+            <a-form-item label="状态">
+              <!--<a-input placeholder="请输入状态 1可用 2 任务中 3 不可用" v-model="queryParam.status"></a-input>-->
+              <a-select v-model="queryParam.status" allowClear>
+                <a-select-option value="1">可用</a-select-option>
+                <a-select-option value="2">任务中</a-select-option>
+                <a-select-option value="3">不可用</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
           </template>
-          <a-col :md="6" :sm="8">
+          <a-col :md="6" :sm="8" >
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
-              <a-button
-                type="primary"
-                @click="searchReset"
-                icon="reload"
-                style="margin-left: 8px"
-              >重置</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
             </span>
           </a-col>
+
         </a-row>
       </a-form>
     </div>
 
     <!-- 操作按钮区域 -->
-    <!-- <div class="table-operator">
+    <div class="table-operator">
       <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
-      <a-button type="primary" icon="download" @click="handleExportXls('手机设备表')">导出</a-button>
-      <a-upload
-        name="file"
-        :showUploadList="false"
-        :multiple="false"
-        :headers="tokenHeader"
-        :action="importExcelUrl"
-        @change="handleImportExcel"
-      >
-        <a-button type="primary" icon="import">导入</a-button>
-      </a-upload>
-      <a-dropdown v-if="selectedRowKeys.length > 0">
-        <a-menu slot="overlay">
-          <a-menu-item key="1" @click="batchDel">
-            <a-icon type="delete" />删除
-          </a-menu-item>
-        </a-menu>
-        <a-button style="margin-left: 8px">
-          批量操作
-          <a-icon type="down" />
-        </a-button>
-      </a-dropdown>
-    </div> -->
+    </div>
 
     <!-- table区域-begin -->
     <div>
-      <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择
-        <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
-        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
-      </div> -->
-
       <a-table
         ref="table"
         size="middle"
@@ -85,28 +55,17 @@
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
-        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-        @change="handleTableChange"
-      >
-        <span slot="status" slot-scope="status">{{status|showStatus}}</span>
+        @change="handleTableChange">
+        <span slot="status" slot-scope="status">{{status|showStatus}}</span>
         <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">编辑</a>
 
           <a-divider type="vertical" />
-          <a-dropdown>
-            <a class="ant-dropdown-link">
-              更多
-              <a-icon type="down" />
-            </a>
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                  <a>删除</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
-          </a-dropdown>
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
         </span>
+
       </a-table>
     </div>
     <!-- table区域-end -->
@@ -117,80 +76,70 @@
 </template>
 
 <script>
-import AppiumDeviceModal from './modules/AppiumDeviceModal'
-import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import AppiumDeviceModal from './modules/AppiumDeviceModal'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 
-export default {
-  name: 'AppiumDeviceList',
-  mixins: [JeecgListMixin],
-  components: {
-    AppiumDeviceModal
-  },
-  data() {
-    return {
-      description: '手机设备表管理页面',
-      // 表头
-      columns: [
-        {
-          title: '#',
-          dataIndex: '',
-          key: 'rowIndex',
-          width: 60,
-          align: 'center',
-          customRender: function(t, r, index) {
-            return parseInt(index) + 1
+  export default {
+    name: "AppiumDeviceList",
+    mixins:[JeecgListMixin],
+    components: {
+      AppiumDeviceModal
+    },
+    data () {
+      return {
+        description: '设备信息管理页面',
+        // 表头
+        columns: [
+		   {
+            title: '设备IP',
+            align:"center",
+            dataIndex: 'ip'
+           },
+		   {
+            title: '设备端口号',
+            align:"center",
+            dataIndex: 'port'
+           },
+		   {
+            title: '设备状态',
+            align:"center",
+            dataIndex: 'status',
+            scopedSlots: { customRender: 'status'}
+           },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            scopedSlots: { customRender: 'action' },
           }
-        },
-        {
-          title: 'IP',
-          align: 'center',
-          dataIndex: 'ip'
-        },
-        {
-          title: '端口号',
-          align: 'center',
-          dataIndex: 'port'
-        },
-        {
-          title: '状态',
-          align: 'center',
-          dataIndex: 'status',
-          scopedSlots: { customRender: 'status' }
-        },
-        {
-          title: '操作',
-          dataIndex: 'action',
-          align: 'center',
-          scopedSlots: { customRender: 'action' }
-        }
-      ],
-      url: {
-        list: '/appium/appiumDevice/list',
-        delete: '/appium/appiumDevice/delete',
-        deleteBatch: '/appium/appiumDevice/deleteBatch',
-        exportXlsUrl: 'appium/appiumDevice/exportXls',
-        importExcelUrl: 'appium/appiumDevice/importExcel'
-      }
+        ],
+		url: {
+          list: "/appium/appiumDevice/list",
+          delete: "/appium/appiumDevice/delete",
+          deleteBatch: "/appium/appiumDevice/deleteBatch"
+       },
     }
   },
   computed: {
-    importExcelUrl: function() {
-      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+    importExcelUrl: function(){
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
     }
   },
-  filters: {
-    showStatus: function(value) {
-      var status = {
-        1: '可用',
-        2: '任务中',
-        3: '不可用'
+    methods: {
+
+    },
+    filters: {
+      showStatus: function(value) {
+        var status = {
+          '3': '不可用',
+          '1': '可用',
+          '2': '任务执行中',
+        }
+        return status[value]
       }
-      return status[value]
-    }
-  },
-  methods: {}
-}
+    },
+  }
 </script>
 <style scoped>
-@import '~@assets/less/common.less';
+  @import '~@assets/less/common.less'
 </style>

+ 21 - 116
src/views/modules/appium/AppiumTaskItemList.vue

@@ -7,37 +7,31 @@
         <a-row :gutter="24">
 
           <a-col :md="6" :sm="8">
-            <a-form-item label="任务ID">
+            <a-form-item label="任务ID">
               <a-input placeholder="请输入任务ID" v-model="queryParam.taskId"></a-input>
             </a-form-item>
           </a-col>
-          <a-col :md="6" :sm="8">
-            <a-form-item label="父ID">
-              <a-input placeholder="请输入父ID" v-model="queryParam.parentId"></a-input>
-            </a-form-item>
-          </a-col>
-        <template v-if="toggleSearchStatus">
+
         <a-col :md="6" :sm="8">
-            <a-form-item label="顺序">
-              <a-input placeholder="请输入顺序" v-model="queryParam.seq"></a-input>
+            <a-form-item label="名称">
+              <a-input placeholder="请输入名称" v-model="queryParam.name"></a-input>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8">
             <a-form-item label="查找类型">
-              <a-input placeholder="请输入查找类型" v-model="queryParam.findType"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="8">
-            <a-form-item label="查找关键字">
-              <a-input placeholder="请输入查找关键字" v-model="queryParam.findKey"></a-input>
+              <!--<a-input placeholder="请输入查找类型" v-model="queryParam.findType"></a-input>-->
+              <a-select v-model="queryParam.findType" allowClear>
+                <a-select-option value="id">id</a-select-option>
+                <a-select-option value="xpath">xpath</a-select-option>
+                <a-select-option value="class">class</a-select-option>
+                <a-select-option value="loop">loop</a-select-option>
+              </a-select>
             </a-form-item>
           </a-col>
-          </template>
           <a-col :md="6" :sm="8" >
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
               <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
-
             </span>
           </a-col>
 
@@ -46,27 +40,12 @@
     </div>
 
     <!-- 操作按钮区域 -->
-    <!-- <div class="table-operator">
+    <div class="table-operator">
       <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
-      <a-button type="primary" icon="download" @click="handleExportXls('任务内容表')">导出</a-button>
-      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
-        <a-button type="primary" icon="import">导入</a-button>
-      </a-upload>
-      <a-dropdown v-if="selectedRowKeys.length > 0">
-        <a-menu slot="overlay">
-          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
-        </a-menu>
-        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
-      </a-dropdown>
-    </div> -->
+    </div>
 
     <!-- table区域-begin -->
     <div>
-      <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
-        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
-      </div> -->
-
       <a-table
         ref="table"
         size="middle"
@@ -76,23 +55,14 @@
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
-        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
         @change="handleTableChange">
-
         <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">编辑</a>
 
           <a-divider type="vertical" />
-          <a-dropdown>
-            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                  <a>删除</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
-          </a-dropdown>
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
         </span>
 
       </a-table>
@@ -116,30 +86,15 @@
     },
     data () {
       return {
-        description: '任务内容表管理页面',
+        description: '任务子项信息管理页面',
         // 表头
         columns: [
-          {
-            title: '#',
-            dataIndex: '',
-            key:'rowIndex',
-            width:60,
-            align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
-            }
-           },
 		   {
-            title: '任务ID',
+            title: '子任务ID',
             align:"center",
             dataIndex: 'taskId'
            },
 		   {
-            title: '父ID',
-            align:"center",
-            dataIndex: 'parentId'
-           },
-           {
             title: '名称',
             align:"center",
             dataIndex: 'name'
@@ -160,59 +115,9 @@
             dataIndex: 'findKey'
            },
 		   {
-            title: '点击类型',
-            align:"center",
-            dataIndex: 'clickType'
-           },
-		   {
-            title: '偏移量X',
-            align:"center",
-            dataIndex: 'offsiteX'
-           },
-		   {
-            title: '偏移量Y',
+            title: '应用包名',
             align:"center",
-            dataIndex: 'offsiteY'
-           },
-		   {
-            title: '循环间隔',
-            align:"center",
-            dataIndex: 'loopRate'
-           },
-		   {
-            title: '循环类型',
-            align:"center",
-            dataIndex: 'loopType'
-           },
-		   {
-            title: '是否必经执行',
-            align:"center",
-            dataIndex: 'isMust'
-           },
-		   {
-            title: '文本查找类型',
-            align:"center",
-            dataIndex: 'textEqualType'
-           },
-		   {
-            title: '文本查找关键字',
-            align:"center",
-            dataIndex: 'textEqualKey'
-           },
-		   {
-            title: '滑动类型',
-            align:"center",
-            dataIndex: 'swapType'
-           },
-		   {
-            title: '延迟时长',
-            align:"center",
-            dataIndex: 'waitTime'
-           },
-		   {
-            title: '是否执行完关闭',
-            align:"center",
-            dataIndex: 'isClose'
+            dataIndex: 'appPackage'
            },
           {
             title: '操作',
@@ -236,7 +141,7 @@
     }
   },
     methods: {
-     
+
     }
   }
 </script>

+ 1 - 133
src/views/modules/appium/AppiumTaskList.vue

@@ -33,38 +33,10 @@
 
     <!-- 操作按钮区域 -->
     <div class="table-operator">
-      <!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
-      <a-button type="primary" icon="download" @click="handleExportXls('任务表')">导出</a-button>
-      <a-upload
-        name="file"
-        :showUploadList="false"
-        :multiple="false"
-        :headers="tokenHeader"
-        :action="importExcelUrl"
-        @change="handleImportExcel"
-      >
-        <a-button type="primary" icon="import">导入</a-button>
-      </a-upload>
-      <a-dropdown v-if="selectedRowKeys.length > 0">
-        <a-menu slot="overlay">
-          <a-menu-item key="1" @click="batchDel">
-            <a-icon type="delete" />删除
-          </a-menu-item>
-        </a-menu>
-        <a-button style="margin-left: 8px">
-          批量操作
-          <a-icon type="down" />
-        </a-button>
-      </a-dropdown> -->
     </div>
 
     <!-- table区域-begin -->
     <div>
-      <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择
-        <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
-        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
-      </div> -->
 
       <a-table
         ref="table"
@@ -75,31 +47,9 @@
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
-        :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
         @change="handleTableChange"
         @expand="expand"
       >
-        <!-- <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)">编辑</a>
-
-          <a-divider type="vertical" />
-          <a-dropdown>
-            <a class="ant-dropdown-link">
-              更多
-              <a-icon type="down" />
-            </a>
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <span @click="start(record)">开始执行</span>
-              </a-menu-item>
-              <a-menu-item>
-                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                  <a>删除</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
-          </a-dropdown>
-        </span> -->
         <a-table
           slot="expandedRowRender"
           slot-scope="text"
@@ -143,21 +93,6 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import { getAction, postAction } from '@/api/manage'
 import { transformTozTreeFormat } from '@/utils/util.js'
 const innerColumns = [
-  //   {
-  //     title: '任务ID',
-  //     align: 'center',
-  //     dataIndex: 'taskId'
-  //   },
-  //   {
-  //     title: '父ID',
-  //     align: 'center',
-  //     dataIndex: 'parentId'
-  //   },
-  {
-    title: '顺序',
-    align: 'center',
-    dataIndex: 'seq'
-  },
   {
     title: '名称',
     align: 'center',
@@ -170,71 +105,6 @@ const innerColumns = [
     scopedSlots: { customRender: 'action' },
     width: '210px'
   }
-  //   {
-  //     title: '查找类型',
-  //     align: 'center',
-  //     dataIndex: 'findType'
-  //   },
-  //   {
-  //     title: '查找关键字',
-  //     align: 'center',
-  //     dataIndex: 'findKey'
-  //   },
-  //   {
-  //     title: '点击类型',
-  //     align: 'center',
-  //     dataIndex: 'clickType'
-  //   },
-  //   {
-  //     title: '偏移量X',
-  //     align: 'center',
-  //     dataIndex: 'offsiteX'
-  //   },
-  //   {
-  //     title: '偏移量Y',
-  //     align: 'center',
-  //     dataIndex: 'offsiteY'
-  //   },
-  //   {
-  //     title: '循环间隔',
-  //     align: 'center',
-  //     dataIndex: 'loopRate'
-  //   },
-  //   {
-  //     title: '循环类型',
-  //     align: 'center',
-  //     dataIndex: 'loopType'
-  //   },
-  //   {
-  //     title: '是否必经执行',
-  //     align: 'center',
-  //     dataIndex: 'isMust'
-  //   },
-  //   {
-  //     title: '文本查找类型',
-  //     align: 'center',
-  //     dataIndex: 'textEqualType'
-  //   },
-  //   {
-  //     title: '文本查找关键字',
-  //     align: 'center',
-  //     dataIndex: 'textEqualKey'
-  //   },
-  //   {
-  //     title: '滑动类型',
-  //     align: 'center',
-  //     dataIndex: 'swapType'
-  //   },
-  //   {
-  //     title: '延迟时长',
-  //     align: 'center',
-  //     dataIndex: 'waitTime'
-  //   },
-  //   {
-  //     title: '是否执行完关闭',
-  //     align: 'center',
-  //     dataIndex: 'isClose'
-  //   },
 ]
 export default {
   name: 'AppiumTaskList',
@@ -287,9 +157,7 @@ export default {
         list: '/appium/appiumTask/list',
         listTwo: '/appium/appiumTaskItem/list',
         delete: '/appium/appiumTask/delete',
-        deleteBatch: '/appium/appiumTask/deleteBatch',
-        exportXlsUrl: 'appium/appiumTask/exportXls',
-        importExcelUrl: 'appium/appiumTask/importExcel'
+        deleteBatch: '/appium/appiumTask/deleteBatch'
       },
       run: '/appium/appiumTask/run',
       appiumDevice: '/appium/appiumDevice/list',

+ 14 - 9
src/views/modules/appium/modules/AppiumDeviceModal.vue

@@ -7,29 +7,34 @@
     @ok="handleOk"
     @cancel="handleCancel"
     cancelText="关闭">
-    
+
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">
-      
+
         <a-form-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
-          label="IP">
+          label="设备IP">
           <a-input placeholder="请输入IP" v-decorator="['ip', validatorRules.ip ]" />
         </a-form-item>
         <a-form-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
-          label="端口号">
+          label="设备端口号">
           <a-input placeholder="请输入端口号" v-decorator="['port', validatorRules.port ]" />
         </a-form-item>
         <a-form-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
-          label="状态">
-          <a-input placeholder="请输入状态" v-decorator="['status', validatorRules.status ]" />
+          label="设备状态">
+          <!--<a-input placeholder="请输入状态 1可用 2 任务中 3 不可用" v-decorator="['status', validatorRules.status ]" />-->
+          <a-select v-decorator="['status', validatorRules.status ]">
+            <a-select-option value="1">可用</a-select-option>
+            <a-select-option value="2">任务中</a-select-option>
+            <a-select-option value="3">不可用</a-select-option>
+          </a-select>
         </a-form-item>
-		
+
       </a-form>
     </a-spin>
   </a-modal>
@@ -61,7 +66,7 @@
         validatorRules:{
         ip:{rules: [{ required: true, message: '请输入IP!' }]},
         port:{rules: [{ required: true, message: '请输入端口号!' }]},
-        status:{rules: [{ required: true, message: '请输入状态!' }]},
+        status:{rules: [{ required: true, message: '请输入状态 1可用 2 任务中 3 不可用!' }]},
         },
         url: {
           add: "/appium/appiumDevice/add",
@@ -106,7 +111,7 @@
             }
             let formData = Object.assign(this.model, values);
             //时间格式化
-            
+
             console.log(formData)
             httpAction(httpurl,formData,method).then((res)=>{
               if(res.success){

+ 0 - 146
src/views/modules/appium/modules/AppiumDeviceModal__Style#Drawer.vue

@@ -1,146 +0,0 @@
-<template>
-  <a-drawer
-      :title="title"
-      :width="800"
-      placement="right"
-      :closable="false"
-      @close="close"
-      :visible="visible"
-  >
-
-    <a-spin :spinning="confirmLoading">
-      <a-form :form="form">
-      
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="IP">
-          <a-input placeholder="请输入IP" v-decorator="['ip', validatorRules.ip ]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="端口号">
-          <a-input placeholder="请输入端口号" v-decorator="['port', validatorRules.port ]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="状态">
-          <a-input placeholder="请输入状态" v-decorator="['status', validatorRules.status ]" />
-        </a-form-item>
-		
-      </a-form>
-    </a-spin>
-    <a-button type="primary" @click="handleOk">确定</a-button>
-    <a-button type="primary" @click="handleCancel">取消</a-button>
-  </a-drawer>
-</template>
-
-<script>
-  import { httpAction } from '@/api/manage'
-  import pick from 'lodash.pick'
-  import moment from "moment"
-
-  export default {
-    name: "AppiumDeviceModal",
-    data () {
-      return {
-        title:"操作",
-        visible: false,
-        model: {},
-        labelCol: {
-          xs: { span: 24 },
-          sm: { span: 5 },
-        },
-        wrapperCol: {
-          xs: { span: 24 },
-          sm: { span: 16 },
-        },
-
-        confirmLoading: false,
-        form: this.$form.createForm(this),
-        validatorRules:{
-        ip:{rules: [{ required: true, message: '请输入IP!' }]},
-        port:{rules: [{ required: true, message: '请输入端口号!' }]},
-        status:{rules: [{ required: true, message: '请输入状态!' }]},
-        },
-        url: {
-          add: "/appium/appiumDevice/add",
-          edit: "/appium/appiumDevice/edit",
-        },
-      }
-    },
-    created () {
-    },
-    methods: {
-      add () {
-        this.edit({});
-      },
-      edit (record) {
-        this.form.resetFields();
-        this.model = Object.assign({}, record);
-        this.visible = true;
-        this.$nextTick(() => {
-          this.form.setFieldsValue(pick(this.model,'ip','port','status'))
-		  //时间格式化
-        });
-
-      },
-      close () {
-        this.$emit('close');
-        this.visible = false;
-      },
-      handleOk () {
-        const that = this;
-        // 触发表单验证
-        this.form.validateFields((err, values) => {
-          if (!err) {
-            that.confirmLoading = true;
-            let httpurl = '';
-            let method = '';
-            if(!this.model.id){
-              httpurl+=this.url.add;
-              method = 'post';
-            }else{
-              httpurl+=this.url.edit;
-               method = 'put';
-            }
-            let formData = Object.assign(this.model, values);
-            //时间格式化
-            
-            console.log(formData)
-            httpAction(httpurl,formData,method).then((res)=>{
-              if(res.success){
-                that.$message.success(res.message);
-                that.$emit('ok');
-              }else{
-                that.$message.warning(res.message);
-              }
-            }).finally(() => {
-              that.confirmLoading = false;
-              that.close();
-            })
-
-
-
-          }
-        })
-      },
-      handleCancel () {
-        this.close()
-      },
-
-
-    }
-  }
-</script>
-
-<style lang="less" scoped>
-/** Button按钮间距 */
-  .ant-btn {
-    margin-left: 30px;
-    margin-bottom: 30px;
-    float: right;
-  }
-</style>

+ 189 - 253
src/views/modules/appium/modules/AppiumTaskItemModal.vue

@@ -6,307 +6,243 @@
     :confirmLoading="confirmLoading"
     @ok="handleOk"
     @cancel="handleCancel"
-    cancelText="关闭"
-  >
+    cancelText="关闭">
+
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="任务ID">
+
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="任务ID">
           <a-input placeholder="请输入任务ID" v-decorator="['taskId', validatorRules.taskId ]" />
-          <!-- <a-select
-             v-decorator="['taskId', validatorRules.taskId ]"
-            placeholder="请选择任务ID"
-          >
-          </a-select>-->
         </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="父ID">
-          <!-- <a-input placeholder="请输入父ID" v-decorator="['parentId', {}]" /> -->
-          <a-tree-select
-            style="width:100%"
-            :dropdownStyle="{ maxHeight: '200px', overflow: 'auto' }"
-            :treeData="treeData"
-            v-decorator="['parentId', {}]"
-            placeholder="请选择父级菜单"
-          ></a-tree-select>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="父ID">
+          <a-input placeholder="请输入父ID" v-decorator="['parentId', {}]" />
         </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="名字">
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="名称">
           <a-input placeholder="请输入名称" v-decorator="['name', {}]" />
         </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="顺序">
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="顺序">
           <a-input-number v-decorator="[ 'seq', validatorRules.seq ]" />
         </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="查找类型">
-          <!-- <a-input placeholder="请输入查找类型" v-decorator="['findType', validatorRules.findType ]" /> -->
-          <a-select v-decorator="['findType', validatorRules.findType ]" placeholder="请选择查找类型">
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="查找类型">
+          <!--<a-input placeholder="请输入查找类型" v-decorator="['findType', validatorRules.findType ]" />-->
+          <a-select v-decorator="['findType', validatorRules.findType ]">
             <a-select-option value="id">id</a-select-option>
-            <a-select-option value="no">no</a-select-option>
-            <a-select-option value="class">class</a-select-option>
             <a-select-option value="xpath">xpath</a-select-option>
+            <a-select-option value="class">class</a-select-option>
             <a-select-option value="loop">loop</a-select-option>
           </a-select>
         </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="查找关键字">
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="查找关键字">
           <a-input placeholder="请输入查找关键字" v-decorator="['findKey', {}]" />
         </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="点击类型">
-          <!-- <a-input placeholder="请输入点击类型" v-decorator="['clickType', {}]" /> -->
-          <a-select v-decorator="['clickType', {} ]" placeholder="请选择点击类型">
-            <a-select-option value="element">element</a-select-option>
-            <a-select-option value="point">point</a-select-option>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="应用包名">
+          <a-input placeholder="请输入应用包名" v-decorator="['appPackage', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="app页面(activity)">
+          <a-input placeholder="请输入app页面" v-decorator="['appActivity', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="点击类型">
+          <!--<a-input placeholder="请输入点击类型" v-decorator="['clickType', {}]" />-->
+          <a-select v-decorator="['clickType', {}]">
             <a-select-option value="no">no</a-select-option>
+            <a-select-option value="point">point</a-select-option>
+            <a-select-option value="element">element</a-select-option>
+            <a-select-option value="text">text</a-select-option>
           </a-select>
         </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="偏移量X">
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="偏移量X">
           <a-input-number v-decorator="[ 'offsiteX', {}]" />
         </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="偏移量Y">
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="偏移量Y">
           <a-input-number v-decorator="[ 'offsiteY', {}]" />
         </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="循环间隔">
-          <!-- <a-input placeholder="请输入循环间隔" v-decorator="['loopRate', {}]" /> -->
-          <a-input v-decorator="['loopRate',{}]" placeholder="请输入循环间隔">
-            <span slot="addonAfter">ms</span>
-          </a-input>
-        </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="循环类型">
-          <!-- <a-input placeholder="请输入循环类型" v-decorator="['loopType', {}]" /> -->
-          <a-switch
-            checkedChildren="loop"
-            unCheckedChildren="noloop"
-            v-decorator="['loopType', {}]"
-            v-model="model.loopType"
-          />
-        </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="是否必经执行">
-          <!-- <a-input placeholder="请输入是否必经执行" v-decorator="['isMust', validatorRules.isMust ]" /> -->
-          <a-switch
-            checkedChildren="是"
-            unCheckedChildren="否"
-            v-decorator="['isMust', validatorRules.isMust ]"
-            v-model="model.isMust"
-          />
-        </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="文本查找类型">
-          <!-- <a-input placeholder="请输入文本查找类型" v-decorator="['textEqualType', {}]" /> -->
-          <a-select v-decorator="['textEqualType', {} ]" placeholder="请选择文本查找类型">
-            <a-select-option value="eq">eq</a-select-option>
-            <a-select-option value="start">start</a-select-option>
-            <a-select-option value="contain">contain</a-select-option>
-          </a-select>
-        </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="文本查找关键字">
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="循环间隔">
+          <a-input placeholder="请输入循环间隔" v-decorator="['loopRate', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="循环类型">
+          <a-input placeholder="请输入循环类型" v-decorator="['loopType', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="是否必经执行">
+          <a-input placeholder="请输入是否必经执行" v-decorator="['isMust', validatorRules.isMust ]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="文本查找类型">
+          <a-input placeholder="请输入文本查找类型" v-decorator="['textEqualType', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="文本查找关键字">
           <a-input placeholder="请输入文本查找关键字" v-decorator="['textEqualKey', {}]" />
         </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="滑动类型">
-          <!-- <a-input placeholder="请输入滑动类型" v-decorator="['swapType', {}]" /> -->
-          <a-select v-decorator="['swapType', {} ]" placeholder="请选择滑动类型">
-            <a-select-option value="up">up</a-select-option>
-            <a-select-option value="down">down</a-select-option>
-            <a-select-option value="left">left</a-select-option>
-            <a-select-option value="right">right</a-select-option>
-          </a-select>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="滑动类型">
+          <a-input placeholder="请输入滑动类型" v-decorator="['swapType', {}]" />
         </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="延迟时长">
-          <!-- <a-input placeholder="请输入延迟时长" v-decorator="['waitTime', {}]" /> -->
-          <a-input v-decorator="['waitTime',{}]" placeholder="请输入延迟时长">
-            <span slot="addonAfter">ms</span>
-          </a-input>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="延迟时长">
+          <a-input placeholder="请输入延迟时长" v-decorator="['waitTime', {}]" />
         </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="是否执行完关闭">
-          <!-- <a-input placeholder="请输入是否执行完关闭" v-decorator="['isClose', {}]" /> -->
-          <a-switch
-            checkedChildren="是"
-            unCheckedChildren="否"
-            v-decorator="['isClose', {}]"
-            v-model="model.isClose"
-          />
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="是否执行完关闭">
+          <a-input placeholder="请输入是否执行完关闭" v-decorator="['isClose', {}]" />
         </a-form-item>
+
       </a-form>
     </a-spin>
   </a-modal>
 </template>
 
 <script>
-import { getAction } from '@/api/manage'
-import pick from 'lodash.pick'
-import moment from 'moment'
-
-// import the component
-import Treeselect from '@riophae/vue-treeselect'
-// import the styles
-import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+  import { httpAction } from '@/api/manage'
+  import pick from 'lodash.pick'
+  import moment from "moment"
 
-import { transformTozTreeFormat } from '@/utils/util.js'
+  export default {
+    name: "AppiumTaskItemModal",
+    data () {
+      return {
+        title:"操作",
+        visible: false,
+        model: {},
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
 
-export default {
-  name: 'AppiumTaskItemModal',
-  components: { Treeselect },
-  data() {
-    return {
-      title: '操作',
-      visible: false,
-      model: {},
-      labelCol: {
-        xs: { span: 24 },
-        sm: { span: 5 }
-      },
-      wrapperCol: {
-        xs: { span: 24 },
-        sm: { span: 16 }
+        confirmLoading: false,
+        form: this.$form.createForm(this),
+        validatorRules:{
+        taskId:{rules: [{ required: true, message: '请输入任务ID!' }]},
+        seq:{rules: [{ required: true, message: '请输入顺序!' }]},
+        findType:{rules: [{ required: true, message: '请输入查找类型!' }]},
+        isMust:{rules: [{ required: true, message: '请输入是否必经执行!' }]},
+        },
+        url: {
+          add: "/appium/appiumTaskItem/add",
+          edit: "/appium/appiumTaskItem/edit",
+        },
+      }
+    },
+    created () {
+    },
+    methods: {
+      add () {
+        this.edit({});
       },
-      confirmLoading: false,
-      form: this.$form.createForm(this),
-      treeData: [],
-      validatorRules: {
-        taskId: { rules: [{ required: true, message: '请输入任务ID!' }] },
-        seq: { rules: [{ required: true, message: '请输入顺序!' }] },
-        findType: { rules: [{ required: true, message: '请输入查找类型!' }] },
-        isMust: { rules: [{ required: true, message: '请输入是否必经执行!' }] }
+      edit (record) {
+        this.form.resetFields();
+        this.model = Object.assign({}, record);
+        this.visible = true;
+        this.$nextTick(() => {
+          this.form.setFieldsValue(pick(this.model,'taskId','parentId','name','seq','findType','findKey','appPackage','appActivity','clickType','offsiteX','offsiteY','loopRate','loopType','isMust','textEqualType','textEqualKey','swapType','waitTime','isClose'))
+		  //时间格式化
+        });
+
       },
-      url: {
-        add: '/appium/appiumTaskItem/add',
-        edit: '/appium/appiumTaskItem/edit'
+      close () {
+        this.$emit('close');
+        this.visible = false;
       },
-      list: '/appium/appiumTask/list',
-      listTwo: '/appium/appiumTaskItem/list',
-      options:[]
-    }
-  },
-  created() {},
-  mounted() {
-    this.$nextTick(() => {
-      var params = {}
-      params.pageNo = 1
-      params.pageSize = 100
-      var dataList = []
-      getAction(this.list, params).then(res => {
-        if (res.success) {
-          dataList.push(...res.result.records)
-          getAction(this.listTwo, params).then(item => {
-            if (res.success) {
-              dataList.push(...item.result.records)
-              dataList = transformTozTreeFormat(dataList)
-              this.options = dataList
+      handleOk () {
+        const that = this;
+        // 触发表单验证
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
             }
-          })
-        }
-      })
-    })
-  },
-  methods: {
-    switchShow(check) {},
-    switchShowTwo(check) {},
-    switchShowClose(check) {},
-    add() {
-      this.edit({
-        findType: 'id',
-        clickType: 'element',
-        offsiteX: 0,
-        offsiteY: 0,
-        loopRate: 1000,
-        loopType: false,
-        isMust: true,
-        waitTime: 1000,
-        isClose: false,
-        parentId:""
-      })
-    },
-    edit(record) {
-      this.form.resetFields()
-      this.model = Object.assign({}, record)
-      this.model.parentId = this.model.parentId + ''
-      if (this.model.isMust == 0) {
-        this.model.isMust = false
-      } else if (this.model.isMust == 1) {
-        this.model.isMust = true
-      }
+            let formData = Object.assign(this.model, values);
+            //时间格式化
+
+            console.log(formData)
+            httpAction(httpurl,formData,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+              that.close();
+            })
+
 
-      if (this.model.isClose == 0) {
-        this.model.isClose = false
-      } else if (this.model.isClose == 1) {
-        this.model.isClose = true
-      }
 
-      if (this.model.loopType == 'noloop') {
-        this.model.loopType = false
-      } else if (this.model.loopType == 'loop') {
-        this.model.loopType = true
-      }
-      this.visible = true
-      this.$nextTick(() => {
-        this.form.setFieldsValue(
-          pick(
-            this.model,
-            'taskId',
-            'parentId',
-            'name',
-            'seq',
-            'findType',
-            'findKey',
-            'clickType',
-            'offsiteX',
-            'offsiteY',
-            'loopRate',
-            'loopType',
-            'isMust',
-            'textEqualType',
-            'textEqualKey',
-            'swapType',
-            'waitTime',
-            'isClose'
-          )
-        )
-        //时间格式化
-      })
-    },
-    close() {
-      this.$emit('close')
-      this.visible = false
-    },
-    handleOk() {
-      const that = this
-      // 触发表单验证
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          that.confirmLoading = true
-          let httpurl = ''
-          let method = ''
-          if (!this.model.id) {
-            httpurl += this.url.add
-            method = 'post'
-          } else {
-            httpurl += this.url.edit
-            method = 'put'
           }
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
 
-          var params = { ...this.model }
-          params.isMust = params.isMust ? 1 : 0
-          params.isClose = params.isClose ? 1 : 0
-          params.loopType = params.loopType ? 'loop' : 'noloop'
-          //时间格式化
 
-          console.log(params, this.model)
-          httpAction(httpurl, params, method)
-            .then(res => {
-              if (res.success) {
-                that.$message.success(res.message)
-                that.$emit('ok')
-              } else {
-                that.$message.warning(res.message)
-              }
-            })
-            .finally(() => {
-              that.confirmLoading = false
-              that.close()
-            })
-        }
-      })
-    },
-    handleCancel() {
-      this.close()
     }
   }
-}
 </script>
 
 <style lang="less" scoped>
+
 </style>

+ 0 - 225
src/views/modules/appium/modules/AppiumTaskItemModal__Style#Drawer.vue

@@ -1,225 +0,0 @@
-<template>
-  <a-drawer
-      :title="title"
-      :width="800"
-      placement="right"
-      :closable="false"
-      @close="close"
-      :visible="visible"
-  >
-
-    <a-spin :spinning="confirmLoading">
-      <a-form :form="form">
-      
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="任务ID">
-          <a-input placeholder="请输入任务ID" v-decorator="['taskId', validatorRules.taskId ]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="父ID">
-          <a-input placeholder="请输入父ID" v-decorator="['parentId', {}]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="顺序">
-          <a-input-number v-decorator="[ 'seq', validatorRules.seq ]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="查找类型">
-          <a-input placeholder="请输入查找类型" v-decorator="['findType', validatorRules.findType ]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="查找关键字">
-          <a-input placeholder="请输入查找关键字" v-decorator="['findKey', {}]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="点击类型">
-          <a-input placeholder="请输入点击类型" v-decorator="['clickType', {}]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="偏移量X">
-          <a-input-number v-decorator="[ 'offsiteX', {}]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="偏移量Y">
-          <a-input-number v-decorator="[ 'offsiteY', {}]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="循环间隔">
-          <a-input placeholder="请输入循环间隔" v-decorator="['loopRate', {}]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="循环类型">
-          <a-input placeholder="请输入循环类型" v-decorator="['loopType', {}]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="是否必经执行">
-          <a-input placeholder="请输入是否必经执行" v-decorator="['isMust', validatorRules.isMust ]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="文本查找类型">
-          <a-input placeholder="请输入文本查找类型" v-decorator="['textEqualType', {}]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="文本查找关键字">
-          <a-input placeholder="请输入文本查找关键字" v-decorator="['textEqualKey', {}]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="滑动类型">
-          <a-input placeholder="请输入滑动类型" v-decorator="['swapType', {}]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="延迟时长">
-          <a-input placeholder="请输入延迟时长" v-decorator="['waitTime', {}]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="是否执行完关闭">
-          <a-input placeholder="请输入是否执行完关闭" v-decorator="['isClose', {}]" />
-        </a-form-item>
-		
-      </a-form>
-    </a-spin>
-    <a-button type="primary" @click="handleOk">确定</a-button>
-    <a-button type="primary" @click="handleCancel">取消</a-button>
-  </a-drawer>
-</template>
-
-<script>
-  import { httpAction } from '@/api/manage'
-  import pick from 'lodash.pick'
-  import moment from "moment"
-
-  export default {
-    name: "AppiumTaskItemModal",
-    data () {
-      return {
-        title:"操作",
-        visible: false,
-        model: {},
-        labelCol: {
-          xs: { span: 24 },
-          sm: { span: 5 },
-        },
-        wrapperCol: {
-          xs: { span: 24 },
-          sm: { span: 16 },
-        },
-
-        confirmLoading: false,
-        form: this.$form.createForm(this),
-        validatorRules:{
-        taskId:{rules: [{ required: true, message: '请输入任务ID!' }]},
-        seq:{rules: [{ required: true, message: '请输入顺序!' }]},
-        findType:{rules: [{ required: true, message: '请输入查找类型!' }]},
-        isMust:{rules: [{ required: true, message: '请输入是否必经执行!' }]},
-        },
-        url: {
-          add: "/appium/appiumTaskItem/add",
-          edit: "/appium/appiumTaskItem/edit",
-        },
-      }
-    },
-    created () {
-    },
-    methods: {
-      add () {
-        this.edit({});
-      },
-      edit (record) {
-        this.form.resetFields();
-        this.model = Object.assign({}, record);
-        this.visible = true;
-        this.$nextTick(() => {
-          this.form.setFieldsValue(pick(this.model,'taskId','parentId','seq','findType','findKey','clickType','offsiteX','offsiteY','loopRate','loopType','isMust','textEqualType','textEqualKey','swapType','waitTime','isClose'))
-		  //时间格式化
-        });
-
-      },
-      close () {
-        this.$emit('close');
-        this.visible = false;
-      },
-      handleOk () {
-        const that = this;
-        // 触发表单验证
-        this.form.validateFields((err, values) => {
-          if (!err) {
-            that.confirmLoading = true;
-            let httpurl = '';
-            let method = '';
-            if(!this.model.id){
-              httpurl+=this.url.add;
-              method = 'post';
-            }else{
-              httpurl+=this.url.edit;
-               method = 'put';
-            }
-            let formData = Object.assign(this.model, values);
-            //时间格式化
-            
-            console.log(formData)
-            httpAction(httpurl,formData,method).then((res)=>{
-              if(res.success){
-                that.$message.success(res.message);
-                that.$emit('ok');
-              }else{
-                that.$message.warning(res.message);
-              }
-            }).finally(() => {
-              that.confirmLoading = false;
-              that.close();
-            })
-
-
-
-          }
-        })
-      },
-      handleCancel () {
-        this.close()
-      },
-
-
-    }
-  }
-</script>
-
-<style lang="less" scoped>
-/** Button按钮间距 */
-  .ant-btn {
-    margin-left: 30px;
-    margin-bottom: 30px;
-    float: right;
-  }
-</style>

+ 0 - 146
src/views/modules/appium/modules/AppiumTaskModal__Style#Drawer.vue

@@ -1,146 +0,0 @@
-<template>
-  <a-drawer
-      :title="title"
-      :width="800"
-      placement="right"
-      :closable="false"
-      @close="close"
-      :visible="visible"
-  >
-
-    <a-spin :spinning="confirmLoading">
-      <a-form :form="form">
-      
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="任务名称">
-          <a-input placeholder="请输入任务名称" v-decorator="['taskName', validatorRules.taskName ]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="APP包名">
-          <a-input placeholder="请输入APP包名" v-decorator="['appPackage', validatorRules.appPackage ]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="APP界面名">
-          <a-input placeholder="请输入APP界面名" v-decorator="['appActivity', validatorRules.appActivity ]" />
-        </a-form-item>
-		
-      </a-form>
-    </a-spin>
-    <a-button type="primary" @click="handleOk">确定</a-button>
-    <a-button type="primary" @click="handleCancel">取消</a-button>
-  </a-drawer>
-</template>
-
-<script>
-  import { httpAction } from '@/api/manage'
-  import pick from 'lodash.pick'
-  import moment from "moment"
-
-  export default {
-    name: "AppiumTaskModal",
-    data () {
-      return {
-        title:"操作",
-        visible: false,
-        model: {},
-        labelCol: {
-          xs: { span: 24 },
-          sm: { span: 5 },
-        },
-        wrapperCol: {
-          xs: { span: 24 },
-          sm: { span: 16 },
-        },
-
-        confirmLoading: false,
-        form: this.$form.createForm(this),
-        validatorRules:{
-        taskName:{rules: [{ required: true, message: '请输入任务名称!' }]},
-        appPackage:{rules: [{ required: true, message: '请输入APP包名!' }]},
-        appActivity:{rules: [{ required: true, message: '请输入APP界面名!' }]},
-        },
-        url: {
-          add: "/appium/appiumTask/add",
-          edit: "/appium/appiumTask/edit",
-        },
-      }
-    },
-    created () {
-    },
-    methods: {
-      add () {
-        this.edit({});
-      },
-      edit (record) {
-        this.form.resetFields();
-        this.model = Object.assign({}, record);
-        this.visible = true;
-        this.$nextTick(() => {
-          this.form.setFieldsValue(pick(this.model,'taskName','appPackage','appActivity'))
-		  //时间格式化
-        });
-
-      },
-      close () {
-        this.$emit('close');
-        this.visible = false;
-      },
-      handleOk () {
-        const that = this;
-        // 触发表单验证
-        this.form.validateFields((err, values) => {
-          if (!err) {
-            that.confirmLoading = true;
-            let httpurl = '';
-            let method = '';
-            if(!this.model.id){
-              httpurl+=this.url.add;
-              method = 'post';
-            }else{
-              httpurl+=this.url.edit;
-               method = 'put';
-            }
-            let formData = Object.assign(this.model, values);
-            //时间格式化
-            
-            console.log(formData)
-            httpAction(httpurl,formData,method).then((res)=>{
-              if(res.success){
-                that.$message.success(res.message);
-                that.$emit('ok');
-              }else{
-                that.$message.warning(res.message);
-              }
-            }).finally(() => {
-              that.confirmLoading = false;
-              that.close();
-            })
-
-
-
-          }
-        })
-      },
-      handleCancel () {
-        this.close()
-      },
-
-
-    }
-  }
-</script>
-
-<style lang="less" scoped>
-/** Button按钮间距 */
-  .ant-btn {
-    margin-left: 30px;
-    margin-bottom: 30px;
-    float: right;
-  }
-</style>