Browse Source

Merge remote-tracking branch 'remotes/upstream/branch-1.0.2' into branch-1.0.2

pull/2/head
ligang 6 years ago
parent
commit
58f21db6be
  1. 2
      escheduler-ui/.env
  2. 23
      escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue
  3. 35
      escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue
  4. 15
      escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/rename.vue
  5. 14
      escheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/rename.vue

2
escheduler-ui/.env

@ -1,6 +1,6 @@
# 后端接口地址 # 后端接口地址
API_BASE = http://192.168.xx.xx:12345 API_BASE = http://192.168.221.188:12345
# 本地开发如需ip访问项目把"#"号去掉 # 本地开发如需ip访问项目把"#"号去掉
#DEV_HOST = 192.168.xx.xx #DEV_HOST = 192.168.xx.xx

23
escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue

@ -6,7 +6,7 @@
<th width="50"> <th width="50">
<x-checkbox @on-change="_topCheckBoxClick" v-model="checkAll"></x-checkbox> <x-checkbox @on-change="_topCheckBoxClick" v-model="checkAll"></x-checkbox>
</th> </th>
<th> <th width="40">
<span>{{$t('#')}}</span> <span>{{$t('#')}}</span>
</th> </th>
<th> <th>
@ -33,7 +33,7 @@
</tr> </tr>
<tr v-for="(item, $index) in list" :key="item.id"> <tr v-for="(item, $index) in list" :key="item.id">
<td width="50"><x-checkbox v-model="item.isCheck" @on-change="_arrDelChange"></x-checkbox></td> <td width="50"><x-checkbox v-model="item.isCheck" @on-change="_arrDelChange"></x-checkbox></td>
<td> <td width="50">
<span>{{parseInt(pageNo === 1 ? ($index + 1) : (($index + 1) + (pageSize * (pageNo - 1))))}}</span> <span>{{parseInt(pageNo === 1 ? ($index + 1) : (($index + 1) + (pageSize * (pageNo - 1))))}}</span>
</td> </td>
<td> <td>
@ -90,7 +90,7 @@
</tr> </tr>
</table> </table>
</div> </div>
<x-button style="position: absolute; bottom: -52px; left: 22px;" v-if="strDelete !== ''" @click="_batchDelete">批量删除</x-button> <x-button size="xsmall" style="position: absolute; bottom: -48px; left: 22px;" v-if="strDelete !== ''" @click="_batchDelete">删除</x-button>
</div> </div>
</template> </template>
<script> <script>
@ -308,21 +308,24 @@
} }
}, },
watch: { watch: {
processList (a) { processList: {
this.list = [] handler (a) {
setTimeout(() => { this.checkAll = false
this.list = a this.list = []
}) setTimeout(() => {
this.list = _.cloneDeep(a)
})
},
immediate: true,
deep: true
}, },
pageNo () { pageNo () {
this.checkAll = false
this.strDelete = '' this.strDelete = ''
} }
}, },
created () { created () {
}, },
mounted () { mounted () {
this.list = this.processList
}, },
components: { } components: { }
} }

35
escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue

@ -6,13 +6,13 @@
<th width="50"> <th width="50">
<x-checkbox @on-change="_topCheckBoxClick" v-model="checkAll"></x-checkbox> <x-checkbox @on-change="_topCheckBoxClick" v-model="checkAll"></x-checkbox>
</th> </th>
<th> <th width="40">
<span>{{$t('#')}}</span> <span>{{$t('#')}}</span>
</th> </th>
<th> <th>
<span>{{$t('Process Name')}}</span> <span>{{$t('Process Name')}}</span>
</th> </th>
<th width="120"> <th>
<span>{{$t('Run Type')}}</span> <span>{{$t('Run Type')}}</span>
</th> </th>
<th width="140"> <th width="140">
@ -21,10 +21,10 @@
<th width="140"> <th width="140">
<span>{{$t('End Time')}}</span> <span>{{$t('End Time')}}</span>
</th> </th>
<th width="90"> <th width="70">
<span>{{$t('Duration')}}s</span> <span>{{$t('Duration')}}s</span>
</th> </th>
<th width="72"> <th width="70">
<span>{{$t('Run Times')}}</span> <span>{{$t('Run Times')}}</span>
</th> </th>
<th width="100"> <th width="100">
@ -36,13 +36,13 @@
<th width="50"> <th width="50">
<span>{{$t('State')}}</span> <span>{{$t('State')}}</span>
</th> </th>
<th width="260"> <th width="220">
<span>{{$t('Operation')}}</span> <span>{{$t('Operation')}}</span>
</th> </th>
</tr> </tr>
<tr v-for="(item, $index) in list" :key="item.id"> <tr v-for="(item, $index) in list" :key="item.id">
<td width="50"><x-checkbox v-model="item.isCheck" @on-change="_arrDelChange"></x-checkbox></td> <td width="50"><x-checkbox v-model="item.isCheck" @on-change="_arrDelChange"></x-checkbox></td>
<td> <td width="50">
<span>{{parseInt(pageNo === 1 ? ($index + 1) : (($index + 1) + (pageSize * (pageNo - 1))))}}</span> <span>{{parseInt(pageNo === 1 ? ($index + 1) : (($index + 1) + (pageSize * (pageNo - 1))))}}</span>
</td> </td>
<td> <td>
@ -54,8 +54,8 @@
<span v-if="item.endTime">{{item.endTime | formatDate}}</span> <span v-if="item.endTime">{{item.endTime | formatDate}}</span>
<span v-if="!item.endTime">-</span> <span v-if="!item.endTime">-</span>
</td> </td>
<td><span>{{item.duration || '-'}}</span></td> <td width="70"><span>{{item.duration || '-'}}</span></td>
<td><span>{{item.runTimes}}</span></td> <td width="70"><span>{{item.runTimes}}</span></td>
<td> <td>
<span v-if="item.host">{{item.host}}</span> <span v-if="item.host">{{item.host}}</span>
<span v-if="!item.host">-</span> <span v-if="!item.host">-</span>
@ -249,7 +249,7 @@
</tr> </tr>
</table> </table>
</div> </div>
<x-button style="position: absolute; bottom: -52px; left: 22px;" v-if="strDelete !== ''" @click="_batchDelete">批量删除</x-button> <x-button size="xsmall" style="position: absolute; bottom: -48px; left: 22px;" v-if="strDelete !== ''" @click="_batchDelete">删除</x-button>
</div> </div>
</template> </template>
<script> <script>
@ -480,21 +480,24 @@
} }
}, },
watch: { watch: {
processInstanceList (a) { processInstanceList: {
this.list = [] handler (a) {
setTimeout(() => { this.checkAll = false
this.list = this._listDataHandle(a) this.list = []
}) setTimeout(() => {
this.list = _.cloneDeep(this._listDataHandle(a))
})
},
immediate: true,
deep: true
}, },
pageNo () { pageNo () {
this.checkAll = false
this.strDelete = '' this.strDelete = ''
} }
}, },
created () { created () {
}, },
mounted () { mounted () {
this.list = this._listDataHandle(this.processInstanceList)
}, },
components: { } components: { }
} }

15
escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/rename.vue

@ -49,10 +49,16 @@
methods: { methods: {
_ok (fn) { _ok (fn) {
this._verification().then(res => { this._verification().then(res => {
return this.store.dispatch('resource/resourceVerifyName', { if (this.name === this.item.alias) {
name: this.name, return new Promise((resolve,reject) => {
type: 'FILE' this.desc === this.item.desc ? reject({msg:'内容未修改'}) : resolve()
}) })
}else{
return this.store.dispatch('resource/resourceVerifyName', {
name: this.name,
type: 'FILE'
})
}
}).then(res => { }).then(res => {
return this.store.dispatch('resource/resourceRename', { return this.store.dispatch('resource/resourceRename', {
name: this.name, name: this.name,
@ -78,6 +84,7 @@
} else { } else {
resolve() resolve()
} }
}) })
} }
}, },

14
escheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/rename.vue

@ -49,10 +49,16 @@
methods: { methods: {
_ok (fn) { _ok (fn) {
this._verification().then(res => { this._verification().then(res => {
return this.store.dispatch('resource/resourceVerifyName', { if (this.name === this.item.alias) {
name: this.name, return new Promise((resolve,reject) => {
type: 'UDF' this.desc === this.item.desc ? reject({msg:'内容未修改'}) : resolve()
}) })
}else{
return this.store.dispatch('resource/resourceVerifyName', {
name: this.name,
type: 'UDF'
})
}
}).then(res => { }).then(res => {
return this.store.dispatch('resource/resourceRename', { return this.store.dispatch('resource/resourceRename', {
name: this.name, name: this.name,

Loading…
Cancel
Save