|
@@ -56,7 +56,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-collapse-item>
|
|
|
- </template>
|
|
|
+ </template>
|
|
|
<el-collapse-item title="企业信息" name="3">
|
|
|
<el-row :gutter="40">
|
|
|
<el-col :span="12">
|
|
@@ -290,6 +290,16 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="其他附件" prop="attachIds">
|
|
|
<FileUpload :files="registerForm.fileList" @input="handleSaleSuccess" :multiple="true" :params="params">上传材料</FileUpload>
|
|
|
+ <el-table v-loading="loading" :data="list" border style="width: 100%;margin-top: 5px;" v-if="dataId">
|
|
|
+ <el-table-column label="序号" type="index" width="50" align="center"></el-table-column>
|
|
|
+ <el-table-column label="文件名称" prop="fileName" align="center"></el-table-column>
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" @click="handleView(scope.row)">查看</el-button>
|
|
|
+ <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
<!-- <FileUpload :files="registerForm.attachIds" @input="handleSaleSuccess" :multiple="true">上传材料</FileUpload> -->
|
|
|
</el-form-item>
|
|
|
</el-collapse-item>
|
|
@@ -329,13 +339,22 @@
|
|
|
<!-- 底部 -->
|
|
|
<div class="el-register-footer">
|
|
|
<span>Copyright © 2022 All Rights Reserved.</span>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ title="预览"
|
|
|
+ width="800"
|
|
|
+ append-to-body>
|
|
|
+ <img
|
|
|
+ :src="dialogImageUrl"
|
|
|
+ style="display: block; max-width: 100%; margin: 0 auto"/>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
|
|
|
-import { getCodeImg, registerEntApi,getEntUserById } from "@/api/login";
|
|
|
+import { getCodeImg, registerEntApi,getEntUserById,entUserAudit,enterUserNoToken,getEnclosureApi,deleteEnclosureApi } from "@/api/login";
|
|
|
import {getProvinceDataApi,getRegionChildrenApi} from "@/api/common/common"
|
|
|
import { regTypeOptions,mainProductsOptions,yesOrNoOptions } from "@/utils/dataFormat"
|
|
|
import FileUpload from '@/components/FileUpload'
|
|
@@ -363,8 +382,13 @@ export default {
|
|
|
attachType: 'ENT',
|
|
|
dataId: ''
|
|
|
},
|
|
|
+ dialogVisible: false,
|
|
|
+ dialogImageUrl: "",
|
|
|
activeName: '1',
|
|
|
provinceName: '',
|
|
|
+ attachType: 'ENT',
|
|
|
+ dataId: '',
|
|
|
+ list: [],
|
|
|
token: '',
|
|
|
cityName: '',
|
|
|
districtName: '',
|
|
@@ -524,11 +548,20 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ getEnclosureData() {
|
|
|
+ getEnclosureApi(this.token,this.attachType, this.dataId).then(res => {
|
|
|
+ this.list = res.data.records
|
|
|
+ })
|
|
|
+ },
|
|
|
getData() {
|
|
|
this.loading = true
|
|
|
getEntUserById(this.token).then(res => {
|
|
|
this.loading = false
|
|
|
this.registerForm = res.data || {}
|
|
|
+ this.dataId = res.data.id || {}
|
|
|
+ if(this.dataId) {
|
|
|
+ this.getEnclosureData()
|
|
|
+ }
|
|
|
let mainProductArray = this.registerForm.mainProducts.split(',') || ['电子信息'];
|
|
|
this.$set(this.registerForm, 'mainProductArray', mainProductArray);
|
|
|
this.registerForm.serviceDate = []
|
|
@@ -576,6 +609,33 @@ export default {
|
|
|
this.registerForm.licensePath = file
|
|
|
this.$refs.licenseUpload.clearValidate()
|
|
|
},
|
|
|
+ handleView(row) {
|
|
|
+ // 获取文件路径
|
|
|
+ const fileUrl = row.url
|
|
|
+ // 获取最后一个.的位置
|
|
|
+ const index = fileUrl.lastIndexOf(".")
|
|
|
+ // 获取后缀
|
|
|
+ const ext = fileUrl.substr(index+1)
|
|
|
+ if(ext == 'jpg' || ext == 'png' || ext == 'jpeg') {
|
|
|
+ this.dialogVisible = true
|
|
|
+ this.dialogImageUrl = fileUrl
|
|
|
+ }else {
|
|
|
+ window.open(fileUrl)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleDelete(row) {
|
|
|
+ const id = row.id;
|
|
|
+ this.$confirm('是否确认删除该数据?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function() {
|
|
|
+ return deleteEnclosureApi(this.token,id);
|
|
|
+ }).then(() => {
|
|
|
+ this.getEnclosureData()
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ })
|
|
|
+ },
|
|
|
//选择省份
|
|
|
getCityData() {
|
|
|
this.registerForm.cityId = ''
|
|
@@ -637,21 +697,40 @@ export default {
|
|
|
this.registerForm.mainProducts = this.registerForm.mainProductArray.join(',')
|
|
|
this.$refs.registerForm.validate(valid => {
|
|
|
if (valid) {
|
|
|
- this.loading = true;
|
|
|
- registerEntApi(this.registerForm).then(res => {
|
|
|
- const userName = this.registerForm.userName;
|
|
|
- this.$alert("<font color='red'>恭喜你,您的账号 " + userName + " 注册成功!</font>", '系统提示', {
|
|
|
- dangerouslyUseHTMLString: true,
|
|
|
- type: 'success'
|
|
|
- }).then(() => {
|
|
|
- this.$router.push("/login");
|
|
|
- }).catch(() => {});
|
|
|
- }).catch(() => {
|
|
|
- this.loading = false;
|
|
|
- // if (this.captchaOnOff) {
|
|
|
- // this.getCode();
|
|
|
- // }
|
|
|
- })
|
|
|
+ this.loading = true;
|
|
|
+ if(this.token) {
|
|
|
+ entUserAudit(this.token, this.registerForm).then(res => {
|
|
|
+ this.$alert("注册信息修改成功", '系统提示', {
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ type: 'success'
|
|
|
+ }).then(() => {
|
|
|
+ this.$store.dispatch('LogOut').then(() => {
|
|
|
+ this.$router.push("/login");
|
|
|
+ })
|
|
|
+ }).catch(() => {});
|
|
|
+ }).catch(() => {
|
|
|
+ this.loading = false;
|
|
|
+ // if (this.captchaOnOff) {
|
|
|
+ // this.getCode();
|
|
|
+ // }
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ registerEntApi(this.registerForm).then(res => {
|
|
|
+ const userName = this.registerForm.userName;
|
|
|
+ this.$alert("<font color='red'>恭喜你,您的账号 " + userName + " 注册成功!</font>", '系统提示', {
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ type: 'success'
|
|
|
+ }).then(() => {
|
|
|
+ this.$router.push("/login");
|
|
|
+ }).catch(() => {});
|
|
|
+ }).catch(() => {
|
|
|
+ this.loading = false;
|
|
|
+ // if (this.captchaOnOff) {
|
|
|
+ // this.getCode();
|
|
|
+ // }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
}
|