|
@@ -182,7 +182,7 @@
|
|
|
required
|
|
|
type="textarea"
|
|
|
v-model:param="state.params.requestBody.str"
|
|
|
- :rows="12"
|
|
|
+ :rows="6"
|
|
|
:rules="[
|
|
|
{
|
|
|
handle: (val) => {
|
|
@@ -563,6 +563,7 @@ import {ElMessage, ElMessageBox} from "element-plus";
|
|
|
import complexRequestParams from './complex-params.vue'
|
|
|
import formatRuleDict from './format-rule-dict.vue'
|
|
|
import {outsideServiceFindById, outsideServiceSaveOrUpdate} from "@/api/modules/manage/service";
|
|
|
+import { v4 } from "uuid";
|
|
|
|
|
|
const emit = defineEmits(['update:show', 'refresh'])
|
|
|
const {proxy} = getCurrentInstance()
|
|
@@ -680,6 +681,8 @@ const titleCpt = computed(() => {
|
|
|
switch (props.transfer.mode) {
|
|
|
case 'add': t = '新增外部服务'
|
|
|
break
|
|
|
+ case 'copy': t = '新增外部服务'
|
|
|
+ break
|
|
|
case 'edit': t = '编辑外部服务'
|
|
|
break
|
|
|
}
|
|
@@ -791,7 +794,6 @@ const onSubmit = () => {
|
|
|
data: state.params.responseBody.other.data.length > 0 ? state.params.responseBody.other.data : null
|
|
|
}
|
|
|
})
|
|
|
- console.log(params)
|
|
|
ElMessageBox.confirm("是否提交?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
@@ -799,7 +801,7 @@ const onSubmit = () => {
|
|
|
} as any).then(() => {
|
|
|
state.loading = true
|
|
|
outsideServiceSaveOrUpdate(params).then(res => {
|
|
|
- ElMessage.success(props.transfer.mode === 'add' ? '新增成功!' : '编辑成功!')
|
|
|
+ ElMessage.success(props.transfer.mode === 'edit' ? '编辑成功!' : '新增成功!')
|
|
|
emit('update:show', false)
|
|
|
emit('refresh')
|
|
|
state.loading = false
|
|
@@ -850,6 +852,10 @@ const initDetail = () => {
|
|
|
state.params.responseBody.other.data = p.other.data || []
|
|
|
} catch (e) {}
|
|
|
}
|
|
|
+ if (props.transfer.mode === 'copy') {
|
|
|
+ state.form.id = ''
|
|
|
+ state.form.serviceName = v4()
|
|
|
+ }
|
|
|
state.loading = false
|
|
|
})
|
|
|
}
|