|
|
|
@ -2,11 +2,19 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="L-assets-info">
|
|
|
|
|
<div class="assets-info-top">
|
|
|
|
|
<el-row style="margin: 10px 0;">
|
|
|
|
|
<el-row style="margin: 10px 0">
|
|
|
|
|
<span class="top-title-box">基本信息</span>
|
|
|
|
|
</el-row>
|
|
|
|
|
<div class="assets-info-box">
|
|
|
|
|
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="170px" class="demo-ruleForm" label-position="right" :disabled="disabled">
|
|
|
|
|
<el-form
|
|
|
|
|
:model="ruleForm"
|
|
|
|
|
:rules="rules"
|
|
|
|
|
ref="ruleForm"
|
|
|
|
|
label-width="170px"
|
|
|
|
|
class="demo-ruleForm"
|
|
|
|
|
label-position="right"
|
|
|
|
|
:disabled="disabled"
|
|
|
|
|
>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="所属单位" required prop="ssdw">
|
|
|
|
@ -16,25 +24,34 @@
|
|
|
|
|
v-model="ruleForm.ssdw"
|
|
|
|
|
:fetch-suggestions="querySearchAsync"
|
|
|
|
|
placeholder="请输入所属单位"
|
|
|
|
|
|
|
|
|
|
></el-autocomplete>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="移动应用名称" required prop="appName">
|
|
|
|
|
<el-input v-model="ruleForm.appName" placeholder="请输入移动应用名称"></el-input>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="ruleForm.appName"
|
|
|
|
|
placeholder="请输入移动应用名称"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="包名" required>
|
|
|
|
|
<el-input v-model="ruleForm.pack" style="width: 100%;" placeholder="请输入包名"></el-input>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="ruleForm.pack"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
placeholder="请输入包名"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="icp备案状态" required>
|
|
|
|
|
<el-select v-model="ruleForm.icpState" placeholder="请选择icp备案状态">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="ruleForm.icpState"
|
|
|
|
|
placeholder="请选择icp备案状态"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.app_icp_state"
|
|
|
|
|
:key="dict.value"
|
|
|
|
@ -48,21 +65,32 @@
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="icp备案号" required>
|
|
|
|
|
<el-input v-model="ruleForm.icpbah" placeholder="请输入icp备案号"></el-input>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="ruleForm.icpbah"
|
|
|
|
|
placeholder="请输入icp备案号"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item class="daoqitixingren" label="统一社会信用代码" required>
|
|
|
|
|
<el-form-item prop="tyshxydm"
|
|
|
|
|
<el-form-item
|
|
|
|
|
class="daoqitixingren"
|
|
|
|
|
label="统一社会信用代码"
|
|
|
|
|
required
|
|
|
|
|
>
|
|
|
|
|
<el-form-item
|
|
|
|
|
prop="tyshxydm"
|
|
|
|
|
:rules="[
|
|
|
|
|
{
|
|
|
|
|
pattern: /^[a-zA-Z0-9]{18}$/,
|
|
|
|
|
message: '请输入正确格式的18位统一社会信用代码',
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
}
|
|
|
|
|
trigger: 'blur',
|
|
|
|
|
},
|
|
|
|
|
]"
|
|
|
|
|
>
|
|
|
|
|
<el-input v-model="ruleForm.tyshxydm" placeholder="请输入统一信用代码"></el-input>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="ruleForm.tyshxydm"
|
|
|
|
|
placeholder="请输入统一信用代码"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
@ -70,7 +98,10 @@
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="文件名" required>
|
|
|
|
|
<el-input v-model="ruleForm.wjm" placeholder="请输入文件名"></el-input>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="ruleForm.wjm"
|
|
|
|
|
placeholder="请输入文件名"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
@ -115,7 +146,10 @@
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="安全加固情况" required>
|
|
|
|
|
<el-select v-model="ruleForm.aqjgqk" placeholder="请选择安全加固情况">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="ruleForm.aqjgqk"
|
|
|
|
|
placeholder="请选择安全加固情况"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.app_aqjgqk"
|
|
|
|
|
:key="dict.value"
|
|
|
|
@ -127,38 +161,62 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="版本信息" required>
|
|
|
|
|
<el-input v-model="ruleForm.bbxx" style="width: 100%;" placeholder="请输入版本信息"></el-input>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="ruleForm.bbxx"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
placeholder="请输入版本信息"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="版本信息(版本号)" required>
|
|
|
|
|
<el-input v-model="ruleForm.bbh" style="width: 100%;" placeholder="请输入版本信息(版本号)"></el-input>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="ruleForm.bbh"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
placeholder="请输入版本信息(版本号)"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="版本信息(MD5)" required>
|
|
|
|
|
<el-input v-model="ruleForm.bbxxMd5" style="width: 100%;" placeholder="请输入版本信息(MD5)"></el-input>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="ruleForm.bbxxMd5"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
placeholder="请输入版本信息(MD5)"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="版本信息(上架平台)" required>
|
|
|
|
|
<el-input v-model="ruleForm.bbxxSjpt" style="width: 100%;" placeholder="请输入版本信息(上架平台)"></el-input>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="ruleForm.bbxxSjpt"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
placeholder="请输入版本信息(上架平台)"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="文件大小" required>
|
|
|
|
|
<el-input v-model="ruleForm.wjdx" style="width: 100%;" placeholder="请输入文件大小"></el-input>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="ruleForm.wjdx"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
placeholder="请输入文件大小"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="移动应用系统状态" required>
|
|
|
|
|
<el-select v-model="ruleForm.appState" placeholder="请选择移动应用系统状态">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="ruleForm.appState"
|
|
|
|
|
placeholder="请选择移动应用系统状态"
|
|
|
|
|
@change="changeState"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.gzh_state"
|
|
|
|
|
:key="dict.value"
|
|
|
|
@ -169,19 +227,50 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row v-show="ruleForm.appState == 7">
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item
|
|
|
|
|
label="关停原因"
|
|
|
|
|
prop="bfyy"
|
|
|
|
|
:required="ruleForm.appState == 7"
|
|
|
|
|
>
|
|
|
|
|
<el-input
|
|
|
|
|
type="textarea"
|
|
|
|
|
resize="none"
|
|
|
|
|
placeholder="请输入关停原因"
|
|
|
|
|
:rows="5"
|
|
|
|
|
v-model="ruleForm.bfyy"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="简介" required>
|
|
|
|
|
<el-input type="textarea" resize="none" placeholder="请输入简介" :rows="5" v-model="ruleForm.jj"></el-input>
|
|
|
|
|
<el-input
|
|
|
|
|
type="textarea"
|
|
|
|
|
resize="none"
|
|
|
|
|
placeholder="请输入简介"
|
|
|
|
|
:rows="5"
|
|
|
|
|
v-model="ruleForm.jj"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row style="margin: 10px 0 ;padding-bottom: 30px; text-align: center;" v-if="pageType !== 'look'">
|
|
|
|
|
<el-row
|
|
|
|
|
style="margin: 10px 0; padding-bottom: 30px; text-align: center"
|
|
|
|
|
v-if="pageType !== 'look'"
|
|
|
|
|
>
|
|
|
|
|
<el-button type="danger" @click="sendBack">取消</el-button>
|
|
|
|
|
<el-button type="primary" @click="newAssets" :loading="loading">保存</el-button>
|
|
|
|
|
<el-button type="primary" @click="newAssets" :loading="loading"
|
|
|
|
|
>保存</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-row style="margin: 10px 0 ;padding-bottom: 50px; text-align: center;" v-if="pageType == 'look'">
|
|
|
|
|
<el-row
|
|
|
|
|
style="margin: 10px 0; padding-bottom: 50px; text-align: center"
|
|
|
|
|
v-if="pageType == 'look'"
|
|
|
|
|
>
|
|
|
|
|
<el-button type="primary" @click="sendBack">返回</el-button>
|
|
|
|
|
</el-row>
|
|
|
|
|
</div>
|
|
|
|
@ -190,98 +279,121 @@
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import { assetApp, assetAppInfo, unitAllList } from "@/api/auditPagesApi/index";
|
|
|
|
|
import equalToPassword from '@/views/components/assetsType/mainx.js'
|
|
|
|
|
import equalToPassword from "@/views/components/assetsType/mainx.js";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
dicts:['app_icp_state','app_sshy','app_zdhy','app_xzqh','app_aqjgqk','gzh_state'],
|
|
|
|
|
dicts: [
|
|
|
|
|
"app_icp_state",
|
|
|
|
|
"app_sshy",
|
|
|
|
|
"app_zdhy",
|
|
|
|
|
"app_xzqh",
|
|
|
|
|
"app_aqjgqk",
|
|
|
|
|
"gzh_state",
|
|
|
|
|
],
|
|
|
|
|
data() {
|
|
|
|
|
const changeSateTetx = (rule, value, callback) => {
|
|
|
|
|
if (this.ruleForm.appState == 7 && !value) {
|
|
|
|
|
callback(new Error("请填写"));
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
return {
|
|
|
|
|
ruleForm:{
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
ruleForm: {},
|
|
|
|
|
rules: {
|
|
|
|
|
bfyy: [{ validator: changeSateTetx, trigger: "blur" }],
|
|
|
|
|
ssdw: [
|
|
|
|
|
{ required: true, message: "所属单位不能为空", trigger: "blur" },
|
|
|
|
|
{ required: true, validator: equalToPassword, trigger: "change" }
|
|
|
|
|
|
|
|
|
|
{ required: true, validator: equalToPassword, trigger: "change" },
|
|
|
|
|
],
|
|
|
|
|
appName: [
|
|
|
|
|
{ required: true, message: "移动应用名称不能为空", trigger: "blur" }
|
|
|
|
|
{ required: true, message: "移动应用名称不能为空", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
loading: false,
|
|
|
|
|
disabled: false,
|
|
|
|
|
// disabledTwo:true,
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
props:['pageType', 'id', 'queryData'],
|
|
|
|
|
props: ["pageType", "id", "queryData"],
|
|
|
|
|
mounted() {
|
|
|
|
|
if(this.pageType == 'look') {
|
|
|
|
|
this.getInfo(this.id)
|
|
|
|
|
if (this.pageType == "look") {
|
|
|
|
|
this.getInfo(this.id);
|
|
|
|
|
this.disabled = true;
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
const inputElements = document.querySelectorAll('.el-input__inner');
|
|
|
|
|
const textareaInputElements = document.querySelectorAll('.el-textarea__inner');
|
|
|
|
|
const inputElements = document.querySelectorAll(".el-input__inner");
|
|
|
|
|
const textareaInputElements = document.querySelectorAll(
|
|
|
|
|
".el-textarea__inner"
|
|
|
|
|
);
|
|
|
|
|
inputElements.forEach((input) => {
|
|
|
|
|
input.placeholder = '';
|
|
|
|
|
input.placeholder = "";
|
|
|
|
|
});
|
|
|
|
|
textareaInputElements.forEach((input) => {
|
|
|
|
|
input.placeholder = '';
|
|
|
|
|
input.placeholder = "";
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
} else if(this.pageType == 'change') {
|
|
|
|
|
this.getInfo(this.id)
|
|
|
|
|
});
|
|
|
|
|
} else if (this.pageType == "change") {
|
|
|
|
|
this.getInfo(this.id);
|
|
|
|
|
this.disabled = false;
|
|
|
|
|
// this.disabledTwo = false;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
changeState(e) {
|
|
|
|
|
if (e != 7) {
|
|
|
|
|
this.ruleForm.bfyy = "";
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getInfo(id) {
|
|
|
|
|
assetAppInfo(id).then(res=>{
|
|
|
|
|
assetAppInfo(id).then((res) => {
|
|
|
|
|
this.ruleForm = res.data;
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 单位名称模糊查询
|
|
|
|
|
querySearchAsync(queryString, cb) {
|
|
|
|
|
let results = [];
|
|
|
|
|
unitAllList({nickName: queryString}).then(res => {
|
|
|
|
|
res.data.forEach(item => {
|
|
|
|
|
unitAllList({ nickName: queryString }).then((res) => {
|
|
|
|
|
res.data.forEach((item) => {
|
|
|
|
|
results.push({
|
|
|
|
|
value: item.nickName,
|
|
|
|
|
id: item.id,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
cb(results);
|
|
|
|
|
},
|
|
|
|
|
// 新增资产确认按钮
|
|
|
|
|
newAssets() {
|
|
|
|
|
this.$refs['ruleForm'].validate((valid) => {
|
|
|
|
|
this.$refs["ruleForm"].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
if(this.pageType == 'change') {
|
|
|
|
|
assetApp('put',this.ruleForm).then(res=>{
|
|
|
|
|
if (this.pageType == "change") {
|
|
|
|
|
assetApp("put", this.ruleForm).then((res) => {
|
|
|
|
|
// console.log(res,"res");
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
// this.$router.go(-1);
|
|
|
|
|
this.$router.push({name:'MobileApplication',params: this.queryData})
|
|
|
|
|
})
|
|
|
|
|
this.$router.push({
|
|
|
|
|
name: "MobileApplication",
|
|
|
|
|
params: this.queryData,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
assetApp('post',this.ruleForm).then(res=>{
|
|
|
|
|
assetApp("post", this.ruleForm).then((res) => {
|
|
|
|
|
// console.log(res,"res");
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
this.$router.go(-1);
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
sendBack() {
|
|
|
|
|
// this.$router.go(-1);
|
|
|
|
|
this.$router.push({name:'MobileApplication',params: this.queryData})
|
|
|
|
|
this.$router.push({ name: "MobileApplication", params: this.queryData });
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|