Commit 9249eff6 authored by xinzhedeai's avatar xinzhedeai

科技局 用户操作范围处理 -waiting test

parent 24c61085
var Tools = function(){
var isHighTech = function(){
return ~~localStorage.getItem('groupIdByloginType')===2
};
// 日期时间工具
var Dates = function(){
/*
......@@ -453,6 +455,7 @@ var Tools = function(){
Dates:Dates(), arrayJsonToJson,
asyncLoop, checkbox, fileElTobase64,
createOnSelect, cuPrint, downloadFile,
isHighTech,
}
};
......
......@@ -488,7 +488,7 @@ var reqApis = function(){
name: '孵化器管理',
Dict: {
baseInfo: {
// "incubatorId": {name:"孵化器名称", must:true, 'type':'select', val:'id', key:'name',},
"incubatorId": {name:"孵化器名称", must:true, 'type':'select', val:'id', key:'name', showYN: Tools.isHighTech()},
"year": {
name:"年度", must:true, 'type':'date', 'datetype':'year','format':'yyyy'
},
......@@ -539,11 +539,11 @@ var reqApis = function(){
rightBtn: [
],
search: [
// {
// 'type': 'string', 'name': '孵化器名称', 'word': 'incubatorName', 'mode': 0, 'width': '180px', 'clear': function () {
// this.loadData()
// }
// },
{
'type': 'string', 'name': '孵化器名称', 'word': 'incubatorName', 'mode': 0, 'width': '180px', showYN: Tools.isHighTech(), 'clear': function () {
this.loadData()
}
},
{
'type': 'date', 'datetype':'year','defaultTime': ['2024'], 'name': '年度', 'word': 'year', 'mode': 0, 'width':'140px',
'change': function(a, b){
......@@ -566,7 +566,7 @@ var reqApis = function(){
Dict: {
baseInfo: {
"companyName": {name:"企业名称", must:true },
// "incubatorId": {name:"所属孵化器", must:true, table:0, 'type':'select', key:'name', },
"incubatorId": {name:"所属孵化器", must:true, 'type':'select', key:'name', showYN: Tools.isHighTech()},
"technicalField": {name:"所属技术领域", must:true, 'type':'select', key:'name', },
"entryDate": {
......@@ -664,18 +664,18 @@ var reqApis = function(){
"softwareCopyrightNumber": { 'type': '', 'name': '软件著作权数(件)', table:0, },
"isTechSme": { 'type': 'select', 'name': '是否科技型中小企业', table:0, },
"techSmeDate": { 'type': 'date', 'name': '最新评选日期', table:0, mode:7, },
"isHighGrowthInnovative": { 'type': 'select', 'name': '是否创新性中小企业', table:0, },
"highGrowthInnovativeDate": { 'type': 'date', 'name': '最新评选日期', table:0, mode:7,},
"isHighTech": { 'type': 'select', 'name': '是否高新技术企业', table:0, },
"highTechDate": { 'type': 'date', 'name': '最新评选日期', table:0, mode:7, },
"isAdvancedTechService": { 'type': 'select', 'name': '是否技术先进型服务企业', table:0, },
"advancedTechServiceDate": { 'type': 'date', 'name': '最新评选日期', table:0, mode:7, },
"isSpecializedSpecialEnterprises": { 'type': 'select', 'name': '是否专精特新企业', table:0, },
"specializedSpecialEnterprisesDate": { 'type': 'date', 'name': '最新评选日期', table:0, mode:7, },
"isGazelle": { 'type': 'select', 'name': '是否瞪羚企业', table:0, },
"gazelleDate": { 'type': 'date', 'name': '最新评选日期', table:0, mode:7, },
"isLittleGiant": { 'type': 'select', 'name': '是否小巨人企业', table:0, },
"littleGiantDate": { 'type': 'date', 'name': '最新评选日期', table:0, mode:7, },
"isSpecializedSpecialEnterprises": { 'type': 'select', 'name': '是否专精特新企业', table:0, },
"specializedSpecialEnterprisesDate": { 'type': 'date', 'name': '最新评选日期', table:0, mode:7, },
"isHighGrowthInnovative": { 'type': 'select', 'name': '是否创新性中小企业', table:0, },
"highGrowthInnovativeDate": { 'type': 'date', 'name': '最新评选日期', table:0, mode:7,},
"isAdvancedTechService": { 'type': 'select', 'name': '是否技术先进型服务企业', table:0, },
"advancedTechServiceDate": { 'type': 'date', 'name': '最新评选日期', table:0, mode:7, },
......@@ -775,7 +775,7 @@ var reqApis = function(){
}
},
{
type: 'primary', icon: 'el-icon-folder-add', name: '导入企业基础信息', 'callback':function(){
type: 'primary', icon: 'el-icon-folder-add', name: '导入企业基础信息', showYN: !Tools.isHighTech(), 'callback':function(){
var m = this;
m.uploadView = qf.UI.popWindow({
cover:true,
......@@ -855,7 +855,7 @@ var reqApis = function(){
}
},
{
type: 'primary', icon: 'el-icon-folder-add', name: '导入企业经营信息', 'callback':function(){
type: 'primary', icon: 'el-icon-folder-add', name: '导入企业经营信息', showYN: !Tools.isHighTech(), 'callback':function(){
var m = this;
m.uploadView = qf.UI.popWindow({
cover:true,
......@@ -954,6 +954,11 @@ var reqApis = function(){
this.loadData()
}
},
{
'type': 'string', 'name': '孵化器名称', 'word': 'incubatorName', 'mode': 0, 'width': '180px', showYN: Tools.isHighTech(), 'clear': function () {
this.loadData()
}
},
{ 'type': 'select', 'name': '在孵状态', 'word': 'incubationStatus', 'mode': 1, 'width': '140px' },
{ 'type': 'select', 'name': '企业类型', 'word': 'companyType', 'mode': 1, 'width': '140px' },
{ 'type': 'select', 'name': '企业级别', 'word': 'companyLevel', 'mode': 1, 'width': '140px' },
......@@ -1155,6 +1160,7 @@ var reqApis = function(){
Dict: {
baseInfo: {
"mentorName": {name:"导师姓名", must:true},
"incubatorId": {name:"所属孵化器", must:true, 'type':'select', key:'name', showYN: Tools.isHighTech()},
"education": {name:"学历", must:true },
"graduationSchool": {name:"毕业学校", },
"contactPhone": {name:"联系电话", },
......@@ -1184,10 +1190,17 @@ var reqApis = function(){
},
selectList: {
incubatorId: function () {
return reqPublic('/api/incubator/list', 'get', {}).then(function (res) {
return res.body || [];
var slist = this.selectList;
return reqPublic('api/company/dic', 'get', {}).then(function (res) {
var body = res.body || {};
for (var key in body) {
var val = body[key];
slist[key] = val
}; return body.incubatorId;
});
},
},
},
config: {
......@@ -1223,6 +1236,11 @@ var reqApis = function(){
this.loadData()
}
},
{
'type': 'string', 'name': '孵化器名称', 'word': 'incubatorName', 'mode': 0, 'width': '180px', showYN: Tools.isHighTech(), 'clear': function () {
this.loadData()
}
},
{ 'type': 'daterange', 'defaultTime': ['00:00:00', '23:59:59'], 'name': '日期范围', 'word': 'daterange', 'mode': 0, 'width': '300px', format: 'yyyy-MM-dd' },
{
'type': 'button', 'label': '查询', 'width': '140px', 'icon': 'el-icon-search', 'click': function (e) {
......
......@@ -56,7 +56,7 @@
<!--工具栏-->
<div class="head-container" v-if="form.config.search && form.config.search[0]">
<!-- 搜索 -->
<template v-for="(item, index) in form.config.search">
<template v-for="(item, index) in form.config.search" v-if="item.showYN !==false">
<label v-if="item.name && item.showLabel" class="el-form-item-label">{{item.name}}</label>
<template v-if="item.type==='string'">
<el-input v-model="form.query[item.word]" clearable :placeholder="item.name" :style="'width:'+item.width" @clear="item.clear && item.clear.call(_self.$parent)"/>
......
......@@ -63,7 +63,7 @@
<template>
<el-dialog id="printJS-form" class="qyzz-dialog" append-to-body :close-on-click-modal="false" :before-close="cancelForm" :visible.sync="form.visible" :title="form.title" :width="form.config.formWidth || '50%'">
<el-form :model="form.item" :rules="rules" :ref="ref" :inline="true" size="small" :label-width="(form.config.labelWidth || 80) + 'px'">
<el-form-item v-for="(item, key) in Dict.baseInfo" :prop="item.rule || key" :label="item.name" v-if="item.form !== 0" :style="item.style" :class="{'isHide': item.mode===7, [key]: item.mode===7}" :ref="key">
<el-form-item v-for="(item, key) in Dict.baseInfo" :prop="item.rule || key" :label="item.name" v-if="item.form !== 0 && item.showYN !==false" :style="item.style" :class="{'isHide': item.mode===7, [key]: item.mode===7}" :ref="key">
<template v-if="item.type === 'img'">
<div class="img-upload">
<label class="upload-area" for="imgUpload">
......
......@@ -56,7 +56,7 @@
<div class="content cu-table">
<!-- :style="'width:'+ (item.fixed ? '400px' : 'auto') +" -->
<el-table :data="table.dataList" v-loading="table.loading" border style="width: 100%;" :row-class-name="tableRowClassName">
<template v-for="(item, key) in Dict.baseInfo" v-if="item.table !== 0">
<template v-for="(item, key) in Dict.baseInfo" v-if="item.table !== 0 && item.showYN !==false" >
<el-table-column v-if="item.type === 'select'" :prop="key" :label="item.name" :fixed="fixed" :width="item.width||'200px'">
<template slot-scope="scope">
<template v-for="sitem in Dict.selectList[key]">
......
......@@ -19,6 +19,7 @@
<el-button type="text" style="font-size: 18px;">公司数:{{ table.total }}</el-button>
<el-button
v-for="(item, key) in form.config.otherBtn"
v-show="item.name==='添加企业' || showYN"
size="mini"
:type="item.type"
:icon="item.icon"
......@@ -29,7 +30,7 @@
<!-- <el-button type="primary" size="mini" icon="el-icon-upload" @click="dialogVisible=true">导入企业基础信息</el-button>
<el-button type="primary" size="mini" icon="el-icon-upload">导入企业经营信息</el-button> -->
</div>
<div>
<div v-if="showYN">
<el-button
v-for="(item, key) in form.config.rightBtn"
size="mini"
......@@ -179,7 +180,7 @@ import { Tools } from "@/assets/js/common.js";
import DateRangePicker from "@/components/DateRangePicker";
import TableFilter from "@/components/TableFilter/index2";
import cuForm from "@/components/cuForm/index2";
import cuTable from "@/components/cuTable";
import cuTable from "@/components/cuTable/index2";
export default {
name: "Dashboard",
......@@ -191,6 +192,7 @@ export default {
},
data() {
return {
showYN: !Tools.isHighTech(),
dialogVisible: false,
uploadError: '',
hasBasicInfo: false,
......
......@@ -52,9 +52,9 @@
import { reqApi, Config } from '@/assets/js/httpApi.js';
import { Tools } from '@/assets/js/common.js';
import DateRangePicker from '@/components/DateRangePicker';
import TableFilter from '@/components/TableFilter';
import cuForm from '@/components/cuForm';
import cuTable from '@/components/cuTable';
import TableFilter from '@/components/TableFilter/index2';
import cuForm from '@/components/cuForm/index2';
import cuTable from '@/components/cuTable/index2';
export default {
name: 'Dashboard',
......
......@@ -52,9 +52,9 @@
import { reqApi, Config } from '@/assets/js/httpApi.js';
import { Tools } from '@/assets/js/common.js';
import DateRangePicker from '@/components/DateRangePicker';
import TableFilter from '@/components/TableFilter';
import cuForm from '@/components/cuForm';
import cuTable from '@/components/cuTable';
import TableFilter from '@/components/TableFilter/index2';
import cuForm from '@/components/cuForm/index2';
import cuTable from '@/components/cuTable/index2';
export default {
name: 'Dashboard',
......
......@@ -126,7 +126,7 @@
<el-option
v-for="item in roles"
:key="item.name"
:disabled="level !== 1 && item.level <= level"
:disabled="item.level < level"
:label="item.name"
:value="item.id"
/>
......
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