Unverified Commit 6c1cbef1 authored by millionfor's avatar millionfor Committed by GitHub
Browse files

Merge pull request #67 from millionfor/dev-20190415

Dev 20190415
parents 76e70131 4d9d72fe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -255,7 +255,7 @@
       */
      _seeHistory () {
        this.self.$router.push({
          name: 'task-instance-list',
          name: 'task-instance',
          query: {
            processInstanceId: this.self.$route.params.id,
            taskName: this.backfillItem.name
+9 −1
Original line number Diff line number Diff line
@@ -333,8 +333,16 @@
      padding: 0 20px;
    }
    .content-p {
      min-width: 500px;
      min-width: 820px;
      min-height: 100px;
      .list-box-f {
        .text {
          width: 166px;
        }
        .cont {
          width: calc(100% - 186px);
        }
      }
    }
  }
</style>
+4 −25
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
  import mSpin from '@/module/components/spin/spin'
  import { setUrlParams } from '@/module/util/routerUtil'
  import mNoData from '@/module/components/noData/noData'
  import listUrlParamHandle from '@/module/mixin/listUrlParamHandle'
  import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
  import mListConstruction from '@/module/components/listConstruction/listConstruction'

@@ -53,6 +54,7 @@
        }
      }
    },
    mixins: [listUrlParamHandle],
    props: {
      config: String
    },
@@ -83,44 +85,21 @@
      },
      _onUpdate () {
        this._debounceGET()
      },
      /**
       * Anti-shake request interface
       * @desc Prevent function from being called multiple times
       */
      _debounceGET: _.debounce(function (flag) {
        this._getList(flag)
      }, 100, {
        'leading': false,
        'trailing': true
      })
      }
    },
    watch: {
      // router
      '$route' (a) {
        // url no params get instance list
        if (_.isEmpty(a.query)) {
          this.searchParams.pageNo = 1
          this.searchParams.processInstanceId = ''
        } else {
          this.searchParams.pageNo = a.query.pageNo || 1
        }
      },
      'searchParams.pageNo': {
        deep: true,
        handler () {
          this._debounceGET()
        }
        this.searchParams.pageNo = _.isEmpty(a.query) ? 1 : a.query.pageNo
      }
    },
    created () {
      // Routing parameter merging
      if (!_.isEmpty(this.$route.query)) {
        this.searchParams = _.assign(this.searchParams, this.$route.query)
      }
    },
    mounted () {
      this._debounceGET()
    },
    components: { mList, mConditions, mSpin, mListConstruction, mSecondaryMenu, mNoData }
  }
+2 −2
Original line number Diff line number Diff line
@@ -198,11 +198,11 @@
          if (this.item.crontab) {
            api = 'dag/updateSchedule'
            searchParams.id = this.item.id
            msg = '编辑成功!不要忘记上线'
            msg = `${i18n.$t('Edit')}${i18n.$t('success')},${i18n.$t('Please go online')}`
          } else {
            api = 'dag/createSchedule'
            searchParams.processDefinitionId = this.item.id
            msg = '创建成功'
            msg = `${i18n.$t('Create')}${i18n.$t('success')}`
          }

          this.store.dispatch(api, searchParams).then(res => {
+8 −42
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@
  import localStore from '@/module/util/localStorage'
  import { setUrlParams } from '@/module/util/routerUtil'
  import mNoData from '@/module/components/noData/noData'
  import listUrlParamHandle from '@/module/mixin/listUrlParamHandle'
  import mConditions from '@/module/components/conditions/conditions'
  import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
  import mListConstruction from '@/module/components/listConstruction/listConstruction'
@@ -44,15 +45,14 @@
        processListP: [],
        isLoading: true,
        searchParams: {
          // 分页条数
          pageSize: 10,
          // 分页
          pageNo: 1,
          // 查询名称
          searchVal: ''
          searchVal: '',
          userId: ''
        }
      }
    },
    mixins: [listUrlParamHandle],
    props: {
    },
    methods: {
@@ -77,15 +77,9 @@
      /**
       * get data list
       */
      _getProcessListP (flag) {
      _getList (flag) {
        this.isLoading = !flag
        this.getProcessListP({
          pageSize: this.searchParams.pageSize,
          pageNo: this.searchParams.pageNo,
          searchVal: this.searchParams.searchVal,
          userId: this.$route.query.userId || ''
        }).then(res => {
          setUrlParams({ pageNo: this.pageNo })
        this.getProcessListP(this.searchParams).then(res => {
          this.processListP = []
          this.processListP = res.totalList
          this.total = res.total
@@ -96,48 +90,20 @@
      },
      _onUpdate () {
        this._debounceGET('false')
      },
      /**
       * Anti-shake request interface
       * @desc Prevent function from being called multiple times
       */
      _debounceGET: _.debounce(function (flag) {
        this._getProcessListP(flag)
      }, 100, {
        'leading': false,
        'trailing': true
      })
      }
    },
    watch: {
      '$route' (a) {
        // url no params get instance list
        if (_.isEmpty(a.query)) {
          this.searchParams.pageNo = 1
        } else {
          this.searchParams.pageNo = a.query.pageNo || 1
        }
      },
      'searchParams': {
        deep: true,
        handler () {
          this._debounceGET()
        }
        this.searchParams.pageNo = _.isEmpty(a.query) ? 1 : a.query.pageNo
      }
    },
    created () {
      localStore.removeItem('subProcessId')

      // Routing parameter merging
      if (!_.isEmpty(this.$route.query)) {
        this.searchParams = _.assign(this.searchParams, this.$route.query)
      }
    },
    mounted () {
      this._debounceGET()
    },
    components: { mList, mConditions, mSpin, mListConstruction, mSecondaryMenu, mNoData }
  }
</script>
<style lang="scss" rel="stylesheet/scss">
</style>
Loading