Browse Source

企业资质,期限与状态的修改

master
DESKTOP-00SUCB6\Administrator 4 years ago
parent
commit
d6eb9442e5
  1. 4
      .env.development
  2. 1
      package.json
  3. 2
      public/h5/info.html
  4. 10
      src/api/system/dept.js
  5. 3
      src/components/HeaderSearch/index.vue
  6. 4
      src/layout/components/TagsView/ScrollPane.vue
  7. 99
      src/views/system/dept/index.vue
  8. 30
      src/views/system/qualification/index.vue
  9. 34
      src/views/system/user/index.vue
  10. 2
      vue.config.js

4
.env.development

@ -2,10 +2,10 @@
ENV = 'development'
# 若依管理系统/开发环境
#VUE_APP_BASE_API = 'http://121.36.65.171:9527'
VUE_APP_BASE_API = 'http://121.36.65.171:9527'
VUE_APP_H5_QR = 'http://172.119.51.219/h5/invitation.html'
VUE_APP_H5_INFO = 'http://172.119.51.219/h5/info.html'
VUE_APP_BASE_API = 'http://172.119.50.181:9527'
#VUE_APP_BASE_API = 'http://172.119.50.181:9527'
# 路由懒加载

1
package.json

@ -49,6 +49,7 @@
"js-beautify": "1.13.0",
"js-cookie": "2.2.1",
"jsencrypt": "3.0.0-rc.1",
"node-sass": "^6.0.1",
"nprogress": "0.2.0",
"quill": "1.3.7",
"screenfull": "5.0.2",

2
public/h5/info.html

@ -344,7 +344,7 @@
// 默认加载验证码
$(document).ready(function(){
enterpriseInfo()
getEnterpriseOptions()
// getEnterpriseOptions()
})
</script>

10
src/api/system/dept.js

@ -9,6 +9,16 @@ export function listDept(query) {
})
}
// 根据企业名称查询资质
export function getQualificationByDeptId(data) {
return request({
url: '/system/dept/getQualificationByDeptId',
method: 'post',
data: data
})
}
// 查询部门列表(排除节点)
export function listDeptExcludeChild(deptId) {
return request({

3
src/components/HeaderSearch/index.vue

@ -167,7 +167,8 @@ export default {
display: inline-block;
vertical-align: middle;
::v-deep .el-input__inner {
// ::v-deep .el-input__inner {
/deep/ .el-input__inner {
border-radius: 0;
border: 0;
padding-left: 0;

4
src/layout/components/TagsView/ScrollPane.vue

@ -82,13 +82,13 @@ export default {
position: relative;
overflow: hidden;
width: 100%;
::v-deep {
// ::v-deep {
.el-scrollbar__bar {
bottom: 0px;
}
.el-scrollbar__wrap {
height: 49px;
}
}
// }
}
</style>

99
src/views/system/dept/index.vue

@ -49,16 +49,21 @@
>
<el-table-column prop="deptName" label="组织名称" ></el-table-column>
<el-table-column prop="cryptoDeptId" label="组织编号"></el-table-column>
<el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
<!-- <el-table-column prop="orderNum" label="排序" width="200"></el-table-column> -->
<el-table-column prop="status" label="状态" :formatter="statusFormat" width="150"></el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="200">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="showQualificationList(scope.row.createBy)"
>查看资质</el-button>
<!-- <el-button
size="mini"
type="text"
icon="el-icon-edit"
@ -79,11 +84,76 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:dept:remove']"
>删除</el-button>
>删除</el-button> -->
</template>
</el-table-column> -->
</el-table-column>
</el-table>
<el-dialog title="资质列表" :visible.sync="outerVisible">
<el-dialog
width="30%"
title="资质详情"
:visible.sync="innerVisible"
append-to-body>
<el-form ref="qualificationFrom" :model="qualificationFrom" label-width="120px">
<el-row>
<el-col :span="12">
<el-form-item label="资质证书名称:">
<span>{{qualificationFrom.qualificationName}}</span>
</el-form-item>
<el-form-item label="发证日期:">
<span>{{qualificationFrom.dateOfIssue}}</span>
</el-form-item>
<el-form-item label="发证机关:">
<span>{{qualificationFrom.issuingAuthority}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="资质证书编号:">
<span>{{qualificationFrom.qualificationCertificateNumber}}</span>
</el-form-item>
<el-form-item label="证书有效期:">
<span>{{qualificationFrom.certificateValidityPeriod}}</span>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="资质证书:">
<img :src="qualificationFrom.qualificationCertificatePicture" style="width:80%">
</el-form-item>
</el-form>
</el-dialog>
<el-table
:data="enterpriseQualificationList"
border
style="width: 100%">
<el-table-column
prop="dateOfIssue"
label="发证日期">
</el-table-column>
<el-table-column
prop="certificateValidityPeriod"
label="证书有效期">
</el-table-column>
<el-table-column
prop="qualificationCertificateNumber"
label="资质证书号">
</el-table-column>
<el-table-column
prop="qualificationName"
label="资质名称">
</el-table-column>
<el-table-column
prop="issuingAuthority"
label="发证机关">
</el-table-column>
<el-table-column
label="操作"
width="50">
<template slot-scope="scope">
<el-button type="text" size="small" @click="showQualificationDetail(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
</el-dialog>
<!-- 添加或修改组织对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
@ -140,7 +210,7 @@
</template>
<script>
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild, getQualificationByDeptId } from "@/api/system/dept";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@ -161,6 +231,12 @@ export default {
title: "",
//
open: false,
//
outerVisible:false,
innerVisible:false,
//
enterpriseQualificationList:[],
qualificationFrom:{},
//
statusOptions: [],
//
@ -213,6 +289,17 @@ export default {
this.loading = false;
});
},
//
showQualificationList(name){
getQualificationByDeptId({createBy:name}).then(res => {
this.enterpriseQualificationList = res.data
this.outerVisible = true
})
},
showQualificationDetail(row){
this.qualificationFrom = row
this.innerVisible = true
},
/** 转换组织数据结构 */
normalizer(node) {
if (node.children && !node.children.length) {

30
src/views/system/qualification/index.vue

@ -83,6 +83,14 @@
</template>
</el-table-column>
<el-table-column label="证书有效期" align="center" prop="certificateValidityPeriod" />
<el-table-column label="证书状态" align="center" prop="isOverTime">
<template slot-scope="scope">
<span v-if="scope.row.isOverTime == 0" class="text-navy">正常</span>
<span v-else-if="scope.row.isOverTime == 1" class="text-warning">临期</span>
<span v-else-if="scope.row.isOverTime == 2" class="text-danger">过期</span>
</template>
</el-table-column>
<el-table-column label="是否公开" align="center" prop="isItPublic">
<template slot-scope="scope">
{{scope.row.isItPublic == 0 ? '是':'否'}}
@ -140,7 +148,14 @@
</el-date-picker>
</el-form-item>
<el-form-item label="证书有效期" prop="certificateValidityPeriod">
<el-input v-model="form.certificateValidityPeriod" placeholder="请输入证书有效期" />
<!-- <el-input v-model="form.certificateValidityPeriod" placeholder="请输入证书有效期" /> -->
<el-date-picker
v-model="form.certificateValidityPeriod"
align="right"
type="date"
placeholder="选择日期"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label="资质证书">
<imageUpload v-model="form.qualificationCertificatePicture"/>
@ -220,6 +235,17 @@ export default {
issuingAuthority: [
{ required: true, message: "发证机关不能为空", trigger: "blur" }
],
},
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now();
},
shortcuts: [{
text: '无固定期限',
onClick(picker) {
picker.$emit('pick', '2099-12-31');
}
}]
}
};
},
@ -228,7 +254,7 @@ export default {
// this.getDicts("sys_normal_disable").then(response => {
// this.isItPublicOptions = response.data;
// });
console.log(this.$store.getters.roles.indexOf('admin'));
// console.log(this.$store.getters.roles.indexOf('admin'));
},
methods: {

34
src/views/system/user/index.vue

@ -2,7 +2,7 @@
<div class="app-container">
<el-row :gutter="20">
<!--部门数据-->
<el-col :span="4" :xs="24">
<el-col :span="7" :xs="24">
<div class="head-container">
<el-input
v-model="deptName"
@ -26,7 +26,7 @@
</div>
</el-col>
<!--用户数据-->
<el-col :span="20" :xs="24">
<el-col :span="17" :xs="24">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="用户名称" prop="userName">
<el-input
@ -85,6 +85,7 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
v-if="isAdmin"
type="primary"
plain
icon="el-icon-plus"
@ -146,7 +147,12 @@
<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
<!-- <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" /> -->
<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
<el-table-column label="状态(启用/停用)" align="center" key="status" v-if="columns[5].visible">
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[5].visible" width="160">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="状态(启用/停用)" align="center" key="status" v-if="isAdmin">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
@ -156,12 +162,9 @@
></el-switch>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[6].visible" width="160">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column
v-if="isAdmin"
label="操作"
align="center"
width="160"
@ -238,7 +241,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="归属部门" prop="deptId">
<treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
<treeselect v-model="form.deptId" :options="addDeptOptions" :show-count="true" placeholder="请选择归属部门" />
</el-form-item>
</el-col>
</el-row>
@ -358,6 +361,8 @@ export default {
components: { Treeselect },
data() {
return {
loginName:this.$store.getters.name,
isAdmin:false,
//
loading: true,
//
@ -378,6 +383,7 @@ export default {
title: "",
//
deptOptions: undefined,
addDeptOptions: undefined,
//
open: false,
//
@ -431,7 +437,7 @@ export default {
{ key: 2, label: `用户昵称`, visible: true },
{ key: 3, label: `部门`, visible: true },
{ key: 4, label: `手机号码`, visible: true },
{ key: 5, label: `状态`, visible: true },
// { key: 5, label: ``, visible: true },
{ key: 6, label: `创建时间`, visible: true }
],
//
@ -506,6 +512,14 @@ export default {
//
handleNodeClick(data) {
this.queryParams.deptId = data.id;
if(this.loginName == data.createBy)
{
this.isAdmin = true
this.addDeptOptions = [data]
console.log(this.deptOptions,this.addDeptOptions);
} else {
this.isAdmin = false
}
this.getList();
},
//

2
vue.config.js

@ -17,7 +17,7 @@ module.exports = {
// 部署生产环境和开发环境下的URL。
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
publicPath: process.env.NODE_ENV === "production" ? "./" : "/",
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
outputDir: 'dist',
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)

Loading…
Cancel
Save