Commit 6c23830c authored by 刘殿昕's avatar 刘殿昕

fix裁剪失败,+数据分析路由,服务测试

parent c29528a9
<template> <template>
<div class="img_crop"> <div class="img_crop">
<div v-for="(item, index) in fileArray" :key="'img' + index" class="list_img"> <div v-for="(item, index) in fileArr" :key="'img' + index" class="list_img">
<div class="list_img_back"> <div class="list_img_back">
<i class="el-icon-refresh-right img_replace"></i> <i class="el-icon-refresh-right img_replace"></i>
<input <input
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</div> </div>
<el-image class="list_img_item" :src="item.url" :fit="fit"></el-image> <el-image class="list_img_item" :src="item.url" :fit="fit"></el-image>
</div> </div>
<div class="add_img" v-if="fileArray.length <= max - 1"> <div class="add_img" v-if="fileArr.length <= max - 1">
<div class="add_pic"> <div class="add_pic">
<i class="el-icon-plus add_icon"></i> <i class="el-icon-plus add_icon"></i>
<input <input
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
import { VueCropper } from "vue-cropper"; import { VueCropper } from "vue-cropper";
export default { export default {
components: { components: {
VueCropper, VueCropper
}, },
props: { props: {
fileArray: { fileArray: {
...@@ -84,6 +84,13 @@ export default { ...@@ -84,6 +84,13 @@ export default {
default: 1 default: 1
} }
}, },
watch: {
fileArray: {
handler(val) {
this.fileArr = val;
}
}
},
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
...@@ -93,7 +100,7 @@ export default { ...@@ -93,7 +100,7 @@ export default {
canMoveBox: true, //截图框不能拖动 canMoveBox: true, //截图框不能拖动
autoCropWidth: 200, //截图框宽度 autoCropWidth: 200, //截图框宽度
autoCropHeight: 200, //截图框高度 autoCropHeight: 200, //截图框高度
centerBox: false, //截图框被限制在图片里面 centerBox: false //截图框被限制在图片里面
}, },
previews: {}, //实时预览图数据 previews: {}, //实时预览图数据
attach: { attach: {
...@@ -101,10 +108,11 @@ export default { ...@@ -101,10 +108,11 @@ export default {
userId: "", userId: "",
customaryUrl: "", //原图片路径 customaryUrl: "", //原图片路径
laterUrl: "", //裁剪后图片路径 laterUrl: "", //裁剪后图片路径
attachType: "photo", //附件类型 attachType: "photo" //附件类型
}, },
fileName: "", //本机文件地址 fileName: "", //本机文件地址
uploadImgRelaPath: "", //上传后图片地址 uploadImgRelaPath: "", //上传后图片地址
fileArr: []
}; };
}, },
methods: { methods: {
...@@ -119,9 +127,6 @@ export default { ...@@ -119,9 +127,6 @@ export default {
//加载图片信息 //加载图片信息
find() { find() {
this.userId = sessionStorage.getItem("userId"); this.userId = sessionStorage.getItem("userId");
this.$http.post("ssapi", this.attach).then((res) => {
console.log(res);
});
}, },
//选择本地图片 //选择本地图片
uploadImg(e, num) { uploadImg(e, num) {
...@@ -134,7 +139,7 @@ export default { ...@@ -134,7 +139,7 @@ export default {
//fileReader 接口,用于异步读取文件数据 //fileReader 接口,用于异步读取文件数据
var reader = new FileReader(); var reader = new FileReader();
reader.readAsDataURL(file); //重要 以dataURL形式读取文件 reader.readAsDataURL(file); //重要 以dataURL形式读取文件
reader.onload = (e) => { reader.onload = e => {
// data = window.URL.createObjectURL(new Blob([e.target.result])) 转化为blob格式 // data = window.URL.createObjectURL(new Blob([e.target.result])) 转化为blob格式
let data = e.target.result; let data = e.target.result;
...@@ -149,23 +154,24 @@ export default { ...@@ -149,23 +154,24 @@ export default {
//确认截图,上传 //确认截图,上传
cut(type) { cut(type) {
var formData = new FormData(); var formData = new FormData();
this.$refs.cropper.getCropBlob((res) => { this.$refs.cropper.getCropBlob(res => {
//res是裁剪后图片的bolb对象 //res是裁剪后图片的bolb对象
formData.append("file", res, this.userId); formData.append("file", res, this.userId);
formData.append("directory", "image"); formData.append("directory", "image");
let url = "/awecloud/static/image/upload"; let url = "/apaas/static/image/upload";
this.$http this.$http
.post(url, formData, { .post(url, formData, {
headers: { "Content-Type": "multipart/form-data" }, headers: { "Content-Type": "multipart/form-data" }
}) })
.then((res) => { .then(res => {
this.fileArr = [{ name: res.data.data, url: res.data.data }];
// 上传图片后服务器返回访问路径 // 上传图片后服务器返回访问路径
this.$emit("getNewUrl", res.data.data); this.$emit("getNewUrl", res.data.data);
this.handleClose(); this.handleClose();
}); });
}); });
}, }
}, }
}; };
</script> </script>
......
...@@ -137,7 +137,7 @@ export default { ...@@ -137,7 +137,7 @@ export default {
{ name: "个人档案", path: "/user/user_info" }, { name: "个人档案", path: "/user/user_info" },
{ name: "消息通知", path: "/user/message" }, { name: "消息通知", path: "/user/message" },
{ name: "收银中心", path: "/authority" }, { name: "收银中心", path: "/authority" },
{ name: "关于BD-aPaaS", path: "" }, { name: "关于BD-aPaaS", path: "/data_analysis" },
{ name: "退出登录", path: "" } { name: "退出登录", path: "" }
], ],
shopping_list: [] shopping_list: []
...@@ -195,7 +195,9 @@ export default { ...@@ -195,7 +195,9 @@ export default {
this.$api.serviceShop.getShoppingCart().then(response => { this.$api.serviceShop.getShoppingCart().then(response => {
if (response.data.success == "1") { if (response.data.success == "1") {
console.log(response.data.data); console.log(response.data.data);
this.shopping_list = response.data.data.valid ? response.data.data.valid.slice(0, 3):[]; this.shopping_list = response.data.data.valid
? response.data.data.valid.slice(0, 3)
: [];
} else { } else {
console.log(response.data.message); console.log(response.data.message);
} }
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
> >
<el-upload <el-upload
slot="append" slot="append"
action="/awecloud/static/image/upload" action="/apaas/static/image/upload"
:file-list="fileArray" :file-list="fileArray"
:limit="1" :limit="1"
:multiple="false" :multiple="false"
......
...@@ -697,7 +697,7 @@ export default { ...@@ -697,7 +697,7 @@ export default {
for (let i = 0; i < arr.length; i++) { for (let i = 0; i < arr.length; i++) {
if (arr[i].id == id) { if (arr[i].id == id) {
arr[i][header] = input; arr[i][header] = input;
arr[i].file_url = url; arr[i].file_url = window.location.href + url;
return false; return false;
} }
if (arr[i].children && arr[i].children.length != 0) { if (arr[i].children && arr[i].children.length != 0) {
......
<template> <template>
<div> <div>
<div v-if="type == 'cropper'"> <div v-if="type == 'cropper'">
<cropper :max="max" :readOnly="readOnly" :fileArray="fileArray" :fit="fit"></cropper> <cropper :max="max" :readOnly="readOnly" :fileArray="fileArray" :fit="fit" @getNewUrl="getNewUrl"></cropper>
</div> </div>
<div v-else> <div v-else>
<el-upload <el-upload
...@@ -174,9 +174,8 @@ export default { ...@@ -174,9 +174,8 @@ export default {
this.$emit("getNewList", this.fileArray); this.$emit("getNewList", this.fileArray);
}, },
getNewUrl(val) { getNewUrl(val) {
this.fileArray = { name: val, url: val }; let fileObj = { name: val, url: val };
this.$emit("getNewList", this.fileArray); this.$emit("getNewList", fileObj);
console.log(this.fileArray);
} }
} }
}; };
......
export const lang={ export const lang = {
// bread crunbs // bread crunbs
// . // .
// . // .
...@@ -13,5 +13,13 @@ export const lang={ ...@@ -13,5 +13,13 @@ export const lang={
byMonth: "按月", byMonth: "按月",
// service shop menu item // service shop menu item
serviceShop: "服务超市" serviceShop: "服务超市",
// work bench
workBench: "工作台",
// data analysis
dataAnalysis: "数据分析中心",
myServiceDataAnalysis: "我的服务数据分析",
myApplicationDataAnalysis: "我的应用数据分析"
} }
\ No newline at end of file
<template>
<div class="fwgl_container">
<side-nav-bar
title="数据分析中心"
imgSrc="tool_fuwu"
:nav-list="navList"
:title-path="navList[0] && navList[0].path"
></side-nav-bar>
<div class="main_container">
<router-view :key="'type_' + $route.params.type"></router-view>
</div>
</div>
</template>
<script>
import sideNavBar from "@/components/side-nav-bar";
export default {
components: {
sideNavBar
},
data: () => ({
userNav: [
{
name: "我的服务数据分析",
path: `/data_analysis/my_service`
},
{
name: "我的应用数据分析",
path: `/data_analysis/my_application`
}
],
navList: []
}),
watch: {
"$route.fullPath"(path) {
this.initNavList();
}
},
methods: {
initNavList() {
this.navList = this.userNav;
}
},
mounted() {
this.initNavList();
}
};
</script>
<style scoped>
.fwgl_container {
height: calc(100vh - 84px);
display: flex;
justify-content: flex-start;
align-items: stretch;
}
.side_nav_bar {
width: 180px;
flex-shrink: 0;
}
.main_container {
width: calc(100% - 180px);
flex-grow: 1;
flex-shrink: 1;
background-color: #f6f7fb;
overflow: auto;
}
</style>
<template>
<div>
<el-breadcrumb separator="/" class="bread_crumb1">
<el-breadcrumb-item :to="{ path: '/data_analysis' }">{{ $t("lang.dataAnalysis") }}</el-breadcrumb-item>
<el-breadcrumb-item>{{ $t("lang.myApplicationDataAnalysis") }}</el-breadcrumb-item>
</el-breadcrumb>
</div>
</template>
<script>
export default {
components: {},
data: () => ({
navList: []
}),
mounted() {},
methods: {}
};
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<div>
<el-breadcrumb separator="/" class="bread_crumb1">
<el-breadcrumb-item :to="{ path: '/data_analysis' }">{{ $t("lang.dataAnalysis") }}</el-breadcrumb-item>
<el-breadcrumb-item>{{ $t("lang.myServiceDataAnalysis") }}</el-breadcrumb-item>
</el-breadcrumb>
</div>
</template>
<script>
export default {
components: {},
data: () => ({
navList: []
}),
mounted() {},
methods: {}
};
</script>
<style scoped>
</style>
\ No newline at end of file
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
break; break;
case "comprehensive_app_list": case "comprehensive_app_list":
this.name = "综合服务"; this.name = "综合服务";
this.urlFilter = "5"; this.urlFilter = "21";
this.url = "/shop/zhfwDetail"; this.url = "/shop/zhfwDetail";
this.filterNmaes = ["数据服务类型", "数据领域", "数据来源机构"]; this.filterNmaes = ["数据服务类型", "数据领域", "数据来源机构"];
break; break;
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
<script> <script>
import OrderList from "@/components/order-list/order-list-com"; import OrderList from "@/components/order-list/order-list-com";
import { mapState } from "vuex";
export default { export default {
components: { components: {
OrderList OrderList
......
...@@ -17,7 +17,7 @@ export default { ...@@ -17,7 +17,7 @@ export default {
data: () => ({ data: () => ({
userNav: [ userNav: [
{ {
name: "哪来的我个人档案", name: "个人档案",
path: `/user/user_info` path: `/user/user_info`
}, },
{ {
......
...@@ -219,9 +219,6 @@ export default { ...@@ -219,9 +219,6 @@ export default {
] ]
}), }),
mounted() { mounted() {
// this.imgList.push(
// "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
// );
this.getCurrentUser(); this.getCurrentUser();
}, },
methods: { methods: {
...@@ -258,6 +255,8 @@ export default { ...@@ -258,6 +255,8 @@ export default {
changeTab() {}, changeTab() {},
getNewList(val) { getNewList(val) {
console.log(val); console.log(val);
this.imgList[0] = val.url;
console.log(this.imgList);
}, },
previous() {}, previous() {},
registe() {}, registe() {},
......
...@@ -176,6 +176,7 @@ ...@@ -176,6 +176,7 @@
:paginationShow="false" :paginationShow="false"
:pageSizeShow="false" :pageSizeShow="false"
headerCellClassName="th_pink" headerCellClassName="th_pink"
@primary-del="delItemQq"
></ces-table> ></ces-table>
</div> </div>
<div v-show="zhfwQqt == 'x-www-form-urlencoded'"> <div v-show="zhfwQqt == 'x-www-form-urlencoded'">
...@@ -205,7 +206,7 @@ ...@@ -205,7 +206,7 @@
</div> </div>
</block-radius> </block-radius>
<block-radius v-show="resultShow"> <block-radius v-show="resultShow">
<div v-show="activeBtn == 0 && resSuccess"> <div v-show="(activeBtn == 0 || activeBtn == 4 && zhyyVal == 0) && resSuccess">
<div class="sjfw_qqcstx">请求参数信息填写:</div> <div class="sjfw_qqcstx">请求参数信息填写:</div>
<ces-table <ces-table
ref="fwcs_sjfw_qqcs" ref="fwcs_sjfw_qqcs"
...@@ -226,7 +227,6 @@ ...@@ -226,7 +227,6 @@
:paginationShow="false" :paginationShow="false"
:pageSizeShow="false" :pageSizeShow="false"
headerCellClassName="th_pink" headerCellClassName="th_pink"
@primary-del="delItemQq"
></ces-table> ></ces-table>
<div class="sjfw_fhcstx">返回参数信息填写:</div> <div class="sjfw_fhcstx">返回参数信息填写:</div>
<ces-table <ces-table
...@@ -248,10 +248,9 @@ ...@@ -248,10 +248,9 @@
:paginationShow="false" :paginationShow="false"
:pageSizeShow="false" :pageSizeShow="false"
headerCellClassName="th_pink" headerCellClassName="th_pink"
@primary-del="delItemFh"
></ces-table> ></ces-table>
</div> </div>
<div v-show="(activeBtn == 1 || activeBtn == 4) && resSuccess"> <div v-show="(activeBtn == 1 || activeBtn == 4 && zhyyVal != 0) && resSuccess">
<div class="skfw_csfwxx">测试服务信息:</div> <div class="skfw_csfwxx">测试服务信息:</div>
<div class="test_succ"> <div class="test_succ">
<div class="skcs_jg"> <div class="skcs_jg">
...@@ -269,19 +268,19 @@ ...@@ -269,19 +268,19 @@
</div> </div>
<div class="btn_footer"> <div class="btn_footer">
<el-button class="reset" v-if="activeBtn == 0" @click="resetSjfw">重置</el-button> <el-button class="reset" v-if="activeBtn == 0" @click="resetSjfw">重置</el-button>
<el-button :disabled="!resSuccess" class="next" @click="nextJcxx">下一步</el-button> <el-button :disabled="!resSuccess" :class="resSuccess ? 'next':''" @click="nextJcxx">下一步</el-button>
</div> </div>
</block-radius> </block-radius>
</div> </div>
<div v-else> <div v-else>
<block-radius> <block-radius>
<div class="fwcs_add"> <div class="fwcs_add">
<el-form ref="form" :model="form" label-width="0px"> <el-form ref="form" :model="form" :rules="rules">
<el-form-item> <el-form-item prop="name">
<p class="formname">服务名称:</p> <p class="formname">服务名称:</p>
<el-input v-model="form.name" placeholder="请输入服务名称,不超过15个字" class="form_in"></el-input> <el-input v-model="form.name" placeholder="请输入服务名称,不超过15个字" class="form_in"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item prop="desc">
<p class="formname">服务描述:</p> <p class="formname">服务描述:</p>
<el-input <el-input
type="textarea" type="textarea"
...@@ -290,25 +289,25 @@ ...@@ -290,25 +289,25 @@
class="form_in" class="form_in"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item prop="area">
<p class="formname">服务领域:</p> <p class="formname">服务领域:</p>
<el-select v-model="form.area" placeholder="请选择" class="form_in"> <el-select v-model="form.area" placeholder="请选择" class="form_in">
<el-option <el-option
v-for="item in optionsArea" v-for="item in optionsArea"
:key="'area' + item.value" :key="item.id"
:label="item.label" :label="item.name"
:value="item.value" :value="item.id"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item prop="origin">
<p class="formname">所属组织:</p> <p class="formname">所属组织:</p>
<el-select v-model="form.origin" placeholder="请选择" class="form_in"> <el-select v-model="form.origin" placeholder="请选择" class="form_in">
<el-option <el-option
v-for="item in optionsOrganization" v-for="item in optionsOrganization"
:key="item.value" :key="item.department_id"
:label="item.label" :label="item.department_name"
:value="item.value" :value="item.department_id"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -319,7 +318,7 @@ ...@@ -319,7 +318,7 @@
:max="1" :max="1"
type="cropper" type="cropper"
:readOnly="false" :readOnly="false"
:list="imgList" :list="cover"
@getNewList="getNewList" @getNewList="getNewList"
></upload-file> ></upload-file>
</el-form-item> </el-form-item>
...@@ -327,7 +326,7 @@ ...@@ -327,7 +326,7 @@
<p class="formname">接口编码:</p> <p class="formname">接口编码:</p>
<el-input v-model="form.code" class="form_in" :disabled="true"></el-input> <el-input v-model="form.code" class="form_in" :disabled="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item prop="resource">
<p class="formname">开放程度:</p> <p class="formname">开放程度:</p>
<el-radio-group v-model="form.resource"> <el-radio-group v-model="form.resource">
<el-radio :label="1">共享</el-radio> <el-radio :label="1">共享</el-radio>
...@@ -359,193 +358,180 @@ export default { ...@@ -359,193 +358,180 @@ export default {
"v-apaas-code": Codes, "v-apaas-code": Codes,
uploadFile uploadFile
}, },
data: () => ({ data() {
btnList: [ return {
{ icon: "", text: "数据服务", id: 0 }, btnList: [
{ icon: "", text: "时空服务", id: 1 }, { icon: "", text: "数据服务", id: 0 },
{ icon: "", text: "视频服务", id: 2 }, { icon: "", text: "时空服务", id: 1 },
{ icon: "", text: "感知服务", id: 3 }, { icon: "", text: "视频服务", id: 2 },
{ icon: "", text: "综合服务", id: 4 } { icon: "", text: "感知服务", id: 3 },
], { icon: "", text: "综合服务", id: 4 }
activeBtn: 0, ],
serviceUrl: "", activeBtn: 0,
select: "GET", serviceUrl: "",
optionType: [ select: "GET",
{ label: "GET", value: "GET" }, optionType: [
{ label: "POST", value: "POST" }, { label: "GET", value: "GET" },
{ label: "PUT", value: "PUT" }, { label: "POST", value: "POST" },
{ label: "DELETE", value: "DELETE" } { label: "PUT", value: "PUT" },
], { label: "DELETE", value: "DELETE" }
activeName: 0, ],
activeZh: 0, activeName: 0,
sjfwQqcs: [ activeZh: 0,
{ sjfwQqcs: [
label: "请求字段编码", {
prop: "requestEncoding", label: "请求字段编码",
type: "input", prop: "requestEncoding",
align: "left" type: "input",
}, align: "left"
{ label: "请求值", prop: "requestValue", type: "input", align: "left" } },
], { label: "请求值", prop: "requestValue", type: "input", align: "left" }
sjfwQqcstx: [ ],
{ label: "字段编码", prop: "name", type: "", align: "left" }, sjfwQqcstx: [
{ label: "示例值", prop: "example", type: "input", align: "left" }, { label: "字段编码", prop: "name", type: "", align: "left" },
{ { label: "示例值", prop: "example", type: "input", align: "left" },
label: "字段类型", {
prop: "show_type", label: "字段类型",
type: "", prop: "show_type",
align: "left", type: "",
width: "140" align: "left",
}, width: "140"
{ },
label: "字段名称*", {
prop: "label", label: "字段名称*",
type: "input", prop: "label",
align: "left" type: "input",
}, align: "left"
{ },
label: "是否必须*", {
prop: "is_must", label: "是否必须*",
type: "select", prop: "is_must",
align: "left", type: "select",
width: 100, align: "left",
selectArr: [ width: 100,
{ label: "", value: "1" }, selectArr: [
{ label: "", value: "0" } { label: "", value: "1" },
] { label: "", value: "0" }
}, ]
{ label: "字段说明", prop: "descript", type: "input", align: "left" }, },
{ { label: "字段说明", prop: "descript", type: "input", align: "left" }
label: "操作", ],
type: "Button", sjfwFhcstx: [
align: "center", { label: "字段编码", prop: "name", type: "", align: "left" },
width: 100, { label: "示例值", prop: "example", type: "input", align: "left" },
btnList: [ { label: "字段类型", prop: "show_type", type: "", align: "left" },
{ {
type: "primary-del", label: "字段名称*",
label: "删除" prop: "label",
} type: "input",
] align: "left"
} },
], { label: "字段说明", prop: "descript", type: "input", align: "left" }
sjfwFhcstx: [ ],
{ label: "字段编码", prop: "name", type: "", align: "left" }, zhfwQqcsForm: [
{ label: "示例值", prop: "example", type: "input", align: "left" }, { label: "请求字段编码", prop: "key", type: "input", align: "left" },
{ label: "字段类型", prop: "show_type", type: "", align: "left" }, {
{ label: "参数类型",
label: "字段名称*", prop: "field_type",
prop: "label", type: "select",
type: "input", align: "center",
align: "left" width: 100,
selectArr: [
{ label: "text", value: "text" },
{ label: "file", value: "file" }
]
},
{
label: "请求值",
prop: "val",
type: "upload",
align: "center",
uploadKey: "field_type"
},
{
label: "操作",
type: "Button",
align: "center",
width: 100,
btnList: [
{
type: "primary-del",
label: "删除"
}
]
}
],
datasZhForm: [],
datasZhwww: [],
emptyText: "暂无数据",
resultShow: false,
resSuccess: false,
optionsSq: [{ label: "Bearer Token", value: "Bearer" }],
sqfsVal: "",
tokenVal: "",
sjfwQqt: "JSON",
zhfwQqt: "JSON",
skfwRadios: [
"ArcGIS Server Web",
"文档",
"KML",
"OGC(WMS)",
"OGS(WMTS)",
"OGS(WFS)",
"OGS(WCS)"
],
optionsZhyy: [
{ label: "模型算法类", value: 0 },
{ label: "查询验证类", value: 1 },
{ label: "流程类", value: 2 },
{ label: "应用类", value: 3 }
],
zhyyVal: 0,
jcxxtx: false,
form: {
name: "",
desc: "",
area: "",
origin: "",
code: "自动生成",
resource: 1
}, },
{ label: "字段说明", prop: "descript", type: "input", align: "left" }, rules: {
{ name: [
label: "操作", { required: true, message: "请输入服务名称", trigger: "blur" },
type: "Button", { min: 0, max: 15, message: "服务名称不超过15个字", trigger: "blur" }
align: "center", ],
width: 100, desc: [
btnList: [ { required: true, message: "请输入服务描述", trigger: "blur" },
{ {
type: "primary-del", min: 0,
label: "删除" max: 200,
message: "服务描述不超过200个字",
trigger: "blur"
} }
] ],
} area: [{ required: true, message: "请选择服务领域", trigger: "blur" }],
], origin: [
zhfwQqcsForm: [ { required: true, message: "请选择所属组织", trigger: "blur" }
{ label: "请求字段编码", prop: "key", type: "input", align: "left" }, ],
{ resource: [
label: "参数类型", { required: true, message: "请选择开放程度", trigger: "blur" }
prop: "field_type",
type: "select",
align: "center",
width: 100,
selectArr: [
{ label: "text", value: "text" },
{ label: "file", value: "file" }
] ]
}, },
{ cover: [],
label: "请求值", optionsArea: [],
prop: "val", optionsOrganization: [],
type: "upload", datasSj: [],
align: "center", datasZh: [],
uploadKey: "field_type" datasQqcs: [],
}, datasFhcs: [],
{ request_fields: [],
label: "操作", response_fields: [],
type: "Button", noSearchUrl: "",
align: "center", requestRules: 0,
width: 100, responseRules: 0
btnList: [ };
{ },
type: "primary-del",
label: "删除"
}
]
}
],
datasZhForm: [],
datasZhwww: [],
emptyText: "暂无数据",
resultShow: false,
resSuccess: false,
optionsSq: [{ label: "Bearer Token", value: "Bearer" }],
sqfsVal: "",
tokenVal: "",
sjfwQqt: "JSON",
zhfwQqt: "JSON",
skfwRadios: [
"ArcGIS Server Web",
"文档",
"KML",
"OGC(WMS)",
"OGS(WMTS)",
"OGS(WFS)",
"OGS(WCS)"
],
optionsZhyy: [
{ label: "模型算法类", value: 0 },
{ label: "查询验证类", value: 1 },
{ label: "流程类", value: 2 },
{ label: "应用类", value: 3 }
],
zhyyVal: 0,
jcxxtx: false,
form: {
name: "",
desc: "",
area: "",
origin: "1",
code: "自动生成",
resource: 0
},
imgList: [],
optionsArea: [
{ label: "经济建设", value: 0 },
{ label: "城市管理", value: 1 },
{ label: "城市建设", value: 2 },
{ label: "道路交通", value: 3 },
{ label: "环境资源", value: 4 },
{ label: "民生服务", value: 5 },
{ label: "空间地理", value: 6 },
{ label: "文化休闲", value: 7 },
{ label: "社会团体", value: 8 },
{ label: "教育机构", value: 9 },
{ label: "其他", value: 10 }
],
optionsOrganization: [],
datasSj: [],
datasZh: [],
datasQqcs: [],
datasFhcs: [],
request_fields: [],
response_fields: [],
cover: "",
noSearchUrl: "",
requestRules: 0,
responseRules: 0
}),
computed: {}, computed: {},
watch: {}, watch: {},
methods: { methods: {
...@@ -647,10 +633,12 @@ export default { ...@@ -647,10 +633,12 @@ export default {
if (this.zhfwQqt == "JSON") { if (this.zhfwQqt == "JSON") {
bodys = this.$refs.zhfwJsonCodes.getCodesVal(); bodys = this.$refs.zhfwJsonCodes.getCodesVal();
} else if (this.zhfwQqt == "form-data") { } else if (this.zhfwQqt == "form-data") {
let request = this.$refs.fwcs_zhfw_qq_form.getTableData(); let request = this.$refs.fwcs_zhfw_qq_form.getTableData().concat();
request.pop();
bodys = JSON.stringify(request); bodys = JSON.stringify(request);
} else if (this.zhfwQqt == "x-www-form-urlencoded") { } else if (this.zhfwQqt == "x-www-form-urlencoded") {
let request = this.$refs.fwcs_zhfw_www.getTableData(); let request = this.$refs.fwcs_zhfw_www.getTableData().concat();
request.pop();
bodys = JSON.stringify(request); bodys = JSON.stringify(request);
} }
} }
...@@ -664,7 +652,6 @@ export default { ...@@ -664,7 +652,6 @@ export default {
content_type: contentType content_type: contentType
}; };
this.$api.workbench.fwzcFwcs(query).then(response => { this.$api.workbench.fwzcFwcs(query).then(response => {
console.log(response);
if (response.data.success == 1) { if (response.data.success == 1) {
let data = response.data.data; let data = response.data.data;
if (this.activeBtn == 0 && this.activeName == 1) { if (this.activeBtn == 0 && this.activeName == 1) {
...@@ -678,7 +665,7 @@ export default { ...@@ -678,7 +665,7 @@ export default {
} else { } else {
this.resSuccess = false; this.resSuccess = false;
this.resultShow = true; this.resultShow = true;
console.log(response.data.console.error); console.log(response.data.errMsg);
} }
}); });
}, },
...@@ -723,7 +710,7 @@ export default { ...@@ -723,7 +710,7 @@ export default {
}, },
// edit form // edit form
getNewList(val) { getNewList(val) {
this.cover = val; this.cover[0] = val.url;
}, },
previous() { previous() {
this.datasQqcs = this.request_fields; this.datasQqcs = this.request_fields;
...@@ -731,32 +718,42 @@ export default { ...@@ -731,32 +718,42 @@ export default {
this.jcxxtx = false; this.jcxxtx = false;
}, },
registe() { registe() {
let query = { this.$refs.form.validate(valid => {
name: this.form.name, if (valid) {
sectors: this.form.area, if (this.cover.length == 0) {
organization: this.form.origin, let query = {
cover: this.cover[0].url, name: this.form.name,
openness: this.form.resource, sectors: this.form.area,
descript: this.form.desc, organization: this.form.origin,
data_service_type1: this.activeBtn, cover: this.cover[0],
data_service_type2: openness: this.form.resource,
this.activeBtn == 1 descript: this.form.desc,
? this.skfwRadios data_service_type1: this.activeBtn,
: this.activeBtn == 4 data_service_type2:
? this.zhyyVal this.activeBtn == 1
: 0, ? this.skfwRadios
encode_method: this.form.code, : this.activeBtn == 4
method: this.select, ? this.zhyyVal
url: this.serviceUrl, : 0,
request_fields: this.request_fields, encode_method: this.form.code,
response_fields: this.response_fields method: this.select,
}; url: this.serviceUrl,
this.$api.workbench.serviceAdd(query).then(response => { request_fields: this.request_fields,
if (response.data.success == 1) { response_fields: this.response_fields
this.$message.success("服务注册成功"); };
this.$api.workbench.serviceAdd(query).then(response => {
if (response.data.success == 1) {
this.$message.success("服务注册成功");
} else {
console.log(response.data.errMsg);
this.$message.error(response.data.errMsg);
}
});
} else {
this.$message.error("请上传服务封面");
}
} else { } else {
console.log(response.data.errMsg); this.$message.error("请完善服务基本信息");
this.$message.success(response.data.errMsg);
} }
}); });
}, },
...@@ -776,11 +773,7 @@ export default { ...@@ -776,11 +773,7 @@ export default {
this.serviceUrl = this.noSearchUrl + searchDel; this.serviceUrl = this.noSearchUrl + searchDel;
}, },
delItemQq(val) { delItemQq(val) {
let arr = this.$refs.fwcs_sjfw_qqcs.getTableData(); let arr = this.$refs.fwcs_zhfw_qq_form.getTableData();
this.delById(arr, val.id);
},
delItemFh(val) {
let arr = this.$refs.fwcs_sjfw_fhcs.getTableData();
this.delById(arr, val.id); this.delById(arr, val.id);
}, },
delById(arr, id) { delById(arr, id) {
...@@ -799,9 +792,30 @@ export default { ...@@ -799,9 +792,30 @@ export default {
this.resultShow = false; this.resultShow = false;
this.resSuccess = false; this.resSuccess = false;
}, },
changeZhfwQqt() {} changeZhfwQqt() {},
getOrg() {
this.$api.authority.getOrganizationList().then(response => {
if (response.data.success == 1) {
this.optionsOrganization = response.data.data;
} else {
console.log(response.data.errMsg);
}
});
},
getArea() {
this.$api.workbench.getServiceAreaList().then(response => {
if (response.data.success == 1) {
this.optionsArea = response.data.data;
} else {
console.log(response.data.errMsg);
}
});
}
}, },
mounted() {} mounted() {
this.getOrg();
this.getArea();
}
}; };
</script> </script>
......
...@@ -22,7 +22,10 @@ const authority = { ...@@ -22,7 +22,10 @@ const authority = {
return axios.put(`/apaas/backmgt/menu`, params); return axios.put(`/apaas/backmgt/menu`, params);
}, },
// // organization
getOrganizationList() {
return axios.get(`/apaas/backmgt/department/list`);
},
} }
export default authority; export default authority;
...@@ -32,6 +32,7 @@ Page=${params.Page}&Size=${params.Size}`); ...@@ -32,6 +32,7 @@ Page=${params.Page}&Size=${params.Size}`);
return axios.get(`/apaas/hubApi/market/list?online_state=${params.online_state}&appTypes=${params.appTypes}& return axios.get(`/apaas/hubApi/market/list?online_state=${params.online_state}&appTypes=${params.appTypes}&
businessArea=${params.businessArea}&developable=${params.developable}&orgSource=${params.orgSource}&order=${params.order}&page=${params.page}&limit=${params.limit}&search=${params.search}`); businessArea=${params.businessArea}&developable=${params.developable}&orgSource=${params.orgSource}&order=${params.order}&page=${params.page}&limit=${params.limit}&search=${params.search}`);
}, },
// shopping cart // shopping cart
addShoppingCart(params) { addShoppingCart(params) {
return axios.post(`/apaas/serviceapp/v3/shopcart/add`, params); return axios.post(`/apaas/serviceapp/v3/shopcart/add`, params);
......
...@@ -7,7 +7,12 @@ const workbench = { ...@@ -7,7 +7,12 @@ const workbench = {
}, },
serviceAdd(params) { serviceAdd(params) {
return axios.post(`/apaas/service/v3/service/manager`, params) return axios.post(`/apaas/service/v3/service/manager`, params)
} },
// service area
getServiceAreaList() {
return axios.get(`/apaas/service/v3/service/manager/servarea`)
},
} }
export default workbench; export default workbench;
...@@ -316,6 +316,24 @@ export default new Router({ ...@@ -316,6 +316,24 @@ export default new Router({
}, },
], ],
}, // 权限管理 }, // 权限管理
{
path: "/data_analysis", // 数据分析中心
name: "dataAnalysis",
redirect: "/data_analysis/my_service",
component: () => import("@/pages/data-analysis/data-analysis"),
children: [
{
path: "/data_analysis/my_service", // 数据分析中心
name: "myServiceDataAnalysis",
component: () => import("@/pages/data-analysis/my-service"),
},
{
path: "/data_analysis/my_application", // 数据分析中心
name: "myApplicationDataAnalysis",
component: () => import("@/pages/data-analysis/my-application"),
}
]
}
], ],
}, },
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment