Merge pull request 'dj' (#118) from dj into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/118
This commit is contained in:
67
src/components/FileUpload.vue
Normal file
67
src/components/FileUpload.vue
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
<template>
|
||||||
|
<el-upload :file-list="_value"
|
||||||
|
:action="uploadFileUrl"
|
||||||
|
:headers="headers"
|
||||||
|
:limit="maxSize"
|
||||||
|
with-credentials
|
||||||
|
:multiple="maxSize > 0"
|
||||||
|
:data="uploadParams"
|
||||||
|
:auto-upload="true"
|
||||||
|
:before-upload="beforeUpload"
|
||||||
|
:on-success="handleUploadSuccess"
|
||||||
|
>
|
||||||
|
<el-button color="#DED0B2">上传文件</el-button>
|
||||||
|
</el-upload>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {defineProps, computed, ref} from "vue";
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
import { getToken } from '@/utils/auth'
|
||||||
|
const baseURL = import.meta.env.VITE_BASE_URL
|
||||||
|
const uploadFileUrl = ref(baseURL + "/workflow/process/file")
|
||||||
|
const headers = reactive({
|
||||||
|
authorization: getToken()
|
||||||
|
})
|
||||||
|
const disabled = ref(false)
|
||||||
|
const uploadParams = ref({})
|
||||||
|
const props = defineProps({
|
||||||
|
value: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
maxSize: {
|
||||||
|
type: Number,
|
||||||
|
default: 5
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const emit = defineEmits(["input","getFile"])
|
||||||
|
const fileList = ref([])
|
||||||
|
const _value = computed({
|
||||||
|
get() {
|
||||||
|
return props.value;
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
emit("input", val);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const beforeUpload = (file) => {
|
||||||
|
// if (props.maxSize > 0 && file.size / 1024 / 1024 > props.maxSize) {
|
||||||
|
// ElMessage.warning(`每个文件最大不超过 ${props.maxSize}MB`)
|
||||||
|
// } else {
|
||||||
|
return true
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
const handleUploadSuccess = (res, file) => {
|
||||||
|
if (res.code !== 1000) {
|
||||||
|
ElMessage.error("上传失败")
|
||||||
|
}
|
||||||
|
let data = res.data
|
||||||
|
fileList.value.push(data)
|
||||||
|
emit("getFile", fileList.value)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
@@ -60,13 +60,17 @@ const props = defineProps({
|
|||||||
toolbar: {
|
toolbar: {
|
||||||
type: [String, Array],
|
type: [String, Array],
|
||||||
default: [
|
default: [
|
||||||
"fullscreen undo redo restoredraft | cut copy paste pastetext | forecolor backcolor bold italic underline strikethrough link anchor | alignleft aligncenter alignright alignjustify outdent indent | bullist numlist | blockquote subscript superscript removeformat ",
|
"fullscreen undo redo | cut copy paste pastetext | forecolor backcolor bold italic underline strikethrough link anchor | alignleft aligncenter alignright alignjustify outdent indent | bullist numlist | blockquote subscript superscript removeformat ",
|
||||||
"styleselect formatselect fontselect fontsizeselect | table image axupimgs media pagebreak insertdatetime selectall visualblocks searchreplace | code preview | indent2em lineheight formatpainter",
|
"styleselect formatselect fontselect fontsizeselect | table image axupimgs media pagebreak insertdatetime selectall visualblocks searchreplace | code preview | indent2em lineheight formatpainter",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
fontFormats: {
|
fontFormats: {
|
||||||
type: [String, Array],
|
type: [String, Array],
|
||||||
default: "微软雅黑=Microsoft YaHei,Helvetica Neue,PingFang SC,sans-serif;苹果苹方=PingFang SC,Microsoft YaHei,sans-serif;宋体=simsun,serif;仿宋体=FangSong,serif;黑体=SimHei,sans-serif;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;"
|
default: "微软雅黑=Microsoft YaHei,Helvetica Neue,PingFang SC,sans-serif;苹果苹方=PingFang SC,Microsoft YaHei,sans-serif;宋体=simsun,serif;仿宋体=FangSong,serif;黑体=SimHei,sans-serif;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;"
|
||||||
|
},
|
||||||
|
height:{
|
||||||
|
type: Number,
|
||||||
|
default: 450
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const content = ref(props.value);
|
const content = ref(props.value);
|
||||||
@@ -78,9 +82,9 @@ const init = reactive({
|
|||||||
content_css: '/skins/content/default/content.css',
|
content_css: '/skins/content/default/content.css',
|
||||||
language: 'zh_CN',
|
language: 'zh_CN',
|
||||||
placeholder: "在这里输入文字", //textarea中的提示信息
|
placeholder: "在这里输入文字", //textarea中的提示信息
|
||||||
min_width: 320,
|
min_width: 300,
|
||||||
min_height: 220,
|
min_height: 200,
|
||||||
height: 500, //注:引入autoresize插件时,此属性失效
|
height: props.height, //注:引入autoresize插件时,此属性失效
|
||||||
resize: "both", //编辑器宽高是否可变,false-否,true-高可变,'both'-宽高均可,注意引号
|
resize: "both", //编辑器宽高是否可变,false-否,true-高可变,'both'-宽高均可,注意引号
|
||||||
promotion: false,
|
promotion: false,
|
||||||
branding: false, //tiny技术支持信息是否显示
|
branding: false, //tiny技术支持信息是否显示
|
||||||
|
|||||||
@@ -1,28 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-form
|
<el-form
|
||||||
:model="form"
|
:model="form"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
label-width="auto"
|
label-width="auto"
|
||||||
ref="formInstance"
|
ref="formInstance"
|
||||||
class="search-form"
|
class="search-form"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col
|
<el-col
|
||||||
v-for="(item, index) in filterConfig"
|
v-for="(item, index) in filterConfig"
|
||||||
:span="5"
|
:span="5"
|
||||||
:offset="index == 0 || index / 4 ==1 ? 0 : 1"
|
:offset="index == 0 || index / 4 ==1 ? 0 : 1"
|
||||||
:key="item.prop"
|
|
||||||
>
|
|
||||||
<el-form-item
|
|
||||||
v-bind="item"
|
|
||||||
:key="item.prop"
|
:key="item.prop"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
v-bind="item"
|
||||||
|
:key="item.prop"
|
||||||
>
|
>
|
||||||
<template #default>
|
<template #default>
|
||||||
<component
|
<component
|
||||||
:is="item.component"
|
:is="item.component"
|
||||||
v-bind="item.props || {}"
|
v-bind="item.props || {}"
|
||||||
v-on="item.on || {}"
|
v-on="item.on || {}"
|
||||||
v-model="form[item.prop]"
|
v-model="form[item.prop]"
|
||||||
>
|
>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<el-button v-if="searchConfig.length>=4" link type="primary" @click="showMore = !showMore">
|
<el-button v-if="searchConfig.length>=4" link type="primary" @click="showMore = !showMore">
|
||||||
{{ showMore ? '收起' : '展开' }}
|
{{ showMore ? '收起' : '展开' }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" @click="getValues" :icon="Search">搜索</el-button>
|
<el-button @click="getValues" color="#DED0B2" :icon="Search">搜索</el-button>
|
||||||
<el-button @click="handleReset" :icon="Refresh">重置</el-button>
|
<el-button @click="handleReset" :icon="Refresh">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -58,22 +58,22 @@ const formInstance = ref(null)
|
|||||||
|
|
||||||
const showMore = ref(false)
|
const showMore = ref(false)
|
||||||
|
|
||||||
const filterConfig = computed(()=>{
|
const filterConfig = computed(() => {
|
||||||
const arr = props.searchConfig.filter(item=>{
|
const arr = props.searchConfig.filter(item => {
|
||||||
if(item.prop) return true
|
if (item.prop) return true
|
||||||
})
|
})
|
||||||
return arr.length >= 4 && showMore.value ? arr : arr.slice(0, 3)
|
return arr.length >= 4 && showMore.value ? arr : arr.slice(0, 3)
|
||||||
})
|
})
|
||||||
|
|
||||||
// 搜索功能表单元素默认值
|
// 搜索功能表单元素默认值
|
||||||
const setDefaultFormValues = () => {
|
const setDefaultFormValues = () => {
|
||||||
filterConfig.value.forEach(item=>{
|
filterConfig.value.forEach(item => {
|
||||||
form.value[item.prop] = item.props?.defaultValue || null
|
form.value[item.prop] = item.props?.defaultValue || null
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
watchEffect(()=>{
|
watchEffect(() => {
|
||||||
if(filterConfig.value.length) {
|
if (filterConfig.value.length) {
|
||||||
setDefaultFormValues()
|
setDefaultFormValues()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -90,8 +90,8 @@ const handleReset = () => {
|
|||||||
emits('search', form.value)
|
emits('search', form.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(()=>{
|
onMounted(() => {
|
||||||
emits('getInstance', Object.assign({}, unref(formInstance),{
|
emits('getInstance', Object.assign({}, unref(formInstance), {
|
||||||
getValues,
|
getValues,
|
||||||
handleReset,
|
handleReset,
|
||||||
}))
|
}))
|
||||||
@@ -103,9 +103,10 @@ onMounted(()=>{
|
|||||||
.search-form {
|
.search-form {
|
||||||
padding-top: 18px;
|
padding-top: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-col {
|
.btn-col {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -2,10 +2,11 @@
|
|||||||
<div class="fv-table-container">
|
<div class="fv-table-container">
|
||||||
<!-- 表格头部按钮 -->
|
<!-- 表格头部按钮 -->
|
||||||
<div class="fv-table-btn" v-if="tableConfig.btns">
|
<div class="fv-table-btn" v-if="tableConfig.btns">
|
||||||
<el-button
|
<el-button
|
||||||
v-for="btn in tableConfig.btns"
|
v-for="btn in tableConfig.btns"
|
||||||
:key="btn.key"
|
:key="btn.key"
|
||||||
:type="btn.type || ''"
|
:type="btn.type || ''"
|
||||||
|
:color="btn.color || ''"
|
||||||
v-perm="btn.auth || ['*:*:*']"
|
v-perm="btn.auth || ['*:*:*']"
|
||||||
@click="handleClickBtns(btn.key)"
|
@click="handleClickBtns(btn.key)"
|
||||||
>
|
>
|
||||||
@@ -47,7 +48,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<fvPagination
|
<fvPagination
|
||||||
v-if="pagination"
|
v-if="pagination"
|
||||||
:current-page="localData.query.pageNum"
|
:current-page="localData.query.pageNum"
|
||||||
:page-size="localData.query.pageSize"
|
:page-size="localData.query.pageSize"
|
||||||
@@ -180,9 +181,9 @@ defineExpose({ refresh, updateLoading, getQuery, tableInstance })
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<div class="user-box">
|
<div class="user-box">
|
||||||
<div>
|
<div>
|
||||||
<!-- <img :src="userInfo.avatar" alt="" @click.stop="handleVisitedP">-->
|
<!-- <img :src="userInfo.avatar" alt="" @click.stop="handleVisitedP">-->
|
||||||
<span>欢迎回来,{{userInfo.userName}}</span>
|
<span @click.stop="handleVisitedP">欢迎回来,{{userInfo.userName}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="person" v-if="visitedP">
|
<div class="person" v-if="visitedP">
|
||||||
<ul>
|
<ul>
|
||||||
@@ -81,6 +81,7 @@ const handleLogout = () => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.user-box{
|
.user-box{
|
||||||
|
cursor: pointer;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
>div:first-child{
|
>div:first-child{
|
||||||
|
|||||||
@@ -16,15 +16,19 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<h4>待办 ({{ todoNum }})</h4>
|
<h4>待办 ({{ todoNum }})</h4>
|
||||||
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"></fvTable>
|
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty description="暂无待办"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="8" :md="6" :lg="4" :xl="4">
|
<el-col :xs="24" :sm="8" :md="6" :lg="4" :xl="4">
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<!-- <div class="right-top">-->
|
<!-- <div class="right-top">-->
|
||||||
<!-- <h3>欢迎回来, Sunshine</h3>-->
|
<!-- <h3>欢迎回来, Sunshine</h3>-->
|
||||||
<!-- <div>科技创新项目需求征集中, 要求参见OA内部信!</div>-->
|
<!-- <div>科技创新项目需求征集中, 要求参见OA内部信!</div>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- <div class="right-gap"></div>-->
|
<!-- <div class="right-gap"></div>-->
|
||||||
<div class="right-top ">
|
<div class="right-top ">
|
||||||
<div>
|
<div>
|
||||||
@@ -36,7 +40,7 @@
|
|||||||
{{ item.title }}
|
{{ item.title }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-down">
|
<div class="right-top">
|
||||||
<div>
|
<div>
|
||||||
<h3>工具下载</h3>
|
<h3>工具下载</h3>
|
||||||
<span>常用网站</span>
|
<span>常用网站</span>
|
||||||
@@ -115,7 +119,7 @@ const tableConfig = reactive({
|
|||||||
label: '类型',
|
label: '类型',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
// currentRender: ({row, index}) => (<Tag dictType={'normal_disable'} value={row.state}/>)
|
currentRender: ({row, index}) => (<Tag dictType={'todo_type'} value={row.state}/>)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'createTime',
|
prop: 'createTime',
|
||||||
@@ -197,6 +201,12 @@ const headBtnClick = (key) => {
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
|
||||||
|
.el-table__empty-block {
|
||||||
|
.el-empty {
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.statistics {
|
.statistics {
|
||||||
width: 99%;
|
width: 99%;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
@@ -210,7 +220,7 @@ const headBtnClick = (key) => {
|
|||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
|
|
||||||
.block-right {
|
.block-right {
|
||||||
margin-left: 40px;
|
margin-left: 15%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -218,11 +228,13 @@ const headBtnClick = (key) => {
|
|||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
|
|
||||||
> span:first-child {
|
> span:first-child {
|
||||||
|
white-space: nowrap;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
> span:last-child {
|
> span:last-child {
|
||||||
|
white-space: nowrap;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
@@ -257,14 +269,14 @@ const headBtnClick = (key) => {
|
|||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
.right-top, .right-down {
|
.right-top {
|
||||||
flex: 0.5;
|
flex: 0.5;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-down,.right-top {
|
.right-top {
|
||||||
flex: 0.48;
|
flex: 0.48;
|
||||||
|
|
||||||
> div:first-child {
|
> div:first-child {
|
||||||
@@ -273,10 +285,12 @@ const headBtnClick = (key) => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
|
white-space: nowrap;
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
> span {
|
> span {
|
||||||
|
white-space: nowrap;
|
||||||
color: #927648;
|
color: #927648;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|||||||
166
src/views/projectdemand/demandcollection/add.vue
Normal file
166
src/views/projectdemand/demandcollection/add.vue
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
<template>
|
||||||
|
<div v-loading="loading">
|
||||||
|
<baseTitle title="需求征集信息录入"></baseTitle>
|
||||||
|
<fvForm :schema="schame" @getInstance="getInstance" :rules="rules"></fvForm>
|
||||||
|
<baseTitle title="征集说明"></baseTitle>
|
||||||
|
<Tinymce image-url="/notice/file" file-url="/notice/file" v-model:value="instructions" height="300"/>
|
||||||
|
<baseTitle title="申请文件"></baseTitle>
|
||||||
|
<file-upload @getFile="getFile"/>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit">提交</el-button>
|
||||||
|
<el-button @click="handleBack">返回</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import {useAuthStore} from '@/stores/userstore.js'
|
||||||
|
import {ElLoading, ElNotification} from 'element-plus';
|
||||||
|
import {getMenuList} from '@/api/system/menuman.js'
|
||||||
|
import {getRoleDetail, operate, getTemRoleOption} from "@/api/role/role";
|
||||||
|
import FileUpload from "../../../components/FileUpload.vue";
|
||||||
|
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const authStore = useAuthStore()
|
||||||
|
const route = useRoute()
|
||||||
|
const form = ref(null)
|
||||||
|
const fileList = ref(null)
|
||||||
|
const menuTree = ref(null)
|
||||||
|
const loading = ref(false)
|
||||||
|
const localData = reactive({
|
||||||
|
affiliatedCompany: []
|
||||||
|
})
|
||||||
|
const instructions = ref()
|
||||||
|
const schame = computed(() => {
|
||||||
|
let arr = [
|
||||||
|
{
|
||||||
|
label: '名称',
|
||||||
|
prop: 'roleName',
|
||||||
|
component: 'el-input',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入名称',
|
||||||
|
clearable: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '所属公司',
|
||||||
|
prop: 'subCompanyId',
|
||||||
|
component: 'el-tree-select',
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择所属公司',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true,
|
||||||
|
data: localData.affiliatedCompany,
|
||||||
|
disabled: route.query.userType == 0 ? true : false
|
||||||
|
},
|
||||||
|
on: {
|
||||||
|
change: async (val) => {
|
||||||
|
const {data} = await getDeptOpt({subCompanyId: val})
|
||||||
|
localData.departmentIdOpt = data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '征集类型',
|
||||||
|
prop: 'subCompanyType',
|
||||||
|
component: 'el-tree-select',
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择征集类型',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true,
|
||||||
|
data: localData.affiliatedCompany,
|
||||||
|
disabled: route.query.userType == 0 ? true : false
|
||||||
|
},
|
||||||
|
on: {
|
||||||
|
change: async (val) => {
|
||||||
|
const {data} = await getDeptOpt({subCompanyId: val})
|
||||||
|
localData.departmentIdOpt = data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '截止时间',
|
||||||
|
prop: 'dateValue',
|
||||||
|
component: 'el-date-picker',
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择截止时间',
|
||||||
|
clearable: true,
|
||||||
|
type: 'datetime'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
return !authStore.roles.includes('superAdmin') ? arr.slice(0, arr.length - 1) : arr
|
||||||
|
})
|
||||||
|
|
||||||
|
const rules = reactive({
|
||||||
|
roleName: [{required: true, message: '请输入', trigger: 'change'}],
|
||||||
|
subCompanyId: [{required: true, message: '请输入', trigger: 'change'}]
|
||||||
|
})
|
||||||
|
|
||||||
|
const getInstance = (e) => {
|
||||||
|
form.value = e
|
||||||
|
}
|
||||||
|
const getFile=(val)=>{
|
||||||
|
console.log('fileList', val)
|
||||||
|
fileList.value=val
|
||||||
|
}
|
||||||
|
const init = async () => {
|
||||||
|
form.value.setValues({state: '1', template: false})
|
||||||
|
const res = await getTemRoleOption()
|
||||||
|
localData.tempRoleOpt = res.data
|
||||||
|
const {data} = await getMenuList()
|
||||||
|
localData.menuData = data
|
||||||
|
}
|
||||||
|
|
||||||
|
const getInfo = async () => {
|
||||||
|
if (!route.query.id) return
|
||||||
|
const {data} = await getRoleDetail(route.query.id)
|
||||||
|
data.menuIds.forEach(key => {
|
||||||
|
menuTree.value.setChecked(key, true, false)
|
||||||
|
})
|
||||||
|
form.value.setValues(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
// const loading = ElLoading.service({fullscreen: true})
|
||||||
|
// const {isValidate} = await form.value.validate()
|
||||||
|
// if (!isValidate) return Promise.reject()
|
||||||
|
// const values = form.value.getValues()
|
||||||
|
// values.menuIds = checkChange()
|
||||||
|
// operate(values).then(res => {
|
||||||
|
// ElNotification({
|
||||||
|
// title: route.query.isAdd ? '新增' : '编辑',
|
||||||
|
// message: res.msg,
|
||||||
|
// type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
// })
|
||||||
|
// loading.close()
|
||||||
|
// res.code === 1000 ? tagsViewStore.delViewAndGoView('/system/role') : null
|
||||||
|
// }).finally(() => {
|
||||||
|
// loading.close()
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleBack = () => {
|
||||||
|
history.back()
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(localData, (val) => {
|
||||||
|
menuTree.value.filter(val.filterText)
|
||||||
|
})
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
loading.value = true
|
||||||
|
await init()
|
||||||
|
if (route.query.id) {
|
||||||
|
await getInfo()
|
||||||
|
}
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
119
src/views/projectdemand/demandcollection/detail.vue
Normal file
119
src/views/projectdemand/demandcollection/detail.vue
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
<template>
|
||||||
|
<div class="detail-block">
|
||||||
|
<div class="left-info">
|
||||||
|
<baseTitle title="需求征集详情"></baseTitle>
|
||||||
|
<div class="info">
|
||||||
|
<div v-for="item in list">
|
||||||
|
<span>{{ item.title }}:</span>
|
||||||
|
<span>{{ item.text }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<baseTitle title="征集说明"></baseTitle>
|
||||||
|
<el-card>
|
||||||
|
{{ instructions }}
|
||||||
|
</el-card>
|
||||||
|
<baseTitle title="申请文件"></baseTitle>
|
||||||
|
<fvTable ref="tableIns" style="max-height: 200px" :tableConfig="tableConfig" @headBtnClick="headBtnClick" :pagination="false"></fvTable>
|
||||||
|
<baseTitle title="审核意见"></baseTitle>
|
||||||
|
<el-input
|
||||||
|
v-model="auditOpinion"
|
||||||
|
:rows="3"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入审核意见"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="approval-record">
|
||||||
|
<baseTitle title="审批记录"></baseTitle>
|
||||||
|
</div>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button @click="handleSubmit">驳回</el-button>
|
||||||
|
<el-button color="#DED0B2" @click="handleBack">同意</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
|
||||||
|
const list = ref([
|
||||||
|
{
|
||||||
|
title: '名称',
|
||||||
|
text: '名名称称名名称名称名称名称'
|
||||||
|
}, {
|
||||||
|
title: '所属公司',
|
||||||
|
text: '名称名称名称名称'
|
||||||
|
}, {
|
||||||
|
title: '征集类型',
|
||||||
|
text: '名称名称名称名称'
|
||||||
|
}, {
|
||||||
|
title: '截止时间',
|
||||||
|
text: '名称名称名称名称'
|
||||||
|
},
|
||||||
|
])
|
||||||
|
const instructions = ref('ds')
|
||||||
|
const auditOpinion = ref('')
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'roleName',
|
||||||
|
label: '文件名',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'roleKey',
|
||||||
|
label: '标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
width:'200px',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
api: '/admin/role'
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.detail-block {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
|
||||||
|
.left-info {
|
||||||
|
flex: 0.6;
|
||||||
|
margin-right: 30px;
|
||||||
|
|
||||||
|
.info {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
> div {
|
||||||
|
width: 350px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
margin-right: 10px;
|
||||||
|
|
||||||
|
> span:first-child {
|
||||||
|
color: black;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.approval-record {
|
||||||
|
flex: 0.4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -62,7 +62,7 @@ const tableConfig = reactive({
|
|||||||
label: '状态',
|
label: '状态',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => (<Tag dictType={'normal_disable'} value={row.state}/>)
|
currentRender: ({row, index}) => (<Tag dictType={'demand_collection'} value={row.state}/>)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'oper',
|
prop: 'oper',
|
||||||
@@ -72,17 +72,19 @@ const tableConfig = reactive({
|
|||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<el-button type={'primary'} link onClick={()=>{}}>详情</el-button>
|
<el-button type="primary" link onClick={() => handleDetail(row)}>详情
|
||||||
<el-button type={'primary'} link onClick={()=>{}}>上报</el-button>
|
</el-button>
|
||||||
|
<el-button type="primary" link onClick={() => handleEdit(row)}>编辑</el-button>
|
||||||
|
<el-button type="primary" link onClick={() => handleReport(row)}>上报</el-button>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
api: '',
|
api: '/admin/role',
|
||||||
btns: [
|
btns: [
|
||||||
{name: '新增', key: 'add', auth: auths.add, type: 'primary'},
|
{name: '新增', key: 'add', auth: auths.add, color: '#DED0B2'},
|
||||||
{name: '导出', key: 'add', auth: auths.add, type: 'primary'},
|
{name: '导出', key: 'add', auth: auths.add, type: ''},
|
||||||
],
|
],
|
||||||
params: {}
|
params: {}
|
||||||
})
|
})
|
||||||
@@ -91,13 +93,40 @@ const search = (val) => {
|
|||||||
tableConfig.params = {...val}
|
tableConfig.params = {...val}
|
||||||
tableIns.value.refresh()
|
tableIns.value.refresh()
|
||||||
}
|
}
|
||||||
|
const handleAdd = () => {
|
||||||
|
router.push({
|
||||||
|
path: '/projectdemand/demandadd',
|
||||||
|
query: {
|
||||||
|
isAdd: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleEdit = (row) => {
|
||||||
|
router.push({
|
||||||
|
path: '/projectdemand/demandedit',
|
||||||
|
query: {
|
||||||
|
id: row.roleId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleDetail = (row) => {
|
||||||
|
router.push({
|
||||||
|
path: '/projectdemand/demanddetail',
|
||||||
|
query: {
|
||||||
|
id: row.roleId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
const headBtnClick = (key) => {
|
const headBtnClick = (key) => {
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'add':
|
case 'add':
|
||||||
handleAdd()
|
handleAdd()
|
||||||
break;
|
break;
|
||||||
case 'export':
|
case 'edit':
|
||||||
handleExport()
|
handleEdit()
|
||||||
|
break;
|
||||||
|
case 'detail':
|
||||||
|
handleDetail()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user