|
@@ -231,6 +231,10 @@
|
|
:dataset-type-list="datasetTypeList"
|
|
:dataset-type-list="datasetTypeList"
|
|
@openAddForm="openAddForm"
|
|
@openAddForm="openAddForm"
|
|
/>
|
|
/>
|
|
|
|
+ <checkDatasource
|
|
|
|
+ ref="checkDatasource"
|
|
|
|
+ :reasonList="reasonList"
|
|
|
|
+ />
|
|
<component
|
|
<component
|
|
:is="componentData.component"
|
|
:is="componentData.component"
|
|
v-if="datasetType"
|
|
v-if="datasetType"
|
|
@@ -253,12 +257,13 @@ import JsEditForm from './JsEditForm.vue'
|
|
import JsonEditForm from './JsonEditForm.vue'
|
|
import JsonEditForm from './JsonEditForm.vue'
|
|
import table from 'data-room-ui/js/utils/table.js'
|
|
import table from 'data-room-ui/js/utils/table.js'
|
|
import ScriptEditForm from './ScriptEditForm.vue'
|
|
import ScriptEditForm from './ScriptEditForm.vue'
|
|
|
|
+import checkDatasource from 'data-room-ui/DataSourceManagement/src/checkDatasource.vue'
|
|
import CustomEditForm from './CustomEditForm.vue'
|
|
import CustomEditForm from './CustomEditForm.vue'
|
|
import { pageMixins } from 'data-room-ui/js/mixins/page'
|
|
import { pageMixins } from 'data-room-ui/js/mixins/page'
|
|
import OriginalEditForm from './OriginalEditForm.vue'
|
|
import OriginalEditForm from './OriginalEditForm.vue'
|
|
import DatasetTypeDialog from './DatasetTypeDialog.vue'
|
|
import DatasetTypeDialog from './DatasetTypeDialog.vue'
|
|
import StoredProcedureEditForm from './StoredProcedureEditForm.vue'
|
|
import StoredProcedureEditForm from './StoredProcedureEditForm.vue'
|
|
-import { datasetPage, datasetRemove } from 'data-room-ui/js/utils/datasetConfigService'
|
|
|
|
|
|
+import { datasetPage, datasetRemove, datasetCheck } from 'data-room-ui/js/utils/datasetConfigService'
|
|
import { getLabelList } from 'data-room-ui/js/utils/LabelConfigService'
|
|
import { getLabelList } from 'data-room-ui/js/utils/LabelConfigService'
|
|
export default {
|
|
export default {
|
|
name: 'DataSetManagement',
|
|
name: 'DataSetManagement',
|
|
@@ -273,7 +278,8 @@ export default {
|
|
JsonEditForm,
|
|
JsonEditForm,
|
|
StoredProcedureEditForm,
|
|
StoredProcedureEditForm,
|
|
ScriptEditForm,
|
|
ScriptEditForm,
|
|
- JsEditForm
|
|
|
|
|
|
+ JsEditForm,
|
|
|
|
+ checkDatasource
|
|
},
|
|
},
|
|
mixins: [pageMixins],
|
|
mixins: [pageMixins],
|
|
props: {
|
|
props: {
|
|
@@ -305,6 +311,7 @@ export default {
|
|
},
|
|
},
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
|
|
+ reasonList:[],
|
|
datasetType: null,
|
|
datasetType: null,
|
|
isEdit: false,
|
|
isEdit: false,
|
|
categoryData: [],
|
|
categoryData: [],
|
|
@@ -439,18 +446,27 @@ export default {
|
|
},
|
|
},
|
|
// 删除数据集
|
|
// 删除数据集
|
|
delDataset (id) {
|
|
delDataset (id) {
|
|
- this.$confirm('确定删除当前数据集吗?', '提示', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning',
|
|
|
|
- customClass: 'bs-el-message-box'
|
|
|
|
- }).then(() => {
|
|
|
|
- datasetRemove(id).then(res => {
|
|
|
|
- this.init(false)
|
|
|
|
- this.$message.success('删除成功')
|
|
|
|
- })
|
|
|
|
- }).catch(() => {
|
|
|
|
|
|
+ datasetCheck(id).then((res)=>{
|
|
|
|
+ console.log(res)
|
|
|
|
+ if(res.canDelete){
|
|
|
|
+ this.$confirm('确定删除当前数据集吗?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ customClass: 'bs-el-message-box'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ datasetRemove(id).then(res => {
|
|
|
|
+ this.init(false)
|
|
|
|
+ this.$message.success('删除成功')
|
|
|
|
+ })
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ this.reasonList=res.reasons
|
|
|
|
+ this.$refs.checkDatasource.checkDatasourceVisible = true
|
|
|
|
+ }
|
|
})
|
|
})
|
|
|
|
+
|
|
},
|
|
},
|
|
// 详情
|
|
// 详情
|
|
toPreview (id, type, name, typeId) {
|
|
toPreview (id, type, name, typeId) {
|