未验证 提交 7486ad01 编写于 作者: X xingchun-chen 提交者: GitHub

Merge pull request #3539 from break60/1.3.2-release

[ui]Resource delete OK button to increase loading, change the number …
......@@ -304,6 +304,7 @@
font-size: 12px;
margin-left: 10px;
em {
text-decoration: none !important;
vertical-align: middle;
}
}
......
......@@ -31,7 +31,10 @@
</tr>
<tr v-for="(item,$index) in processStateList" :key="$index">
<td><span>{{$index+1}}</span></td>
<td><span><a href="javascript:" @click="searchParams.projectId && _goProcess(item.key)" :class="searchParams.projectId ?'links':''">{{item.value}}</a></span></td>
<td>
<a v-if="currentName === 'home'" style="cursor: default">{{item.value}}</a>
<span v-else><a href="javascript:" @click="searchParams.projectId && _goProcess(item.key)">{{item.value}}</a></span>
</td>
<td><span class="ellipsis" style="width: 98%;" :title="item.key">{{item.key}}</span></td>
</tr>
</table>
......@@ -57,7 +60,8 @@
return {
isSpin: true,
msg: '',
processStateList: []
processStateList: [],
currentName: ''
}
},
props: {
......@@ -113,6 +117,7 @@
beforeCreate () {
},
created () {
this.currentName = this.$router.currentRoute.name
},
beforeMount () {
},
......@@ -132,7 +137,4 @@
</script>
<style lang="scss" rel="stylesheet/scss">
.process-state-count-model {
}
</style>
......@@ -32,8 +32,9 @@
<tr v-for="(item,$index) in taskCtatusList" :key="$index">
<td><span>{{$index+1}}</span></td>
<td>
<span>
<a href="javascript:" @click="searchParams.projectId && _goTask(item.key)" :class="searchParams.projectId ?'links':''">{{item.value}}</a>
<a v-if="currentName === 'home'" style="cursor: default">{{item.value}}</a>
<span v-else>
<a href="javascript:" @click="searchParams.projectId && _goTask(item.key)">{{item.value}}</a>
</span>
</td>
<td><span class="ellipsis" style="width: 98%;" :title="item.key">{{item.key}}</span></td>
......@@ -62,7 +63,8 @@
return {
isSpin: true,
msg: '',
taskCtatusList: []
taskCtatusList: [],
currentName: ''
}
},
props: {
......@@ -120,6 +122,7 @@
beforeCreate () {
},
created () {
this.currentName = this.$router.currentRoute.name
},
beforeMount () {
},
......@@ -139,7 +142,4 @@
</script>
<style lang="scss" rel="stylesheet/scss">
.task-ctatus-count-model {
}
</style>
......@@ -115,11 +115,11 @@
<x-poptip
:ref="'poptip-' + $index"
placement="bottom-end"
width="90">
width="190">
<p>{{$t('Delete?')}}</p>
<div style="text-align: right; margin: 0;padding-top: 4px;">
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('Cancel')}}</x-button>
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('Confirm')}}</x-button>
<x-button type="primary" size="xsmall" shape="circle" :loading="spinnerLoading" @click="_delete(item,$index)">{{spinnerLoading ? 'Loading' : $t('Confirm')}}</x-button>
</div>
<template slot="reference">
<x-button
......@@ -151,7 +151,8 @@
name: 'file-manage-list',
data () {
return {
list: []
list: [],
spinnerLoading: false
}
},
props: {
......@@ -189,15 +190,18 @@
this.$refs[`poptip-${i}`][0].doClose()
},
_delete (item, i) {
this.spinnerLoading = true
this.deleteResource({
id: item.id
}).then(res => {
this.$refs[`poptip-${i}`][0].doClose()
this.$emit('on-update')
this.$message.success(res.msg)
this.spinnerLoading = false
}).catch(e => {
this.$refs[`poptip-${i}`][0].doClose()
this.$message.error(e.msg || '')
this.spinnerLoading = false
})
},
_rename (item, i) {
......
......@@ -115,11 +115,11 @@
<x-poptip
:ref="'poptip-' + $index"
placement="bottom-end"
width="90">
width="190">
<p>{{$t('Delete?')}}</p>
<div style="text-align: right; margin: 0;padding-top: 4px;">
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('Cancel')}}</x-button>
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('Confirm')}}</x-button>
<x-button type="primary" size="xsmall" shape="circle" :loading="spinnerLoading" @click="_delete(item,$index)">{{spinnerLoading ? 'Loading' : $t('Confirm')}}</x-button>
</div>
<template slot="reference">
<x-button
......@@ -152,7 +152,8 @@
name: 'file-manage-list',
data () {
return {
list: []
list: [],
spinnerLoading: false
}
},
props: {
......@@ -190,15 +191,18 @@
this.$refs[`poptip-${i}`][0].doClose()
},
_delete (item, i) {
this.spinnerLoading = true
this.deleteResource({
id: item.id
}).then(res => {
this.$refs[`poptip-${i}`][0].doClose()
this.$emit('on-update')
this.$message.success(res.msg)
this.spinnerLoading = false
}).catch(e => {
this.$refs[`poptip-${i}`][0].doClose()
this.$message.error(e.msg || '')
this.spinnerLoading = false
})
},
_rename (item, i) {
......
......@@ -94,11 +94,11 @@ v-ps<template>
<x-poptip
:ref="'poptip-' + $index"
placement="bottom-end"
width="90">
width="190">
<p>{{$t('Delete?')}}</p>
<div style="text-align: right; margin: 0;padding-top: 4px;">
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('Cancel')}}</x-button>
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('Confirm')}}</x-button>
<x-button type="primary" size="xsmall" shape="circle" :loading="spinnerLoading" @click="_delete(item,$index)">{{spinnerLoading ? 'Loading' : $t('Confirm')}}</x-button>
</div>
<template slot="reference">
<x-button
......@@ -125,7 +125,8 @@ v-ps<template>
name: 'udf-manage-list',
data () {
return {
list: []
list: [],
spinnerLoading: false
}
},
props: {
......@@ -139,15 +140,18 @@ v-ps<template>
this.$refs[`poptip-${i}`][0].doClose()
},
_delete (item, i) {
this.spinnerLoading = true
this.deleteUdf({
id: item.id
}).then(res => {
this.$refs[`poptip-${i}`][0].doClose()
this.$emit('on-update')
this.$message.success(res.msg)
this.spinnerLoading = false
}).catch(e => {
this.$refs[`poptip-${i}`][0].doClose()
this.$message.error(e.msg || '')
this.spinnerLoading = false
})
},
_edit (item) {
......
......@@ -108,11 +108,11 @@
<x-poptip
:ref="'poptip-' + $index"
placement="bottom-end"
width="90">
width="190">
<p>{{$t('Delete?')}}</p>
<div style="text-align: right; margin: 0;padding-top: 4px;">
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('Cancel')}}</x-button>
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('Confirm')}}</x-button>
<x-button type="primary" size="xsmall" shape="circle" :loading="spinnerLoading" @click="_delete(item,$index)">{{spinnerLoading ? 'Loading' : $t('Confirm')}}</x-button>
</div>
<template slot="reference">
<x-button
......@@ -143,7 +143,8 @@
name: 'udf-manage-list',
data () {
return {
list: []
list: [],
spinnerLoading: false
}
},
props: {
......@@ -178,15 +179,18 @@
this.$refs[`poptip-${i}`][0].doClose()
},
_delete (item, i) {
this.spinnerLoading = true
this.deleteResource({
id: item.id
}).then(res => {
this.$refs[`poptip-${i}`][0].doClose()
this.$emit('on-update')
this.$message.success(res.msg)
this.spinnerLoading = false
}).catch(e => {
this.$refs[`poptip-${i}`][0].doClose()
this.$message.error(e.msg || '')
this.spinnerLoading = false
})
},
_rename (item, i) {
......
......@@ -108,11 +108,11 @@
<x-poptip
:ref="'poptip-' + $index"
placement="bottom-end"
width="90">
width="190">
<p>{{$t('Delete?')}}</p>
<div style="text-align: right; margin: 0;padding-top: 4px;">
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('Cancel')}}</x-button>
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('Confirm')}}</x-button>
<x-button type="primary" size="xsmall" shape="circle" :loading="spinnerLoading" @click="_delete(item,$index)">{{spinnerLoading ? 'Loading' : $t('Confirm')}}</x-button>
</div>
<template slot="reference">
<x-button
......@@ -144,7 +144,8 @@
name: 'udf-manage-list',
data () {
return {
list: []
list: [],
spinnerLoading: false
}
},
props: {
......@@ -179,15 +180,18 @@
this.$refs[`poptip-${i}`][0].doClose()
},
_delete (item, i) {
this.spinnerLoading = true
this.deleteResource({
id: item.id
}).then(res => {
this.$refs[`poptip-${i}`][0].doClose()
this.$emit('on-update')
this.$message.success(res.msg)
this.spinnerLoading = false
}).catch(e => {
this.$refs[`poptip-${i}`][0].doClose()
this.$message.error(e.msg || '')
this.spinnerLoading = false
})
},
_rename (item, i) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册