|
@@ -53,9 +53,11 @@
|
|
|
<el-table-column prop="audit" label="审核状态" width="140">
|
|
<el-table-column prop="audit" label="审核状态" width="140">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<div>
|
|
<div>
|
|
|
- <div v-if="scope.row.audit === '0'||scope.row.audit === null" style="color:#909399">待审核</div>
|
|
|
|
|
|
|
+ <div v-if="scope.row.audit === null||scope.row.audit === ''" style="color:#E6A23C">待申请</div>
|
|
|
|
|
+ <div v-if="scope.row.audit === '0'" style="color:#909399">待审核</div>
|
|
|
<div v-else-if="scope.row.audit === '1'" style="color: #67C23A">审核通过</div>
|
|
<div v-else-if="scope.row.audit === '1'" style="color: #67C23A">审核通过</div>
|
|
|
<div v-else-if="scope.row.audit === '2'" style="color: #F56C6C">驳回</div>
|
|
<div v-else-if="scope.row.audit === '2'" style="color: #F56C6C">驳回</div>
|
|
|
|
|
+ <div v-else-if="scope.row.audit === '3'" style="color: #F56C6C">更新审核</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -64,10 +66,11 @@
|
|
|
<div>
|
|
<div>
|
|
|
<div v-if="scope.row.publish === '0'||scope.row.publish === null" style="color:#909399">未发布</div>
|
|
<div v-if="scope.row.publish === '0'||scope.row.publish === null" style="color:#909399">未发布</div>
|
|
|
<div v-else-if="scope.row.publish === '1'" style="color: #67C23A">已发布</div>
|
|
<div v-else-if="scope.row.publish === '1'" style="color: #67C23A">已发布</div>
|
|
|
|
|
+ <div v-else-if="scope.row.publish === '3'" style="color: #F56C6C">更新发布</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="modifyBy" label="发布时间" width="170"/>
|
|
|
|
|
|
|
+ <el-table-column prop="modifyby" label="注册时间" width="170"/>
|
|
|
<el-table-column prop="version" label="版本" width="120"/>
|
|
<el-table-column prop="version" label="版本" width="120"/>
|
|
|
<el-table-column prop="address" label="操作" width="100">
|
|
<el-table-column prop="address" label="操作" width="100">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
@@ -75,9 +78,9 @@
|
|
|
<!-- <el-button type="primary" @click="showEdit(scope.row)" size="mini" text style="margin-left: 0%;">编辑</el-button> -->
|
|
<!-- <el-button type="primary" @click="showEdit(scope.row)" size="mini" text style="margin-left: 0%;">编辑</el-button> -->
|
|
|
<!-- <el-button type="danger" text size="mini" style="margin-left: -5%;" @click="handleDelete(scope.row)">注销</el-button> -->
|
|
<!-- <el-button type="danger" text size="mini" style="margin-left: -5%;" @click="handleDelete(scope.row)">注销</el-button> -->
|
|
|
<!-- <el-button @click="showDe(scope.row)" type="primary" text size="mini" style="margin-left: -5%;">查看</el-button> -->
|
|
<!-- <el-button @click="showDe(scope.row)" type="primary" text size="mini" style="margin-left: -5%;">查看</el-button> -->
|
|
|
- <el-button @click="showPei(scope.row)" type="warning" text size="mini" style="margin-left: 1%;">配置</el-button>
|
|
|
|
|
|
|
+ <el-button @click="showPei(scope.row)" type="warning" text size="mini" style="margin-left: -5%;">配置</el-button>
|
|
|
<!-- <el-button type="danger" @click="delModel(scope.row)" text size="mini" style="margin-left: -5%;">删除</el-button>
|
|
<!-- <el-button type="danger" @click="delModel(scope.row)" text size="mini" style="margin-left: -5%;">删除</el-button>
|
|
|
- <el-button v-if="scope.row.audit === '0'||scope.row.audit === null" type="info" @click="shenhe(scope.row)" text size="mini" style="margin-left: -5%;">审核申请</el-button> -->
|
|
|
|
|
|
|
+ <el-button v-if="scope.row.audit === null||scope.row.audit === '2'||scope.row.audit === ''" type="info" @click="shenhe(scope.row)" text size="mini" style="margin-left: -5%;">审核申请</el-button> -->
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -545,7 +548,7 @@
|
|
|
<el-descriptions-item label="联系方式:">{{formJi.devContact}}</el-descriptions-item>
|
|
<el-descriptions-item label="联系方式:">{{formJi.devContact}}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="模型参数" style="height: " :key="activeTabKey">
|
|
|
|
|
|
|
+ <el-tab-pane label="模型参数" style="height: ;" :key="activeTabKey">
|
|
|
<div style="display: flex;justify-content: space-between;margin-right: 2%;align-items: center;background-color: #e9e9eb;;width: 100%;">
|
|
<div style="display: flex;justify-content: space-between;margin-right: 2%;align-items: center;background-color: #e9e9eb;;width: 100%;">
|
|
|
<div style="display: flex;align-items: center;margin-left: 1%;">
|
|
<div style="display: flex;align-items: center;margin-left: 1%;">
|
|
|
<el-checkbox v-model="checked1" label="参数是否分组" size="large" @change="gatherTable"/>
|
|
<el-checkbox v-model="checked1" label="参数是否分组" size="large" @change="gatherTable"/>
|
|
@@ -705,6 +708,83 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
|
|
+ <el-tab-pane label="版本信息" style="" :key="activeTabKey">
|
|
|
|
|
+ <div style="display: flex;height:100%;">
|
|
|
|
|
+ <div style="width: 65%;background-color: ;height:100%;">
|
|
|
|
|
+ <div style="font-size: 20px;">
|
|
|
|
|
+ 历史版本信息
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ v-loading="loadVer"
|
|
|
|
|
+ :data="tableDataVer"
|
|
|
|
|
+ style="width: 98%;margin-left: 1%;margin-top: 1%;height: 38vh;"
|
|
|
|
|
+ :cell-style="{ padding:'5px' }"
|
|
|
|
|
+ :header-cell-style="{height: heightAll*0.01+'px',}"
|
|
|
|
|
+ :row-style="{ fontSize: '16px',textAlign:'center'}"
|
|
|
|
|
+ border >
|
|
|
|
|
+ <el-table-column type="index" label="序号" width="80">
|
|
|
|
|
+ <template #default="{ $index }">
|
|
|
|
|
+ <div style="text-align: center;">
|
|
|
|
|
+ {{ $index + 1 }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="fileVersion" label="文件版本" width="100">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="createBy" label="创建人员" width="150">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="jobStatus" label="状态" width="100">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <el-switch @change="changeVerStatus(scope.row)" v-model="scope.row.state" active-value="1" inactive-value="0"/>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="createTime" label="创建时间" show-overflow-tooltip/>
|
|
|
|
|
+ <el-table-column prop="remark" label="说明" width="200" show-overflow-tooltip/>
|
|
|
|
|
+ <el-table-column prop="address" label="操作" width="100">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <div style="display: flex;justify-content: space-between;width: 100%;">
|
|
|
|
|
+ <el-button type="danger" text size="mini" style="margin-left: -5%;" @click="delVer(scope.row)">删除</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div style="width: 35%;background-color: ;height:100%;">
|
|
|
|
|
+ <div style="font-size: 20px;">
|
|
|
|
|
+ 上传新的版本文件
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-upload
|
|
|
|
|
+ ref="uploadRefVer"
|
|
|
|
|
+ :limit="1"
|
|
|
|
|
+ accept=".jar, .ph, .sh, .exe, .zip, .bat"
|
|
|
|
|
+ :headers="upload.headers"
|
|
|
|
|
+ :on-change="handleChangeVer"
|
|
|
|
|
+ :file-list="fileListVer"
|
|
|
|
|
+ :action="upload.url + '?file=' + upload.updateSupport"
|
|
|
|
|
+ :on-success="handleFileSuccessVer"
|
|
|
|
|
+ :auto-upload="false"
|
|
|
|
|
+ drag
|
|
|
|
|
+ style="margin-top:2%"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-icon style="margin-top:3%" class="el-icon--upload"><upload-filled /></el-icon>
|
|
|
|
|
+ <div style="height: 8vh;" class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
|
|
+ </el-upload>
|
|
|
|
|
+ <div style="display: flex;margin-left: 1%;margin-top: 1%;align-items: center;">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ 说明:{{"\u3000"}}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-input v-model="remarkVer" style="width: 50%;margin-left: 1%;" placeholder="" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div style="display: flex;margin-left: 1%;margin-top: 2%;align-items: center;">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ 版本号:
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-input v-model="fileVersion" style="width: 50%;margin-left: 1%;" placeholder="" />
|
|
|
|
|
+ <el-button type="primary" style="margin-left:5%;" @click="addVer">上传</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
</el-tabs>
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
<span class="dialog-footer">
|
|
@@ -736,7 +816,7 @@
|
|
|
style="width: 100%;margin-left: 0%;"
|
|
style="width: 100%;margin-left: 0%;"
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="item in optionsType"
|
|
|
|
|
|
|
+ v-for="item in optionsJieType"
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
:label="item.label"
|
|
|
:value="item.value"
|
|
:value="item.value"
|
|
@@ -754,12 +834,12 @@
|
|
|
<el-col :span="10">
|
|
<el-col :span="10">
|
|
|
<el-form-item label="接口地址:" prop="url">
|
|
<el-form-item label="接口地址:" prop="url">
|
|
|
<el-input v-model="formAdd.url" style="width: 100%;" class="input-with-select">
|
|
<el-input v-model="formAdd.url" style="width: 100%;" class="input-with-select">
|
|
|
- <template #prepend>
|
|
|
|
|
|
|
+ <!-- <template #prepend>
|
|
|
<el-select v-model="formAdd.proxyPath" placeholder="Select" style="width: 115px;">
|
|
<el-select v-model="formAdd.proxyPath" placeholder="Select" style="width: 115px;">
|
|
|
- <el-option v-for="item in gatewayRouters" :key="item.id" :label="item.serviceName"
|
|
|
|
|
|
|
+ <el-option v-for="item in gatewayRouters" :key="item.id" :label="item.uri"
|
|
|
:value="item.predicates"/>
|
|
:value="item.predicates"/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
- </template>
|
|
|
|
|
|
|
+ </template> -->
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -1138,7 +1218,7 @@
|
|
|
{{ detailJson.url }}
|
|
{{ detailJson.url }}
|
|
|
</div>
|
|
</div>
|
|
|
<!-- <svg-icon @click="test" icon-class="startTest" style="margin-left: 1%;width: 50px;height: 25px;cursor: pointer;"/> -->
|
|
<!-- <svg-icon @click="test" icon-class="startTest" style="margin-left: 1%;width: 50px;height: 25px;cursor: pointer;"/> -->
|
|
|
- <el-button @click="test" size="mini" type="primary" style="margin-left: 1%;cursor: pointer;" plain>点击测试</el-button>
|
|
|
|
|
|
|
+ <el-button @click="test" size="mini" type="primary" style="margin-left: 1%;cursor: pointer;" plain>点击调试</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="margin-top:2%;font-size: 18px;">
|
|
<div style="margin-top:2%;font-size: 18px;">
|
|
|
请求参数
|
|
请求参数
|
|
@@ -1182,8 +1262,9 @@
|
|
|
import { getModelList,addModel,delMdid,getModelDetail,updateModel,
|
|
import { getModelList,addModel,delMdid,getModelDetail,updateModel,
|
|
|
addGroup,getParamsList,changePar,delAllPar,getModelParList,delFen,changeShenhe,delModelPar } from "@/api/register/regCom";
|
|
addGroup,getParamsList,changePar,delAllPar,getModelParList,delFen,changeShenhe,delModelPar } from "@/api/register/regCom";
|
|
|
import {getServiceInfo,addService,modelTreeSelect,getSerDe,delService,testService,
|
|
import {getServiceInfo,addService,modelTreeSelect,getSerDe,delService,testService,
|
|
|
- addServiceParam,editService} from "@/api/service/info";
|
|
|
|
|
|
|
+ addServiceParam,editService,delMdfile,startMdfile,addMdfile,getMdfile} from "@/api/service/info";
|
|
|
import { ref, onMounted, onUnmounted, nextTick } from 'vue';
|
|
import { ref, onMounted, onUnmounted, nextTick } from 'vue';
|
|
|
|
|
+import {getGatewayRouters} from "@/api/gateway/gatewayRouters.js";
|
|
|
import { Search } from '@element-plus/icons-vue'
|
|
import { Search } from '@element-plus/icons-vue'
|
|
|
import {
|
|
import {
|
|
|
ArrowLeft,
|
|
ArrowLeft,
|
|
@@ -1200,6 +1281,7 @@ import { editGroup } from "../../../api/register/regCom";
|
|
|
import pinyin from 'pinyin';
|
|
import pinyin from 'pinyin';
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
+const tableDataVer = ref([])
|
|
|
const dialogVisibleFen = ref(false)
|
|
const dialogVisibleFen = ref(false)
|
|
|
const currentHeight = ref(100)
|
|
const currentHeight = ref(100)
|
|
|
const dragTableRef = ref()
|
|
const dragTableRef = ref()
|
|
@@ -1368,6 +1450,7 @@ const downUrl = ref(import.meta.env.VITE_APP_BASE_API)
|
|
|
const tableKey = ref(0);
|
|
const tableKey = ref(0);
|
|
|
const totalComReg = ref()
|
|
const totalComReg = ref()
|
|
|
const parMgid = ref()
|
|
const parMgid = ref()
|
|
|
|
|
+const fileVersion = ref('')
|
|
|
const currentPage = ref(1)
|
|
const currentPage = ref(1)
|
|
|
const tableData2 = ref([
|
|
const tableData2 = ref([
|
|
|
{ date1:'流域拓扑', date2:'', date3:'single', date4:'基于水文响应' },
|
|
{ date1:'流域拓扑', date2:'', date3:'single', date4:'基于水文响应' },
|
|
@@ -1398,6 +1481,24 @@ let tableData = ref([{name:'1'}])
|
|
|
const heightAll = window.innerHeight
|
|
const heightAll = window.innerHeight
|
|
|
const valueHelpSel = '';
|
|
const valueHelpSel = '';
|
|
|
const tableheight = window.innerHeight*0.8
|
|
const tableheight = window.innerHeight*0.8
|
|
|
|
|
+const optionsJieType =ref([
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 'RESTful',
|
|
|
|
|
+ label: 'RESTful',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 'WebService',
|
|
|
|
|
+ label: 'WebService',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 'HTTP',
|
|
|
|
|
+ label: 'HTTP',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 'WebSocket',
|
|
|
|
|
+ label: 'WebSocket',
|
|
|
|
|
+ },
|
|
|
|
|
+])
|
|
|
const optionsType = [
|
|
const optionsType = [
|
|
|
{
|
|
{
|
|
|
value: '1',
|
|
value: '1',
|
|
@@ -1454,6 +1555,8 @@ const optionsEnv = ref([
|
|
|
label: '欧拉',
|
|
label: '欧拉',
|
|
|
},
|
|
},
|
|
|
])
|
|
])
|
|
|
|
|
+const fileListVer = ref([])
|
|
|
|
|
+const uploadRefVer = ref(null)
|
|
|
const uploadRef = ref(null);
|
|
const uploadRef = ref(null);
|
|
|
const fileList = ref([]);
|
|
const fileList = ref([]);
|
|
|
const fileList1 = ref([]);
|
|
const fileList1 = ref([]);
|
|
@@ -1469,6 +1572,9 @@ onMounted(() => {
|
|
|
const handleChange = (file, files) => {
|
|
const handleChange = (file, files) => {
|
|
|
fileList.value = files;
|
|
fileList.value = files;
|
|
|
};
|
|
};
|
|
|
|
|
+const handleChangeVer = (file, files) => {
|
|
|
|
|
+ fileListVer.value = files;
|
|
|
|
|
+};
|
|
|
const handleChange1 = (file, files) => {
|
|
const handleChange1 = (file, files) => {
|
|
|
fileList1.value = files;
|
|
fileList1.value = files;
|
|
|
};
|
|
};
|
|
@@ -1506,6 +1612,11 @@ function getChineseInitials(str) {
|
|
|
});
|
|
});
|
|
|
return result.join('');
|
|
return result.join('');
|
|
|
}
|
|
}
|
|
|
|
|
+function getGate(){
|
|
|
|
|
+ getGatewayRouters().then(res => {
|
|
|
|
|
+ gatewayRouters.value = res.data
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
function shenhe(row){
|
|
function shenhe(row){
|
|
|
var par = {
|
|
var par = {
|
|
|
mdid:row.mdid,
|
|
mdid:row.mdid,
|
|
@@ -1569,16 +1680,36 @@ async function saveEditService() {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
var parCan = tableDataCanAdd.value
|
|
var parCan = tableDataCanAdd.value
|
|
|
if(parCan.length!== 0){
|
|
if(parCan.length!== 0){
|
|
|
- parCan.forEach(item => {
|
|
|
|
|
- item.srvId = parId.value
|
|
|
|
|
- });
|
|
|
|
|
- addServiceParam(parCan).then(res1 => {
|
|
|
|
|
- if (res1.code === 200) {
|
|
|
|
|
- proxy.$modal.msgSuccess("修改成功");
|
|
|
|
|
- dialogVisibleSer.value = false
|
|
|
|
|
- showPei(parRow.value)
|
|
|
|
|
|
|
+ var parRule = true
|
|
|
|
|
+ parCan.forEach((item, index) => {
|
|
|
|
|
+ item.srvId = res.data.srvId
|
|
|
|
|
+ if(item.paramCode&&item.paramType&&item.paramName){
|
|
|
|
|
+ item.parRule = true
|
|
|
|
|
+ }
|
|
|
|
|
+ else{
|
|
|
|
|
+ item.parRule = false
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.paramName === '') {
|
|
|
|
|
+ parCan.splice(index, 1)
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ parCan.forEach((item, index) => {
|
|
|
|
|
+ if(item.parRule===false){
|
|
|
|
|
+ parRule = false
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+ if(parRule){
|
|
|
|
|
+ addServiceParam(parCan).then(res1 => {
|
|
|
|
|
+ if (res1.code === 200) {
|
|
|
|
|
+ proxy.$modal.msgSuccess("修改成功");
|
|
|
|
|
+ dialogVisibleSer.value = false
|
|
|
|
|
+ showPei(parRow.value)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ else{
|
|
|
|
|
+ proxy.$modal.msgError("请填写必填项!");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
else{
|
|
else{
|
|
|
proxy.$modal.msgSuccess("修改成功");
|
|
proxy.$modal.msgSuccess("修改成功");
|
|
@@ -1607,12 +1738,10 @@ function clearAdd(){
|
|
|
exampleAdd.value = ''
|
|
exampleAdd.value = ''
|
|
|
}
|
|
}
|
|
|
async function addSer() {
|
|
async function addSer() {
|
|
|
- console.log(JsonAdd.value)
|
|
|
|
|
var valid
|
|
var valid
|
|
|
await formRefAdd.value.validate((valid1) => {
|
|
await formRefAdd.value.validate((valid1) => {
|
|
|
valid = valid1
|
|
valid = valid1
|
|
|
});
|
|
});
|
|
|
- console.log(valid)
|
|
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
var par = formAdd.value
|
|
var par = formAdd.value
|
|
|
par.example = exampleAdd.value
|
|
par.example = exampleAdd.value
|
|
@@ -1622,29 +1751,92 @@ async function addSer() {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
var parCan = tableDataCanAdd.value
|
|
var parCan = tableDataCanAdd.value
|
|
|
if (tableDataCanAdd.value.length !== 0) {
|
|
if (tableDataCanAdd.value.length !== 0) {
|
|
|
|
|
+ var parRule = true
|
|
|
parCan.forEach((item, index) => {
|
|
parCan.forEach((item, index) => {
|
|
|
item.srvId = res.data.srvId
|
|
item.srvId = res.data.srvId
|
|
|
|
|
+ if(item.paramCode&&item.paramType&&item.paramName){
|
|
|
|
|
+ item.parRule = true
|
|
|
|
|
+ }
|
|
|
|
|
+ else{
|
|
|
|
|
+ item.parRule = false
|
|
|
|
|
+ }
|
|
|
if (item.paramName === '') {
|
|
if (item.paramName === '') {
|
|
|
parCan.splice(index, 1)
|
|
parCan.splice(index, 1)
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- addServiceParam(parCan).then(res1 => {
|
|
|
|
|
- if (res1.code === 200) {
|
|
|
|
|
- proxy.$modal.msgSuccess("新增成功");
|
|
|
|
|
- dialogVisibleSer.value = false
|
|
|
|
|
- showPei(parRow.value)
|
|
|
|
|
|
|
+ parCan.forEach((item, index) => {
|
|
|
|
|
+ if(item.parRule===false){
|
|
|
|
|
+ parRule = false
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+ if(parRule){
|
|
|
|
|
+ addServiceParam(parCan).then(res1 => {
|
|
|
|
|
+ if (res1.code === 200) {
|
|
|
|
|
+ proxy.$modal.msgSuccess("新增成功");
|
|
|
|
|
+ dialogVisibleSer.value = false
|
|
|
|
|
+ showPei(parRow.value)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ else{
|
|
|
|
|
+ proxy.$modal.msgError("请填写必填项!");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+// if(tableDataCanAll.value.length>0){
|
|
|
|
|
+// var parRule = true
|
|
|
|
|
+// tableDataCanAll.value.forEach((item, index, array) => {
|
|
|
|
|
+// item.mdid = parForm.value.mdid
|
|
|
|
|
+// item.parCate = 'int'
|
|
|
|
|
+// if(item.parDefVal&&item.parType&&item.parName&&item.parEnname){
|
|
|
|
|
+// item.parRule = true
|
|
|
|
|
+// }
|
|
|
|
|
+// else{
|
|
|
|
|
+// item.parRule = false
|
|
|
|
|
+// }
|
|
|
|
|
+// })
|
|
|
|
|
+// tableDataCanAll.value.forEach((item, index, array) => {
|
|
|
|
|
+// if(item.parRule===false){
|
|
|
|
|
+// parRule = false
|
|
|
|
|
+// }
|
|
|
|
|
+// })
|
|
|
|
|
+// if(parRule === true){
|
|
|
|
|
+// changePar(tableDataCanAll.value).then(res=>{
|
|
|
|
|
+// if(res.code===200){
|
|
|
|
|
+// proxy.$modal.msgSuccess("修改成功");
|
|
|
|
|
+// dialogVisiblePei.value = false
|
|
|
|
|
+// getModelListTable()
|
|
|
|
|
+// }
|
|
|
|
|
+// })
|
|
|
|
|
+// }
|
|
|
|
|
+// else{
|
|
|
|
|
+// proxy.$modal.msgError("请填写必填项!");
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
function handleBlur(){
|
|
function handleBlur(){
|
|
|
formTree.value.parGroupCode = getChineseInitials(formTree.value.parGroupName)
|
|
formTree.value.parGroupCode = getChineseInitials(formTree.value.parGroupName)
|
|
|
}
|
|
}
|
|
|
|
|
+const loadVer = ref(false)
|
|
|
|
|
+function changeVerStatus(row){
|
|
|
|
|
+ console.log(row)
|
|
|
|
|
+ if(row.state==='1'){
|
|
|
|
|
+ var par = {
|
|
|
|
|
+ fileId:row.fileId,
|
|
|
|
|
+ mdid:parRow.value.mdid
|
|
|
|
|
+ }
|
|
|
|
|
+ startMdfile(par).then(res=>{
|
|
|
|
|
+ loadVer.value = true
|
|
|
|
|
+ if(res.code===200){
|
|
|
|
|
+ proxy.$modal.msgSuccess(res.msg);
|
|
|
|
|
+ showPei(parRow.value)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
function gatherTable(){
|
|
function gatherTable(){
|
|
|
if(checked1.value===false){
|
|
if(checked1.value===false){
|
|
|
var keyArray = []
|
|
var keyArray = []
|
|
@@ -1796,17 +1988,34 @@ function saveChangePar(){
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
if(tableDataCanAll.value.length>0){
|
|
if(tableDataCanAll.value.length>0){
|
|
|
|
|
+ var parRule = true
|
|
|
tableDataCanAll.value.forEach((item, index, array) => {
|
|
tableDataCanAll.value.forEach((item, index, array) => {
|
|
|
item.mdid = parForm.value.mdid
|
|
item.mdid = parForm.value.mdid
|
|
|
item.parCate = 'int'
|
|
item.parCate = 'int'
|
|
|
|
|
+ if(item.parDefVal&&item.parType&&item.parName&&item.parEnname){
|
|
|
|
|
+ item.parRule = true
|
|
|
|
|
+ }
|
|
|
|
|
+ else{
|
|
|
|
|
+ item.parRule = false
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
- changePar(tableDataCanAll.value).then(res=>{
|
|
|
|
|
- if(res.code===200){
|
|
|
|
|
- proxy.$modal.msgSuccess("修改成功");
|
|
|
|
|
- dialogVisiblePei.value = false
|
|
|
|
|
- getModelListTable()
|
|
|
|
|
|
|
+ tableDataCanAll.value.forEach((item, index, array) => {
|
|
|
|
|
+ if(item.parRule===false){
|
|
|
|
|
+ parRule = false
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+ if(parRule === true){
|
|
|
|
|
+ changePar(tableDataCanAll.value).then(res=>{
|
|
|
|
|
+ if(res.code===200){
|
|
|
|
|
+ proxy.$modal.msgSuccess("修改成功");
|
|
|
|
|
+ dialogVisiblePei.value = false
|
|
|
|
|
+ getModelListTable()
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ else{
|
|
|
|
|
+ proxy.$modal.msgError("请填写必填项!");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
else{
|
|
else{
|
|
|
var par = {
|
|
var par = {
|
|
@@ -1822,6 +2031,9 @@ function saveChangePar(){
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
async function showPei(row){
|
|
async function showPei(row){
|
|
|
|
|
+ remarkVer.value = ''
|
|
|
|
|
+ fileVersion.value = ''
|
|
|
|
|
+ tableDataSer.value = []
|
|
|
dialogVisiblePei.value = true
|
|
dialogVisiblePei.value = true
|
|
|
parRow.value = row
|
|
parRow.value = row
|
|
|
var par = {
|
|
var par = {
|
|
@@ -1829,6 +2041,13 @@ async function showPei(row){
|
|
|
}
|
|
}
|
|
|
parId.value = row.mdid
|
|
parId.value = row.mdid
|
|
|
formAdd.value.mdid = row.mdid
|
|
formAdd.value.mdid = row.mdid
|
|
|
|
|
+ loadVer.value = true
|
|
|
|
|
+ await getMdfile(par).then(res=>{
|
|
|
|
|
+ if(res.code===200){
|
|
|
|
|
+ tableDataVer.value = res.rows
|
|
|
|
|
+ loadVer.value = false
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
await getServiceInfo(par).then(res=>{
|
|
await getServiceInfo(par).then(res=>{
|
|
|
if(res.data){
|
|
if(res.data){
|
|
|
tableDataSer.value = res.data.serviceList
|
|
tableDataSer.value = res.data.serviceList
|
|
@@ -1873,6 +2092,7 @@ async function showPei(row){
|
|
|
item.key = Math.random()
|
|
item.key = Math.random()
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
tableDataCanAll.value = JSON.parse(JSON.stringify(tableDataCan.value))
|
|
tableDataCanAll.value = JSON.parse(JSON.stringify(tableDataCan.value))
|
|
|
}
|
|
}
|
|
|
function delCan(index,row){
|
|
function delCan(index,row){
|
|
@@ -1989,6 +2209,10 @@ async function showEdit(row){
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+async function addVer(){
|
|
|
|
|
+ console.log(1111)
|
|
|
|
|
+ await proxy.$refs["uploadRefVer"].submit();
|
|
|
|
|
+}
|
|
|
async function subEdit(){
|
|
async function subEdit(){
|
|
|
if(fileList.value&&fileList.value.length>0&&fileList1.value.length===0){
|
|
if(fileList.value&&fileList.value.length>0&&fileList1.value.length===0){
|
|
|
await proxy.$refs["uploadRef"].submit();
|
|
await proxy.$refs["uploadRef"].submit();
|
|
@@ -2079,6 +2303,23 @@ async function handleFileSuccess(response, file, fileList){
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
+const remarkVer = ref('')
|
|
|
|
|
+async function handleFileSuccessVer(response, file, fileList){
|
|
|
|
|
+ var par = {
|
|
|
|
|
+ mdid:parRow.value.mdid,
|
|
|
|
|
+ fileVersion:fileVersion.value,
|
|
|
|
|
+ filePath:response.originalFilename,
|
|
|
|
|
+ remark:remarkVer.value
|
|
|
|
|
+ }
|
|
|
|
|
+ addMdfile(par).then(res=>{
|
|
|
|
|
+ if(res.code===200){
|
|
|
|
|
+ proxy.$modal.msgSuccess("修改成功");
|
|
|
|
|
+ dialogVisible.value = false
|
|
|
|
|
+ showPei(parRow.value)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ fileListVer.value = []
|
|
|
|
|
+};
|
|
|
function clearFromTree(){
|
|
function clearFromTree(){
|
|
|
formTree.value = {}
|
|
formTree.value = {}
|
|
|
}
|
|
}
|
|
@@ -2091,6 +2332,15 @@ async function delSer(row) {
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+async function delVer(row) {
|
|
|
|
|
+ proxy.$modal.confirm('是否确认删除?').then(function () {
|
|
|
|
|
+ return delMdfile(row.fileId);
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ showPei(parRow.value)
|
|
|
|
|
+ proxy.$modal.msgSuccess("删除成功");
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
function clearForm(){
|
|
function clearForm(){
|
|
|
tableDataCan.value = []
|
|
tableDataCan.value = []
|
|
|
formAdd.value = {
|
|
formAdd.value = {
|
|
@@ -2167,6 +2417,15 @@ function filterModelNodes(nodes) {
|
|
|
}
|
|
}
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
+function maskString(str) {
|
|
|
|
|
+ if (!str || str.length <= 6) {
|
|
|
|
|
+ return str;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return str.replace(/^(.{3})(.*)(.{3})$/, (_, first, middle, last) => {
|
|
|
|
|
+ return first + '*'.repeat(middle.length) + last;
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
function getModelListTable(){
|
|
function getModelListTable(){
|
|
|
tableData.value = []
|
|
tableData.value = []
|
|
|
var par = {
|
|
var par = {
|
|
@@ -2180,11 +2439,15 @@ function getModelListTable(){
|
|
|
tableData.value = res.rows
|
|
tableData.value = res.rows
|
|
|
totalComReg.value = res.total
|
|
totalComReg.value = res.total
|
|
|
formJi.value.sort = res.total+1
|
|
formJi.value.sort = res.total+1
|
|
|
|
|
+ tableData.value.forEach((item,index,array)=>{
|
|
|
|
|
+ item.mdContact = maskString(item.mdContact)
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
const seledMo = ['primary','plain','plain','plain','plain','plain','plain']
|
|
const seledMo = ['primary','plain','plain','plain','plain','plain','plain']
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
getTreeLeft()
|
|
getTreeLeft()
|
|
|
|
|
+ getGate()
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|
|
|
<style scoped>
|
|
<style scoped>
|