|
@@ -115,12 +115,12 @@
|
|
|
:title="$t('Delete?')"
|
|
|
@onConfirm="_delete({},-1)"
|
|
|
>
|
|
|
- <el-button style="position: absolute; bottom: -48px; left: 19px;" type="primary" size="mini" :disabled="!strSelectIds" slot="reference">{{$t('Delete')}}</el-button>
|
|
|
+ <el-button style="position: absolute; bottom: -48px; left: 19px;" type="primary" size="mini" :disabled="!strSelectCodes" slot="reference">{{$t('Delete')}}</el-button>
|
|
|
</el-popconfirm>
|
|
|
</el-tooltip>
|
|
|
- <el-button type="primary" size="mini" :disabled="!strSelectIds" style="position: absolute; bottom: -48px; left: 80px;" @click="_batchExport(item)" >{{$t('Export')}}</el-button>
|
|
|
- <span><el-button type="primary" size="mini" :disabled="!strSelectIds" style="position: absolute; bottom: -48px; left: 140px;" @click="_batchCopy(item)" >{{$t('Batch copy')}}</el-button></span>
|
|
|
- <el-button type="primary" size="mini" :disabled="!strSelectIds" style="position: absolute; bottom: -48px; left: 225px;" @click="_batchMove(item)" >{{$t('Batch move')}}</el-button>
|
|
|
+ <el-button type="primary" size="mini" :disabled="!strSelectCodes" style="position: absolute; bottom: -48px; left: 80px;" @click="_batchExport(item)" >{{$t('Export')}}</el-button>
|
|
|
+ <span><el-button type="primary" size="mini" :disabled="!strSelectCodes" style="position: absolute; bottom: -48px; left: 140px;" @click="_batchCopy(item)" >{{$t('Batch copy')}}</el-button></span>
|
|
|
+ <el-button type="primary" size="mini" :disabled="!strSelectCodes" style="position: absolute; bottom: -48px; left: 225px;" @click="_batchMove(item)" >{{$t('Batch move')}}</el-button>
|
|
|
<el-drawer
|
|
|
:visible.sync="drawer"
|
|
|
size=""
|
|
@@ -162,7 +162,7 @@
|
|
|
data () {
|
|
|
return {
|
|
|
list: [],
|
|
|
- strSelectIds: '',
|
|
|
+ strSelectCodes: '',
|
|
|
checkAll: false,
|
|
|
drawer: false,
|
|
|
versionData: {
|
|
@@ -243,7 +243,7 @@
|
|
|
* Timing manage
|
|
|
*/
|
|
|
_timingManage (item) {
|
|
|
- this.$router.push({ path: `/projects/${this.projectId}/definition/list/timing/${item.code}` })
|
|
|
+ this.$router.push({ path: `/projects/${this.projectCode}/definition/list/timing/${item.code}` })
|
|
|
},
|
|
|
/**
|
|
|
* delete
|
|
@@ -293,10 +293,10 @@
|
|
|
*/
|
|
|
_copyProcess (item) {
|
|
|
this.copyProcess({
|
|
|
- processDefinitionIds: item.id,
|
|
|
- targetProjectId: item.projectId
|
|
|
+ codes: item.code,
|
|
|
+ targetProjectCode: item.projectCode
|
|
|
}).then(res => {
|
|
|
- this.strSelectIds = ''
|
|
|
+ this.strSelectCodes = ''
|
|
|
this.$message.success(res.msg)
|
|
|
// $('body').find('.tooltip.fade.top.in').remove()
|
|
|
this._onUpdate()
|
|
@@ -310,10 +310,10 @@
|
|
|
*/
|
|
|
_moveProcess (item) {
|
|
|
this.moveProcess({
|
|
|
- processDefinitionIds: item.id,
|
|
|
- targetProjectId: item.projectId
|
|
|
+ codes: item.code,
|
|
|
+ targetProjectCode: item.projectCode
|
|
|
}).then(res => {
|
|
|
- this.strSelectIds = ''
|
|
|
+ this.strSelectCodes = ''
|
|
|
this.$message.success(res.msg)
|
|
|
$('body').find('.tooltip.fade.top.in').remove()
|
|
|
this._onUpdate()
|
|
@@ -324,7 +324,7 @@
|
|
|
|
|
|
_export (item) {
|
|
|
this.exportDefinition({
|
|
|
- processDefinitionIds: item.id,
|
|
|
+ codes: item.code,
|
|
|
fileName: item.name
|
|
|
}).catch(e => {
|
|
|
this.$message.error(e.msg || '')
|
|
@@ -334,7 +334,7 @@
|
|
|
* switch version in process definition version list
|
|
|
*
|
|
|
* @param version the version user want to change
|
|
|
- * @param processDefinitionId the process definition id
|
|
|
+ * @param processDefinitionCode the process definition code
|
|
|
* @param fromThis fromThis
|
|
|
*/
|
|
|
mVersionSwitchProcessDefinitionVersion ({ version, processDefinitionCode, fromThis }) {
|
|
@@ -353,7 +353,7 @@
|
|
|
*
|
|
|
* @param pageNo page number
|
|
|
* @param pageSize page size
|
|
|
- * @param processDefinitionId the process definition id of page version
|
|
|
+ * @param processDefinitionCode the process definition Code of page version
|
|
|
* @param fromThis fromThis
|
|
|
*/
|
|
|
mVersionGetProcessDefinitionVersionsPage ({ pageNo, pageSize, processDefinitionCode, fromThis }) {
|
|
@@ -374,7 +374,7 @@
|
|
|
* delete one version of process definition
|
|
|
*
|
|
|
* @param version the version need to delete
|
|
|
- * @param processDefinitionId the process definition id user want to delete
|
|
|
+ * @param processDefinitionCode the process definition code user want to delete
|
|
|
* @param fromThis fromThis
|
|
|
*/
|
|
|
mVersionDeleteProcessDefinitionVersion ({ version, processDefinitionCode, fromThis }) {
|
|
@@ -421,14 +421,14 @@
|
|
|
|
|
|
_batchExport () {
|
|
|
this.exportDefinition({
|
|
|
- processDefinitionIds: this.strSelectIds,
|
|
|
+ codes: this.strSelectCodes,
|
|
|
fileName: 'process_' + new Date().getTime()
|
|
|
}).then(res => {
|
|
|
this._onUpdate()
|
|
|
this.checkAll = false
|
|
|
- this.strSelectIds = ''
|
|
|
+ this.strSelectCodes = ''
|
|
|
}).catch(e => {
|
|
|
- this.strSelectIds = ''
|
|
|
+ this.strSelectCodes = ''
|
|
|
this.checkAll = false
|
|
|
this.$message.error(e.msg)
|
|
|
})
|
|
@@ -440,8 +440,8 @@
|
|
|
this.relatedItemsDialog = true
|
|
|
this.tmp = false
|
|
|
},
|
|
|
- onBatchCopy (item) {
|
|
|
- this._copyProcess({ id: this.strSelectIds, projectId: item })
|
|
|
+ onBatchCopy (projectCode) {
|
|
|
+ this._copyProcess({ code: this.strSelectCodes, projectCode: projectCode })
|
|
|
this.relatedItemsDialog = false
|
|
|
},
|
|
|
closeRelatedItems () {
|
|
@@ -454,8 +454,8 @@
|
|
|
this.tmp = true
|
|
|
this.relatedItemsDialog = true
|
|
|
},
|
|
|
- onBatchMove (item) {
|
|
|
- this._moveProcess({ id: this.strSelectIds, projectId: item })
|
|
|
+ onBatchMove (projectCode) {
|
|
|
+ this._moveProcess({ code: this.strSelectCodes, projectCode: projectCode })
|
|
|
this.relatedItemsDialog = false
|
|
|
},
|
|
|
/**
|
|
@@ -478,22 +478,22 @@
|
|
|
*/
|
|
|
_arrDelChange (v) {
|
|
|
let arr = []
|
|
|
- arr = _.map(v, 'id')
|
|
|
- this.strSelectIds = _.join(arr, ',')
|
|
|
+ arr = _.map(v, 'code')
|
|
|
+ this.strSelectCodes = _.join(arr, ',')
|
|
|
},
|
|
|
/**
|
|
|
* batch delete
|
|
|
*/
|
|
|
_batchDelete () {
|
|
|
this.batchDeleteDefinition({
|
|
|
- processDefinitionIds: this.strSelectIds
|
|
|
+ codes: this.strSelectCodes
|
|
|
}).then(res => {
|
|
|
this._onUpdate()
|
|
|
this.checkAll = false
|
|
|
- this.strSelectIds = ''
|
|
|
+ this.strSelectCodes = ''
|
|
|
this.$message.success(res.msg)
|
|
|
}).catch(e => {
|
|
|
- this.strSelectIds = ''
|
|
|
+ this.strSelectCodes = ''
|
|
|
this.checkAll = false
|
|
|
this.$message.error(e.msg || '')
|
|
|
})
|
|
@@ -512,7 +512,7 @@
|
|
|
deep: true
|
|
|
},
|
|
|
pageNo () {
|
|
|
- this.strSelectIds = ''
|
|
|
+ this.strSelectCodes = ''
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
@@ -520,7 +520,7 @@
|
|
|
mounted () {
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapState('dag', ['projectId', 'projectCode'])
|
|
|
+ ...mapState('dag', ['projectCode'])
|
|
|
},
|
|
|
components: { mVersions, mStart, mTiming, mRelatedItems }
|
|
|
}
|