浏览代码

fix: 优化数据源管理代码

yanglzh 5 月之前
父节点
当前提交
85b8ac197a
共有 2 个文件被更改,包括 1 次插入19 次删除
  1. 1 7
      src/views/system/datahub/source/component/edit.vue
  2. 0 12
      src/views/system/datahub/source/index.vue

+ 1 - 7
src/views/system/datahub/source/component/edit.vue

@@ -345,7 +345,6 @@ const ruleForm = {
 		{ required: true, message: '请求方法不能为空', trigger: 'change' },
 		{
 			validator: (rule: any, value: string, callback: any) => {
-				console.log(formData.config.method);
 				if (formData.from === 1 && !formData.config.method) {
 					callback(new Error('请求方法不能为空'));
 				} else {
@@ -391,7 +390,7 @@ const onSubmit = async () => {
 			from: formData.from,
 			config: {
 				...formData.config,
-				 requestParams: requestParams.value
+				requestParams: requestParams.value
 			},
 		};
 		const theApi = sourceId.value ? api.common.edit : api.common.add
@@ -432,11 +431,6 @@ const onSubmit = async () => {
 		showDialog.value = false
 		emit('typeList')
 	}
-
-
-
-
-
 }
 
 const resetForm = async () => {

+ 0 - 12
src/views/system/datahub/source/index.vue

@@ -21,12 +21,6 @@
 						</el-icon>
 						查询
 					</el-button>
-					<!-- <el-button v-auth="'reset'" @click="resetQuery()">
-						<el-icon>
-							<ele-Refresh />
-						</el-icon>
-						重置
-					</el-button> -->
 					<el-button v-auth="'add'" type="primary" class="ml10" @click="onOpenAdd">
 						<el-icon>
 							<ele-FolderAdd />
@@ -129,12 +123,6 @@ const onOpenAdd = () => {
 const onOpenEdit = async (row?: any) => {
 	editDicRef.value.openDialog(row)
 }
-// 重置表单
-const resetQuery = () => {
-	queryRef.value.resetFields()
-	getList()
-}
-
 //复制数据
 const copy = (row: any) => {
 	ElMessageBox.confirm('确定要复制该数据吗?', '提示', {