|
@@ -31,13 +31,13 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
- <el-form-item prop="requireList" label="平台接入需求">
|
|
|
|
|
- <el-select v-model="formData.requireId" placeholder="请选择" style="width: 320px">
|
|
|
|
|
|
|
+ <el-form-item prop="requireList" label="平台编码">
|
|
|
|
|
+ <el-select v-model="formData.platformCode" placeholder="请选择" style="width: 320px">
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="type in typeOptions"
|
|
|
|
|
- :key="type.id"
|
|
|
|
|
- :label="type.requireName"
|
|
|
|
|
- :value="type.id">
|
|
|
|
|
|
|
+ v-for="type in callModuleOptions"
|
|
|
|
|
+ :key="type.code"
|
|
|
|
|
+ :label="type.code"
|
|
|
|
|
+ :value="type.code">
|
|
|
</el-option>
|
|
</el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -56,7 +56,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import {getPlatformInfo,addPlatformInfo,updatePlatformInfo,queryPlatformRequireList} from "@/api/baseInfo";
|
|
|
|
|
|
|
+import {getPlatformInfo, addPlatformInfo, updatePlatformInfo, callDoc} from "@/api/baseInfo";
|
|
|
import type {FormInstance} from 'element-plus'
|
|
import type {FormInstance} from 'element-plus'
|
|
|
|
|
|
|
|
let dialogVisible = ref(false)
|
|
let dialogVisible = ref(false)
|
|
@@ -64,16 +64,15 @@ let dialogTitle = ref("")
|
|
|
const formRef = ref<FormInstance>()
|
|
const formRef = ref<FormInstance>()
|
|
|
const emit = defineEmits(['dialogChange'])
|
|
const emit = defineEmits(['dialogChange'])
|
|
|
const formData = reactive({
|
|
const formData = reactive({
|
|
|
- platformName: '',
|
|
|
|
|
|
|
+ platformCode: '',
|
|
|
platformType: '',//平台类别 0订单平台/1配送平台,
|
|
platformType: '',//平台类别 0订单平台/1配送平台,
|
|
|
- requireList:null,
|
|
|
|
|
- requireId:"",
|
|
|
|
|
- id: ""
|
|
|
|
|
|
|
+ platformName:'',
|
|
|
|
|
+ id: "",
|
|
|
})
|
|
})
|
|
|
const rules = reactive({
|
|
const rules = reactive({
|
|
|
platformName: [{required: true, message: "请输入平台名称", trigger: "blur"}],
|
|
platformName: [{required: true, message: "请输入平台名称", trigger: "blur"}],
|
|
|
});
|
|
});
|
|
|
-const typeOptions = ref<any>()
|
|
|
|
|
|
|
+let callModuleOptions = ref(new Array<any>())
|
|
|
const optionsList = [
|
|
const optionsList = [
|
|
|
{
|
|
{
|
|
|
id: 1,
|
|
id: 1,
|
|
@@ -89,9 +88,6 @@ const optionsList = [
|
|
|
function handleSubmit() {
|
|
function handleSubmit() {
|
|
|
formRef.value.validate((valid: any) => {
|
|
formRef.value.validate((valid: any) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- console.log(formData.requireId);
|
|
|
|
|
- formData.requireList =typeOptions.value.find(x=> x.id === formData.requireId)
|
|
|
|
|
- console.log(formData.requireList);
|
|
|
|
|
const itemId = formData.id;
|
|
const itemId = formData.id;
|
|
|
if (itemId) {
|
|
if (itemId) {
|
|
|
//修改
|
|
//修改
|
|
@@ -126,7 +122,8 @@ function handleSubmit() {
|
|
|
|
|
|
|
|
function getItemData(item) {
|
|
function getItemData(item) {
|
|
|
const data = {
|
|
const data = {
|
|
|
- idPlatform: item
|
|
|
|
|
|
|
+ id: item,
|
|
|
|
|
+ withDetail: false,
|
|
|
}
|
|
}
|
|
|
getPlatformInfo(data).then(response => {
|
|
getPlatformInfo(data).then(response => {
|
|
|
if (response.httpCode == 200) {
|
|
if (response.httpCode == 200) {
|
|
@@ -136,28 +133,13 @@ function getItemData(item) {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function getRequireList() {
|
|
|
|
|
- const page = {
|
|
|
|
|
- pageIndex: 1,
|
|
|
|
|
- pageSize: 100,
|
|
|
|
|
- };
|
|
|
|
|
- const data = {
|
|
|
|
|
- 'params': JSON.stringify({
|
|
|
|
|
- 'voidFlag': 0
|
|
|
|
|
- }),
|
|
|
|
|
- "page": JSON.stringify(page)
|
|
|
|
|
- }
|
|
|
|
|
- queryPlatformRequireList(data).then((response) => {
|
|
|
|
|
- if (response.httpCode == 200) {
|
|
|
|
|
- const {data} = response
|
|
|
|
|
- typeOptions.value = data
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
-}
|
|
|
|
|
|
|
+
|
|
|
/** 重置表单 */
|
|
/** 重置表单 */
|
|
|
function resetForm() {
|
|
function resetForm() {
|
|
|
formRef.value.resetFields();
|
|
formRef.value.resetFields();
|
|
|
formData.id = ''
|
|
formData.id = ''
|
|
|
|
|
+ formData.platformType = ''
|
|
|
|
|
+ formData.platformCode = ''
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**关闭弹窗 */
|
|
/**关闭弹窗 */
|
|
@@ -166,8 +148,23 @@ function closeDialog() {
|
|
|
formRef.value.resetFields();
|
|
formRef.value.resetFields();
|
|
|
formData.id = undefined;
|
|
formData.id = undefined;
|
|
|
}
|
|
}
|
|
|
|
|
+function getCallDoc() {
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ "businessMethod": "PlateForm_CodeList",
|
|
|
|
|
+ "params": "{}"
|
|
|
|
|
+ }
|
|
|
|
|
+ callDoc(params).then((response) => {
|
|
|
|
|
+ if (response.httpCode == 200) {
|
|
|
|
|
+ const { data } = response
|
|
|
|
|
+ callModuleOptions.value = JSON.parse(data)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
- getRequireList()
|
|
|
|
|
|
|
+ if(callModuleOptions.value.length<=0){
|
|
|
|
|
+ getCallDoc()
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
})
|
|
})
|
|
|
defineExpose({
|
|
defineExpose({
|
|
|
dialogVisible,
|
|
dialogVisible,
|