Commit b6c8c210 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 153cf177 542a9cd2
<template> <template>
<div class="myUploadFile"> <div class="myUploadFile">
<a-upload :name="defaultInfo.name" :action="defaultInfo.action" :listType="defaultInfo.listType" <a-upload
:name="defaultInfo.name"
:action="defaultInfo.action"
:listType="defaultInfo.listType"
:multiple="defaultInfo.multiple"
:showUploadList="defaultInfo.showUploadList"
:defaultFileList="defaultInfo.defaultFileList"
:file-list="defaultInfo.fileList"
:disabled="defaultInfo.disabled"
:directory="defaultInfo.directory"
:data="defaultInfo.objAttach"
:headers="headers"
:remove="uploadRemove"
@change="uploadChange"
@preview="handlePreview"
>
<slot></slot>
</a-upload>
<!-- <a-upload :name="defaultInfo.name" :action="defaultInfo.action" :listType="defaultInfo.listType"
:multiple="defaultInfo.multiple" :showUploadList="defaultInfo.showUploadList" :multiple="defaultInfo.multiple" :showUploadList="defaultInfo.showUploadList"
:defaultFileList="defaultInfo.defaultFileList" :file-list="defaultInfo.fileList" :disabled="defaultInfo.disabled" :defaultFileList="defaultInfo.defaultFileList" :file-list="defaultInfo.fileList" :disabled="defaultInfo.disabled"
:directory="defaultInfo.directory" :data="defaultInfo.objAttach" :headers="headers" :directory="defaultInfo.directory" :data="defaultInfo.objAttach" :headers="headers"
:beforeUpload="beforeImageUpload" :remove="uploadRemove" @change="uploadChange" @preview="handlePreview"> :beforeUpload="beforeImageUpload" :remove="uploadRemove" @change="uploadChange" @preview="handlePreview">
<slot></slot> <slot></slot>
</a-upload> </a-upload> -->
<a-modal :visible="defaultInfo.previewVisible" :footer="null" @cancel="defaultInfo.previewVisible = false"> <a-modal
:visible="defaultInfo.previewVisible"
:footer="null"
@cancel="defaultInfo.previewVisible = false"
>
<img alt="example" style="width: 100%" :src="defaultInfo.previewImage" /> <img alt="example" style="width: 100%" :src="defaultInfo.previewImage" />
</a-modal> </a-modal>
</div> </div>
...@@ -68,18 +90,15 @@ export default { ...@@ -68,18 +90,15 @@ export default {
"action" "action"
] = `${this.fileCommonupload}?prePath=${this.defaultInfo["prePath"]}`; ] = `${this.fileCommonupload}?prePath=${this.defaultInfo["prePath"]}`;
} else { } else {
this.defaultInfo[ this.defaultInfo["action"] = `${this.fileCommonupload}`;
"action"
] = `${this.fileCommonupload}`;
} }
console.log(this.defaultInfo);
}, },
deep: true, deep: true,
immediate: true, immediate: true,
}, },
}, },
created() { }, created() {},
methods: { methods: {
uploadRemove(file) { uploadRemove(file) {
if (file.id != undefined) { if (file.id != undefined) {
...@@ -88,8 +107,8 @@ export default { ...@@ -88,8 +107,8 @@ export default {
this.defaultInfo.fileList = this.defaultInfo.fileList.filter( this.defaultInfo.fileList = this.defaultInfo.fileList.filter(
(item) => item.uid != file.uid (item) => item.uid != file.uid
); );
console.log(this.defaultInfo.fileList.length,"=--------") console.log(this.defaultInfo.fileList.length, "=--------");
if(!this.defaultInfo.fileList.length){ if (!this.defaultInfo.fileList.length) {
this.$emit("input", ""); //相对地址 this.$emit("input", ""); //相对地址
} }
}, },
...@@ -117,7 +136,7 @@ export default { ...@@ -117,7 +136,7 @@ export default {
return result; return result;
}, },
uploadChange({ file, fileList }) { uploadChange({ file, fileList }) {
console.log(fileList) console.log(fileList);
if (file.status === "error") { if (file.status === "error") {
return; return;
this.$message.error(`${file.name} 上传失败.`); this.$message.error(`${file.name} 上传失败.`);
...@@ -164,4 +183,4 @@ export default { ...@@ -164,4 +183,4 @@ export default {
margin-top: 8px; margin-top: 8px;
color: #666; color: #666;
} }
</style> </style>
\ No newline at end of file
...@@ -153,6 +153,7 @@ export default { ...@@ -153,6 +153,7 @@ export default {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
padding-bottom: 10px; padding-bottom: 10px;
text-align: center;
} }
.remark { .remark {
font-size: 14px; font-size: 14px;
...@@ -168,4 +169,4 @@ export default { ...@@ -168,4 +169,4 @@ export default {
} }
} }
} }
</style> </style>
\ No newline at end of file
...@@ -348,9 +348,9 @@ export default { ...@@ -348,9 +348,9 @@ export default {
title: '性别分布', title: '性别分布',
xData: ['', ''], xData: ['', ''],
data: [ data: [
{ name: '自助服务系统注册人数', type: 'bar', data: [man[1].count, woman[1].count] }, { name: '自助服务系统注册人数', type: 'bar', data: [man[1].count || 0, woman[1].count || 0] },
{ name: '微官网注册人数', type: 'bar', data: [man[2].count, woman[2].count] }, { name: '微官网注册人数', type: 'bar', data: [man[2].count || 0, woman[2].count || 0] },
{ name: '排队系统注册人数', type: 'bar', data: [man[0].count, woman[0].count] }, { name: '排队系统注册人数', type: 'bar', data: [man[0].count || 0, woman[0].count || 0] },
] ]
} }
} }
...@@ -460,9 +460,9 @@ export default { ...@@ -460,9 +460,9 @@ export default {
title: '性别分布', title: '性别分布',
xData: ['', ''], xData: ['', ''],
data: [ data: [
{ name: '自助服务系统注册人数', type: 'bar', data: [man[1].nums, woman[1].nums] }, { name: '自助服务系统注册人数', type: 'bar', data: [man[1].nums || 0, woman[1].nums || 0] },
{ name: '微官网注册人数', type: 'bar', data: [man[2].nums, woman[2].nums] }, { name: '微官网注册人数', type: 'bar', data: [man[2].nums || 0, woman[2].nums || 0] },
{ name: '排队系统注册人数', type: 'bar', data: [man[0].nums, woman[0].nums] }, { name: '排队系统注册人数', type: 'bar', data: [man[0].nums || 0, woman[0].nums || 0] },
] ]
} }
} }
...@@ -470,8 +470,6 @@ export default { ...@@ -470,8 +470,6 @@ export default {
//办件年龄分析 //办件年龄分析
async getAgeRate() { async getAgeRate() {
let res = await ageRate({ siteid: localStorage.getItem('siteId'), selected: 2 }) let res = await ageRate({ siteid: localStorage.getItem('siteId'), selected: 2 })
// console.log(res)
// console.log(res)
let age_area = res.data.list.map(i => { let age_area = res.data.list.map(i => {
return i.age_area return i.age_area
}) })
......
<template> <template>
<div class="Container"> <div class="Container">
<a-carousel
effect="fade"
autoplay
:autoplaySpeed="2400"
:dots="false"
style="width: 100%; overflow: hidden; position: absolute; left: 0"
>
<div class="img_box img1"></div>
<!-- style="
height: 100vh;
width: 100%;
background: url('@/assets/images/bg.jpg') center no-repeat;
overflow: hidden;
background-size: cover;
" -->
<div class="img_box img2"></div>
<div class="img_box img3"></div>
</a-carousel>
<div class="slogan-box"> <div class="slogan-box">
<div class="slogan-title">智慧政务一体化数据管理</div> <div class="slogan-title">智慧政务一体化数据管理</div>
<div class="slogan-text"> <div class="slogan-text">
...@@ -38,7 +56,16 @@ ...@@ -38,7 +56,16 @@
</li> </li>
</template> </template>
</ul> </ul>
<p class="bottom" @click="handleCkeck('/home/dataManagement/serviceDataAnalyse/makeTrendResearch')">服务类数据分析<a-icon type="swap-right" /></p> <p
class="bottom"
@click="
handleCkeck(
'/home/dataManagement/serviceDataAnalyse/makeTrendResearch'
)
"
>
服务类数据分析<a-icon type="swap-right" />
</p>
</li> </li>
</ul> </ul>
...@@ -183,12 +210,11 @@ export default { ...@@ -183,12 +210,11 @@ export default {
}, },
// 查看数据 // 查看数据
handleCkeck(path) { handleCkeck(path) {
if(path.indexOf('http')>-1){ if (path.indexOf("http") > -1) {
window.open(path) window.open(path);
}else{ } else {
this.$router.push(path); this.$router.push(path);
} }
}, },
// pushRouter1() { // pushRouter1() {
// // 易政秀报表 // // 易政秀报表
...@@ -280,17 +306,38 @@ export default { ...@@ -280,17 +306,38 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
@headerH: 4.5rem; @headerH: 4.5rem;
.ant-carousel :deep(.slick-slide) {
width: 100%;
height: 100%;
overflow: hidden;
.img_box {
width: 100%;
height: 92.1vh;
overflow: hidden;
background-size: cover;
}
.img1 {
background: url("~@/assets/images/bg2.jpg") center no-repeat;
}
.img2 {
background: url("~@/assets/images/bgg3.jpg") center no-repeat;
}
.img3 {
background: url("~@/assets/images/bgg4.jpg") center no-repeat;
}
}
.Container { .Container {
height: 100%; height: 100%;
width: 100%; width: 100%;
// min-height: 960px; // min-height: 960px;
// background: url("~@/assets/images/zhandian.jpg") center no-repeat; // background: url("~@/assets/images/zhandian.jpg") center no-repeat;
background: url("../../assets/images/bg2.jpg") center no-repeat; // background: url("../../assets/images/bg2.jpg") center no-repeat;
background-size: cover; background-size: cover;
padding-top: @headerH; padding-top: @headerH;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
overflow: hidden;
.search_box { .search_box {
display: inline-block; display: inline-block;
margin-top: 12.1rem; margin-top: 12.1rem;
......
...@@ -117,6 +117,7 @@ export default { ...@@ -117,6 +117,7 @@ export default {
key: Storage.get(2, "siteId") ? Storage.get(2, "siteId") : "暂无站点", // 当前站点 key: Storage.get(2, "siteId") ? Storage.get(2, "siteId") : "暂无站点", // 当前站点
}, },
userInfo: Storage.get(2, "userInfo"), // 用户信息 userInfo: Storage.get(2, "userInfo"), // 用户信息
routeInfo: "",
}; };
}, },
created() { created() {
...@@ -143,7 +144,9 @@ export default { ...@@ -143,7 +144,9 @@ export default {
this.$bus.$emit("changeSite"); this.$bus.$emit("changeSite");
}, },
handelClick(item) { handelClick(item) {
this.routeInfo = "";
if (item.key !== this.$route.path) { if (item.key !== this.$route.path) {
sessionStorage.setItem("routeInfo", item.key);
this.$router.push(item.key); this.$router.push(item.key);
// this.showPage = true; // this.showPage = true;
} else { } else {
...@@ -161,16 +164,24 @@ export default { ...@@ -161,16 +164,24 @@ export default {
}); });
}, },
Logout() { Logout() {
LogoutInterface({}).then((res) => { let _this = this;
// this.$message.success(res.msg); this.$confirm({
this.$Storage.remove(2, "Authorization"); title: "您是否确定退出登录?",
this.$Storage.remove(2, "siteId"); onOk() {
this.$Storage.remove(2, "siteName"); LogoutInterface({}).then((res) => {
this.$Storage.remove(2, "userInfo"); // this.$message.success(res.msg);
this.SET_USERDATA({}); _this.$Storage.remove(2, "Authorization");
setTimeout(() => { _this.$Storage.remove(2, "siteId");
this.$router.replace({ path: "/" }); _this.$Storage.remove(2, "siteName");
}, 200); _this.$Storage.remove(2, "userInfo");
sessionStorage.removeItem("routeInfo");
_this.SET_USERDATA({});
setTimeout(() => {
_this.$router.replace({ path: "/" });
}, 200);
});
},
onCancel() {},
}); });
}, },
fnChangePassword() { fnChangePassword() {
...@@ -178,7 +189,11 @@ export default { ...@@ -178,7 +189,11 @@ export default {
}, },
// 返回门户 // 返回门户
backHome() { backHome() {
this.$router.push("/home/dataManagement/dataAdmin"); this.$router.push(
sessionStorage.getItem("routeInfo")
? sessionStorage.getItem("routeInfo")
: "/home/dataManagement/dataAdmin"
);
}, },
}, },
}; };
...@@ -309,4 +324,4 @@ export default { ...@@ -309,4 +324,4 @@ export default {
border-color: transparent !important ; border-color: transparent !important ;
} }
} }
</style> </style>
\ No newline at end of file
<template> <template>
<div class="station"> <div class="station">
<a-carousel
effect="fade"
autoplay
:autoplaySpeed="2000"
:dots="false"
style="width: 100%; height: 100%; overflow: hidden"
>
<div class="img_box img1"></div>
<!-- style="
height: 100vh;
width: 100%;
background: url('@/assets/images/bg.jpg') center no-repeat;
overflow: hidden;
background-size: cover;
" -->
<div class="img_box img2"></div>
<div class="img_box img3"></div>
</a-carousel>
<div class="title"> <div class="title">
<!-- <h3>以客户为中心,以奋斗者为本,永远坚持艰苦奋斗</h3> <h3 style="text-align: center;font-size: 50px;">宜人·宜宾·宜办事</h3>
<p>“互联网+政务服务”整体解决方案提供商和服务商</p> --> <!-- <p>“互联网+政务服务”整体解决方案提供商和服务商</p> -->
</div> </div>
<div class="classification"> <div class="classification">
<div class="modules"> <div class="modules">
...@@ -12,7 +30,7 @@ ...@@ -12,7 +30,7 @@
:key="item.id" :key="item.id"
@click="openWindow(item.modelUrl)" @click="openWindow(item.modelUrl)"
> >
<div class="picture"> <div class="picture" :style="{background: item.color}">
<img <img
width="40" width="40"
height="35" height="35"
...@@ -58,7 +76,13 @@ export default { ...@@ -58,7 +76,13 @@ export default {
this.siteId = Storage.get(2, "siteId"); this.siteId = Storage.get(2, "siteId");
let res = await appsListInterface({ siteId: this.siteId }); let res = await appsListInterface({ siteId: this.siteId });
let { data } = res.data; let { data } = res.data;
this.siteModelList = data; let color = []
let colorArr = ['#546DFF','#1E6FFF','#3CBFFF','#00AA5B','#FFAB00']
color = colorArr.concat(colorArr,colorArr,colorArr,colorArr,colorArr,colorArr)
this.siteModelList = data.map((v,i)=>{
v['color'] = color[i]
return v
});
}, },
openWindow(href) { openWindow(href) {
let token = Storage.get(2, "Authorization"); let token = Storage.get(2, "Authorization");
...@@ -91,13 +115,34 @@ export default { ...@@ -91,13 +115,34 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
@headerH: 4.5rem; @headerH: 4.5rem;
.ant-carousel :deep(.slick-slide) {
width: 100%;
height: 100%;
overflow: hidden;
.img_box {
width: 100%;
height: 92.1vh;
overflow: hidden;
background-size: cover;
}
.img1 {
background: url("~@/assets/images/bg.jpg") center no-repeat;
}
.img2 {
background: url("~@/assets/images/bgg1.jpg") center no-repeat;
}
.img3 {
background: url("~@/assets/images/bgg2.jpg") center no-repeat;
}
}
.station { .station {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: url("~@/assets/images/bg.jpg") center no-repeat; // background: url("~@/assets/images/bg.jpg") center no-repeat;
background-size: cover; background-size: cover;
position: relative; position: relative;
padding-top: @headerH; padding-top: @headerH;
overflow: hidden;
.title { .title {
width: 650px; width: 650px;
...@@ -124,7 +169,7 @@ export default { ...@@ -124,7 +169,7 @@ export default {
.classification { .classification {
width: 100%; width: 100%;
height: 300px; height: 410px;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
background-color: rgba(3, 23, 24, 0.452); background-color: rgba(3, 23, 24, 0.452);
...@@ -141,7 +186,6 @@ export default { ...@@ -141,7 +186,6 @@ export default {
margin-top: 5px; margin-top: 5px;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
.picture { .picture {
width: 72px; width: 72px;
height: 72px; height: 72px;
......
...@@ -3,16 +3,26 @@ ...@@ -3,16 +3,26 @@
<div class="search_box" ref="search_box"> <div class="search_box" ref="search_box">
<h3>API服务</h3> <h3>API服务</h3>
<h4> <h4>
<a-input placeholder="请输入API名称搜索" v-model="searchVal" @pressEnter="getServiceApiList" /> <a-input
placeholder="请输入API名称搜索"
v-model="searchVal"
@pressEnter="getServiceApiList"
allow-clear
/>
<button class="search_btn btn" @click="handleSearch"> <button class="search_btn btn" @click="handleSearch">
<span>{{ isSearch ? "重置" : "搜索" }}</span> <span>搜索</span>
<!-- <span>{{ isSearch ? "重置" : "搜索" }}</span> -->
</button> </button>
</h4> </h4>
</div> </div>
<div class="stepbox" :style="{ height: contentHigh + 'px' }"> <div class="stepbox" :style="{ height: contentHigh + 'px' }">
<div class="_left"> <div class="_left">
<a-steps progress-dot direction="vertical"> <a-steps progress-dot direction="vertical">
<a-step v-for="(item, index) in stepsList" :status="active === index ? 'process' : 'wait'" :key="index"> <a-step
v-for="(item, index) in stepsList"
:status="active === index ? 'process' : 'wait'"
:key="index"
>
<span slot="title" @click="handleChange(item, index)">{{ <span slot="title" @click="handleChange(item, index)">{{
item.productName item.productName
}}</span> }}</span>
...@@ -25,10 +35,19 @@ ...@@ -25,10 +35,19 @@
<span class="list_title">{{ curApiInfo.name }}</span> <span class="list_title">{{ curApiInfo.name }}</span>
<span class="count primary">{{ curApiInfo.total }}</span> <span class="count primary">{{ curApiInfo.total }}</span>
</div> </div>
<div class="list flex aic jcb" v-for="v in curApiInfo.list" :key="v.id"> <div
class="list flex aic jcb"
v-for="v in curApiInfo.list"
:key="v.id"
>
<div class="api-name">{{ v.interfaceName }}</div> <div class="api-name">{{ v.interfaceName }}</div>
<span class="service-name">{{ v.description }}</span> <span class="service-name">{{ v.description }}</span>
<a-button icon="read" type="primary" class="addclass" @click="pushroeuter(v)"> <a-button
icon="read"
type="primary"
class="addclass"
@click="pushroeuter(v)"
>
查看文档 查看文档
</a-button> </a-button>
</div> </div>
...@@ -73,7 +92,7 @@ export default { ...@@ -73,7 +92,7 @@ export default {
if (code == 1) { if (code == 1) {
if (data.data.length) { if (data.data.length) {
this.stepsList = data.data; this.stepsList = data.data;
this.getApiDetail(data.data[0]) this.getApiDetail(data.data[0]);
} else { } else {
this.curApiInfo = {}; this.curApiInfo = {};
} }
...@@ -82,33 +101,38 @@ export default { ...@@ -82,33 +101,38 @@ export default {
}, },
getApiDetail(item) { getApiDetail(item) {
getInterfaceList({ page: 1, size: -1, productId: item.id }).then((res) => { getInterfaceList({ page: 1, size: -1, productId: item.id }).then(
let { code, data } = res; (res) => {
if (code == 1) { let { code, data } = res;
this.curApiInfo = { if (code == 1) {
name: item.productName, this.curApiInfo = {
list: data.data, name: item.productName,
total: data.total list: data.data,
total: data.total,
};
} }
} }
}); );
}, },
handleSearch() { handleSearch() {
this.isSearch = !this.isSearch; this.active = 0;
if (this.isSearch) { this.getServiceApiList();
this.active = -1;
this.getServiceApiList(); // this.isSearch = !this.isSearch;
} else { // if (this.isSearch) {
this.searchVal = ""; // this.active = -1;
this.active = 0; // this.getServiceApiList();
this.getServiceApiList(); // } else {
} // this.searchVal = "";
// this.active = 0;
// this.getServiceApiList();
// }
}, },
// 切换设备 // 切换设备
handleChange(row, index) { handleChange(row, index) {
this.active = index; this.active = index;
this.searchVal = ""; this.searchVal = "";
this.getApiDetail(row) this.getApiDetail(row);
}, },
pushroeuter(v) { pushroeuter(v) {
this.$router.push({ this.$router.push({
...@@ -138,7 +162,9 @@ export default { ...@@ -138,7 +162,9 @@ export default {
align-items: center; align-items: center;
display: flex; display: flex;
flex-flow: column; flex-flow: column;
/deep/.ant-input-affix-wrapper .ant-input-suffix {
right: 70px !important;
}
h3 { h3 {
font-size: 2.4rem; font-size: 2.4rem;
color: #fff; color: #fff;
...@@ -177,7 +203,7 @@ export default { ...@@ -177,7 +203,7 @@ export default {
padding: 0; padding: 0;
border: none; border: none;
&>span { & > span {
position: relative; position: relative;
display: block; display: block;
width: 100%; width: 100%;
...@@ -221,8 +247,8 @@ export default { ...@@ -221,8 +247,8 @@ export default {
width: 100%; width: 100%;
} }
&>span:before, & > span:before,
&>span:after { & > span:after {
position: absolute; position: absolute;
content: ""; content: "";
left: 0; left: 0;
...@@ -235,21 +261,21 @@ export default { ...@@ -235,21 +261,21 @@ export default {
transition: all 0.3s ease; transition: all 0.3s ease;
} }
&>span:before { & > span:before {
width: 2px; width: 2px;
height: 0%; height: 0%;
} }
&>span:after { & > span:after {
height: 2px; height: 2px;
width: 0%; width: 0%;
} }
&>span:hover:before { & > span:hover:before {
height: 100%; height: 100%;
} }
&>span:hover:after { & > span:hover:after {
width: 100%; width: 100%;
} }
} }
...@@ -350,16 +376,22 @@ export default { ...@@ -350,16 +376,22 @@ export default {
width: 100%; width: 100%;
height: @headerH; height: @headerH;
background: rgb(59, 135, 255); background: rgb(59, 135, 255);
background: -moz-linear-gradient(174deg, background: -moz-linear-gradient(
rgba(59, 135, 255, 1) 24%, 174deg,
rgba(108, 53, 247, 1) 85%); rgba(59, 135, 255, 1) 24%,
background: -webkit-linear-gradient(174deg, rgba(108, 53, 247, 1) 85%
rgba(59, 135, 255, 1) 24%, );
rgba(108, 53, 247, 1) 85%); background: -webkit-linear-gradient(
background: linear-gradient(174deg, 174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%); rgba(108, 53, 247, 1) 85%
);
background: linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff", endColorstr="#6c35f7", GradientType=1); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff", endColorstr="#6c35f7", GradientType=1);
} }
} }
</style> </style>
\ No newline at end of file
...@@ -164,7 +164,9 @@ ...@@ -164,7 +164,9 @@
</div> </div>
</div> </div>
<div class="bottom_"> <div class="bottom_">
<a-button type="primary" class="addclass" @click="save">保存</a-button> <a-button type="primary" class="addclass" @click="save"
>保存</a-button
>
<a-button @click="resetForm">重置</a-button> <a-button @click="resetForm">重置</a-button>
</div> </div>
</div> </div>
...@@ -231,9 +233,54 @@ export default { ...@@ -231,9 +233,54 @@ export default {
menu; menu;
// this.menusList = res.data; // this.menusList = res.data;
if (sjgl && sjgl.length) this.permsForm.seleteDataManage = sjgl; if (sjgl && sjgl.length) this.permsForm.seleteDataManage = sjgl;
this.dataManage.childList &&
this.dataManage.childList.forEach((v) => {
v.checked = false;
this.permsForm.seleteDataManage &&
this.permsForm.seleteDataManage.forEach((val) => {
v.nodeId == val ? (v.checked = true) : "";
});
});
this.permsForm.checkAllManage = this.dataManage.childList.every(
(v) => v.checked
);
if (zdbp && zdbp.length) this.permsForm.seleteDataArrange = zdbp; if (zdbp && zdbp.length) this.permsForm.seleteDataArrange = zdbp;
this.dataArrange.childList &&
this.dataArrange.childList.forEach((v) => {
v.checked = false;
this.permsForm.seleteDataArrange &&
this.permsForm.seleteDataArrange.forEach((val) => {
v.nodeId == val ? (v.checked = true) : "";
});
});
this.permsForm.checkAllArrange = this.dataArrange.childList.every(
(v) => v.checked
);
if (sjjs && sjjs.length) this.permsForm.seleteDataCalculate = sjjs; if (sjjs && sjjs.length) this.permsForm.seleteDataCalculate = sjjs;
this.dataCalculate.childList &&
this.dataCalculate.childList.forEach((v) => {
v.checked = false;
this.permsForm.seleteDataCalculate &&
this.permsForm.seleteDataCalculate.forEach((val) => {
v.nodeId == val ? (v.checked = true) : "";
});
});
this.permsForm.checkAllCalculate = this.dataCalculate.childList.every(
(v) => v.checked
);
if (ptsz && ptsz.length) this.permsForm.seleteDataSet = ptsz; if (ptsz && ptsz.length) this.permsForm.seleteDataSet = ptsz;
this.dataSet.childList &&
this.dataSet.childList.forEach((v) => {
v.checked = false;
this.permsForm.seleteDataSet &&
this.permsForm.seleteDataSet.forEach((val) => {
v.nodeId == val ? (v.checked = true) : "";
});
});
this.permsForm.checkAllSet = this.dataSet.childList.every(
(v) => v.checked
);
}, },
// 获取角色菜单列表 // 获取角色菜单列表
getRoleInfo() { getRoleInfo() {
...@@ -506,4 +553,4 @@ export default { ...@@ -506,4 +553,4 @@ export default {
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff",endColorstr="#6c35f7",GradientType=1); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff",endColorstr="#6c35f7",GradientType=1);
} }
} }
</style> </style>
\ No newline at end of file
<template> <template>
<a-modal :width="modalInfo.width" :visible="modalInfo.visible" :title="modalInfo.title" <a-modal
@cancel="modalInfo.visible = false" centered destroyOnClose> :width="modalInfo.width"
<a-form-model :label-col="{ :visible="modalInfo.visible"
span: 5, :title="modalInfo.title"
}" :wrapper-col="{ @cancel="modalInfo.visible = false"
span: 19, centered
}" layout="horizontal" ref="appForm" :model="appForm" :rules="appRules"> destroyOnClose
>
<a-form-model
:label-col="{
span: 5,
}"
:wrapper-col="{
span: 19,
}"
layout="horizontal"
ref="appForm"
:model="appForm"
:rules="appRules"
>
<a-form-model-item label="应用名称" prop="appName"> <a-form-model-item label="应用名称" prop="appName">
<a-input v-model="appForm.appName" placeholder="请输入" allowClear /> <a-input v-model="appForm.appName" placeholder="请输入" allowClear />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="开发语言" prop="deveLanguage"> <a-form-model-item label="开发语言" prop="deveLanguage">
<a-select v-model="appForm.deveLanguage" placeholder="请选择" allowClear> <a-select
<a-select-option v-for="(item, index) of deveLanguage" :key="index" :value="index"> v-model="appForm.deveLanguage"
placeholder="请选择"
allowClear
>
<a-select-option
v-for="(item, index) of deveLanguage"
:key="index"
:value="index"
>
{{ item }} {{ item }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="版本号" prop="versionNumber"> <a-form-model-item label="版本号" prop="versionNumber">
<a-input v-model="appForm.versionNumber" placeholder="请输入" allowClear /> <a-input
v-model="appForm.versionNumber"
placeholder="请输入"
allowClear
/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="版本信息" prop="versionInfo"> <a-form-model-item label="版本信息" prop="versionInfo">
<a-textarea v-model="appForm.versionInfo" placeholder="请输入" :rows="4" /> <a-textarea
v-model="appForm.versionInfo"
placeholder="请输入"
:rows="4"
/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="应用包" prop="appFileUrl"> <a-form-model-item label="应用包" prop="appFileUrl">
<MyUpload v-model="appForm.appFileUrl" :uploadInfo="uploadInfo"> <MyUpload v-model="appForm.appFileUrl" :uploadInfo="uploadInfo">
...@@ -32,7 +61,9 @@ ...@@ -32,7 +61,9 @@
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<template slot="footer"> <template slot="footer">
<a-button type="primary" class="addclass" @click="Modal_Ok">确定</a-button> <a-button type="primary" class="addclass" @click="Modal_Ok"
>确定</a-button
>
<a-button @click="resetForm">取消</a-button> <a-button @click="resetForm">取消</a-button>
</template> </template>
</a-modal> </a-modal>
...@@ -72,52 +103,69 @@ export default { ...@@ -72,52 +103,69 @@ export default {
}, },
verload: 300, // 单位 M verload: 300, // 单位 M
limit: 1, //限制文件上传数量 limit: 1, //限制文件上传数量
whiteFileList: ["apk"], whiteFileList: ["apk", "jpg", "jpeg", "png", "gif", "bmp"], //只允许上传apk包
}, },
appRules: { appRules: {
appName: [{ required: true, message: "请输入应用名称", trigger: ['blur', 'change'] }], appName: [
deveLanguage: [{ required: true, message: "请选择开发语言", trigger: ['blur', 'change'] }], {
required: true,
message: "请输入应用名称",
trigger: ["blur", "change"],
},
],
deveLanguage: [
{
required: true,
message: "请选择开发语言",
trigger: ["blur", "change"],
},
],
}, },
}; };
}, },
mounted() { mounted() {},
},
methods: { methods: {
getInfo(id) { getInfo(id) {
getAppsInfo({ id: id }).then(res => { getAppsInfo({ id: id }).then((res) => {
res.data.isEnable = res.data.isEnable == 1 res.data.isEnable = res.data.isEnable == 1;
res.data.deveLanguage = this.deveLanguage[res.data.deveLanguage] res.data.deveLanguage = this.deveLanguage[res.data.deveLanguage];
this.appForm = res.data this.appForm = res.data;
if (res.data.appFileUrl) { if (res.data.appFileUrl) {
this.uploadInfo.fileList = [ this.uploadInfo.fileList = [
{ {
uid: id, uid: id,
name: res.data.appFileUrl, name: res.data.appFileUrl,
url: res.data.appFileUrl, url: res.data.appFileUrl,
} },
] ];
} }
});
})
}, },
Modal_Ok() { Modal_Ok() {
this.$refs.appForm.validate((valid) => { this.$refs.appForm.validate((valid) => {
if (valid) { if (valid) {
let json = JSON.parse(JSON.stringify(this.appForm)) let json = JSON.parse(JSON.stringify(this.appForm));
json.isEnable = json.isEnable ? 1 : 0 json.isEnable = json.isEnable ? 1 : 0;
saveApps(json).then(res => { for (let key in this.deveLanguage) {
let { code, msg } = res this.deveLanguage[key] == json.deveLanguage
? Number((json.deveLanguage = key))
: "";
}
json.productId
? json.productId
: (json.productId = this.$route.query.id);
saveApps(json).then((res) => {
let { code, msg } = res;
if (code == 1) { if (code == 1) {
this.$message.success('保存成功'); this.$message.success("保存成功");
this.resetForm(); this.resetForm();
this.modalInfo.visible = false this.modalInfo.visible = false;
this.$parent.getList() this.$parent.getList();
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
}) });
} else { } else {
this.$message.error(`请完善表单信息!`); this.$message.error(`请完善表单信息!`);
return false; return false;
......
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