parent
1627102795
commit
9ab0087dac
@ -1,19 +1,332 @@
|
||||
<!-- 公众号表单 -->
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div class="L-assets-info">
|
||||
<div class="assets-info-top">
|
||||
<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-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属单位" prop="ssdw">
|
||||
<!-- <el-input v-model="ruleForm.ssdw" placeholder="请输入单位名称"></el-input> -->
|
||||
<el-autocomplete
|
||||
v-model="ruleForm.ssdw"
|
||||
:fetch-suggestions="querySearchAsync"
|
||||
placeholder="请输入所属单位"
|
||||
|
||||
></el-autocomplete>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公众号名称" prop="gzhmc">
|
||||
<el-input v-model="ruleForm.gzhmc" 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.wxh" 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.rzzt" style="width: 100%;" placeholder="请输入认证主体"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item class="daoqitixingren" label="统一社会信用代码" required>
|
||||
<el-form-item prop="tyshxydm"
|
||||
:rules="[
|
||||
{
|
||||
pattern: /^[a-zA-Z0-9]{18}$/,
|
||||
message: '请输入正确格式的18位统一社会信用代码',
|
||||
trigger: 'blur'
|
||||
}
|
||||
]"
|
||||
>
|
||||
<el-input v-model="ruleForm.tyshxydm" placeholder="请输入统一信用代码"></el-input>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公众号状态" required>
|
||||
<el-select v-model="ruleForm.gzhzt" placeholder="请选择公众号状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.gzh_state"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公众号ID" required>
|
||||
<el-input v-model="ruleForm.gzhId" style="width: 100%;" placeholder="请输入公众号ID"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公众号类型" required>
|
||||
<el-select v-model="ruleForm.gzhlx" placeholder="请选择公众号类型">
|
||||
<el-option
|
||||
v-for="dict in dict.type.gzh_lx"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="认证状态" required>
|
||||
<el-select v-model="ruleForm.rzState" placeholder="请选择认证状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.gzh_rzzt"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="认证时间" required>
|
||||
<el-date-picker
|
||||
v-model="ruleForm.rzsj"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="认证类型" required>
|
||||
<el-select v-model="ruleForm.rzlx" placeholder="请选择认证类型">
|
||||
<el-option
|
||||
v-for="dict in dict.type.gzh_rzlx"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属行业" required>
|
||||
<el-select v-model="ruleForm.sshy" placeholder="请选择所属行业">
|
||||
<el-option
|
||||
v-for="dict in dict.type.app_sshy"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="重点行业" required>
|
||||
<el-select v-model="ruleForm.zdhy" placeholder="请选择重点行业">
|
||||
<el-option
|
||||
v-for="dict in dict.type.app_zdhy"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="行政区划" required>
|
||||
<el-select v-model="ruleForm.xzqh" placeholder="请选择行政区划">
|
||||
<el-option
|
||||
v-for="dict in dict.type.app_xzqh"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="系统责任人" required>
|
||||
<el-input v-model="ruleForm.xtzrr" style="width: 100%;" placeholder="请输入系统责任人"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="系统责任人电话" required>
|
||||
<el-form-item prop="xtzrrdh"
|
||||
:rules="[
|
||||
{
|
||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||
message: '请输入正确的手机号码',
|
||||
trigger: 'blur'
|
||||
}
|
||||
]"
|
||||
>
|
||||
<el-input v-model="ruleForm.xtzrrdh" style="width: 100%;" placeholder="请输入系统责任人电话"></el-input>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="系统责任人邮箱" required>
|
||||
<el-form-item prop="xtzrryx"
|
||||
:rules="[
|
||||
{
|
||||
type: 'email',
|
||||
message: '请输入正确的邮箱地址',
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
]"
|
||||
>
|
||||
<el-input v-model="ruleForm.xtzrryx" style="width: 100%;" placeholder="请输入系统责任人邮箱"></el-input>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="系统责任人地址" required>
|
||||
<el-input v-model="ruleForm.xtzrrdz" 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.cdmc" 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.cdlj" 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.cdlx" style="width: 100%;" placeholder="请输入菜单信息(菜单类型)"></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.xtjj"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin: 10px 0 ;padding-bottom: 50px; 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-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { assetOfficialAccount, assetOfficialAccountInfo, unitAllList } from "@/api/auditPagesApi/index";
|
||||
export default {
|
||||
dicts:['app_xzqh','app_sshy','app_zdhy','gzh_state','gzh_lx','gzh_rzzt','gzh_rzlx','gzh_cdlx'],
|
||||
data() {
|
||||
return {
|
||||
ruleForm:{
|
||||
|
||||
},
|
||||
rules:{
|
||||
ssdw:[
|
||||
{ required: true, message: "所属单位不能为空", trigger: "blur" }
|
||||
],
|
||||
gzhmc:[
|
||||
{ required: true, message: "公众号名称不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
loading:false,
|
||||
disabled:false,
|
||||
}
|
||||
},
|
||||
props:['pageType', 'id'],
|
||||
mounted(){
|
||||
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');
|
||||
inputElements.forEach((input) => {
|
||||
input.placeholder = '';
|
||||
});
|
||||
textareaInputElements.forEach((input) => {
|
||||
input.placeholder = '';
|
||||
});
|
||||
})
|
||||
} else if(this.pageType == 'change') {
|
||||
this.getInfo(this.id)
|
||||
this.disabled = false;
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
getInfo(id){
|
||||
assetOfficialAccountInfo(id).then(res=>{
|
||||
this.ruleForm = res.data;
|
||||
})
|
||||
},
|
||||
// 单位名称模糊查询
|
||||
querySearchAsync(queryString, cb){
|
||||
let results = [];
|
||||
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) => {
|
||||
if(valid) {
|
||||
this.loading = true;
|
||||
if(this.pageType == 'change') {
|
||||
assetOfficialAccount('put',this.ruleForm).then(res=>{
|
||||
// console.log(res,"res");
|
||||
this.loading = false;
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.$router.go(-1);
|
||||
})
|
||||
} else {
|
||||
assetOfficialAccount('post',this.ruleForm).then(res=>{
|
||||
// console.log(res,"res");
|
||||
this.loading = false;
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.$router.go(-1);
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
sendBack(){
|
||||
this.$router.go(-1);
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
</script>
|
@ -1,19 +1,299 @@
|
||||
<!-- 电子邮件表单 -->
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div class="L-assets-info">
|
||||
<div class="assets-info-top">
|
||||
<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-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属单位" prop="ssdw">
|
||||
<!-- <el-input v-model="ruleForm.ssdw" placeholder="请输入单位名称"></el-input> -->
|
||||
<el-autocomplete
|
||||
v-model="ruleForm.ssdw"
|
||||
:fetch-suggestions="querySearchAsync"
|
||||
placeholder="请输入所属单位"
|
||||
|
||||
></el-autocomplete>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="电子邮箱后缀" prop="dzyxhz">
|
||||
<el-input v-model="ruleForm.dzyxhz" 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.jslx" placeholder="请选择建设类型">
|
||||
<el-option
|
||||
v-for="dict in dict.type.email_jslx"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="邮件系统供应商" required>
|
||||
<el-input v-model="ruleForm.yjxtgys" 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.mmsf" placeholder="请输入密码算法"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="邮件系统状态" required>
|
||||
<el-select v-model="ruleForm.yjxtzc" placeholder="请选择邮件系统状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.email_state"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="安全防护系统" required>
|
||||
<el-select v-model="ruleForm.aqfhxt" placeholder="请选择安全防护系统">
|
||||
<el-option
|
||||
v-for="dict in dict.type.email_hasorno"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="安全备份环境" required>
|
||||
<el-select v-model="ruleForm.aqbfhj" placeholder="请选择安全备份环境">
|
||||
<el-option
|
||||
v-for="dict in dict.type.email_hasorno"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="数字证书厂商" required>
|
||||
<el-input v-model="ruleForm.szzscs" style="width: 100%;" placeholder="请输入数字证书厂商"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="上线时间" required>
|
||||
<el-date-picker
|
||||
v-model="ruleForm.sxsj"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属行业" required>
|
||||
<el-select v-model="ruleForm.sshy" placeholder="请选择所属行业">
|
||||
<el-option
|
||||
v-for="dict in dict.type.app_sshy"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="重点行业" required>
|
||||
<el-select v-model="ruleForm.zdhy" placeholder="请选择重点行业">
|
||||
<el-option
|
||||
v-for="dict in dict.type.app_zdhy"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="行政区划" required>
|
||||
<el-select v-model="ruleForm.xzqh" placeholder="请选择行政区划">
|
||||
<el-option
|
||||
v-for="dict in dict.type.app_xzqh"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="系统责任人" required>
|
||||
<el-input v-model="ruleForm.xtzrr" 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-form-item prop="xtzrrdh"
|
||||
:rules="[
|
||||
{
|
||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||
message: '请输入正确的手机号码',
|
||||
trigger: 'blur'
|
||||
}
|
||||
]"
|
||||
>
|
||||
<el-input v-model="ruleForm.xtzrrdh" style="width: 100%;" placeholder="请输入系统责任人电话"></el-input>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="系统责任人邮箱" required>
|
||||
<el-form-item prop="xtzrryx"
|
||||
:rules="[
|
||||
{
|
||||
type: 'email',
|
||||
message: '请输入正确的邮箱地址',
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
]"
|
||||
>
|
||||
<el-input v-model="ruleForm.xtzrryx" style="width: 100%;" placeholder="请输入系统责任人邮箱"></el-input>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="系统责任人地址" required>
|
||||
<el-input v-model="ruleForm.xtzrrdz" style="width: 100%;" placeholder="请输入系统责任人地址"></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-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin: 10px 0 ;padding-bottom: 50px; 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-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { assetEmail, assetEmailInfo, unitAllList } from "@/api/auditPagesApi/index";
|
||||
export default {
|
||||
dicts:['app_xzqh','app_sshy','app_zdhy','email_jslx','email_state','email_hasorno'],
|
||||
data() {
|
||||
return {
|
||||
ruleForm:{
|
||||
|
||||
},
|
||||
rules:{
|
||||
ssdw:[
|
||||
{ required: true, message: "所属单位不能为空", trigger: "blur" }
|
||||
],
|
||||
dzyxhz:[
|
||||
{ required: true, message: "电子邮箱后缀不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
loading:false,
|
||||
disabled:false,
|
||||
}
|
||||
},
|
||||
props:['pageType', 'id'],
|
||||
mounted(){
|
||||
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');
|
||||
inputElements.forEach((input) => {
|
||||
input.placeholder = '';
|
||||
});
|
||||
textareaInputElements.forEach((input) => {
|
||||
input.placeholder = '';
|
||||
});
|
||||
})
|
||||
} else if(this.pageType == 'change') {
|
||||
this.getInfo(this.id)
|
||||
this.disabled = false;
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
getInfo(id){
|
||||
assetEmailInfo(id).then(res=>{
|
||||
this.ruleForm = res.data;
|
||||
})
|
||||
},
|
||||
// 单位名称模糊查询
|
||||
querySearchAsync(queryString, cb){
|
||||
let results = [];
|
||||
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) => {
|
||||
if(valid) {
|
||||
this.loading = true;
|
||||
if(this.pageType == 'change') {
|
||||
assetEmail('put',this.ruleForm).then(res=>{
|
||||
// console.log(res,"res");
|
||||
this.loading = false;
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.$router.go(-1);
|
||||
})
|
||||
} else {
|
||||
assetEmail('post',this.ruleForm).then(res=>{
|
||||
// console.log(res,"res");
|
||||
this.loading = false;
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.$router.go(-1);
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
sendBack(){
|
||||
this.$router.go(-1);
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
</script>
|
Loading…
Reference in new issue