|
@@ -196,12 +196,12 @@
|
|
|
</el-tabs>
|
|
|
<div slot="footer" class="dialog-footer" style="text-align:right">
|
|
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="handleSave">保 存</el-button>
|
|
|
+ <el-button type="primary" :disabled="savaButtonDisabled" @click="handleSave">保 存</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
-import { ref, defineEmits } from 'vue';
|
|
|
+import { ref, defineEmits, computed } from 'vue';
|
|
|
import { TemplateJsCode } from './jscodetpl.js'
|
|
|
import { Link } from '@element-plus/icons-vue'
|
|
|
import { ServerActionCurrentOpenTab } from "../../../wailsjs/go/main/App"
|
|
@@ -224,6 +224,8 @@ const formData = ref({
|
|
|
|
|
|
// 审核不通过原因
|
|
|
reason: '',
|
|
|
+ // 爬虫状态
|
|
|
+ state: 0,
|
|
|
|
|
|
// list-css-tab
|
|
|
listBodyCss: '',
|
|
@@ -285,6 +287,11 @@ const cssInputBg = {
|
|
|
const activeName = ref("first")
|
|
|
const dialogVisible = ref(false)
|
|
|
|
|
|
+// 待完成和未通过的爬虫可以保存,其他都不可以提交(并禁用保存按钮)
|
|
|
+const canSubmitStatusArr = [0, 2]
|
|
|
+const canSubmit = computed(() => canSubmitStatusArr.includes(formData.value.state))
|
|
|
+const savaButtonDisabled = computed(() => !canSubmit.value)
|
|
|
+
|
|
|
//编辑器事件管理
|
|
|
const editorHandle = {
|
|
|
ImportListCode: () => {
|