明树Git Lab
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jt_front
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
jt_front
Commits
ddba0094
Commit
ddba0094
authored
Feb 03, 2026
by
zhanghan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
样式处理
parent
0380bcfc
Pipeline
#106917
passed with stage
in 18 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
433 additions
and
9 deletions
+433
-9
record.vue
src/views/everydayPage/record.vue
+172
-3
recordAdd.vue
src/views/everydayPage/recordAdd.vue
+254
-3
oldIndex.vue
src/views/homePage/oldIndex.vue
+7
-3
No files found.
src/views/everydayPage/record.vue
View file @
ddba0094
<
template
>
<div>
record
</div>
<div
class=
"manage-container"
>
<div
class=
"manage-wrap"
>
<div
class=
"manage-header"
>
<div
class=
"header-left"
></div>
<div
class=
"header-right"
>
<el-button
type=
"primary"
@
click=
"recordAdd"
>
新增
</el-button>
</div>
</div>
<div
class=
"manage-content"
v-loading=
"loading"
>
<common-table
:autoHeight=
"true"
:maxRows=
"10"
:data=
"tableData"
:columns=
"tableColumns"
:total=
"total"
:current-page=
"currentPage"
:page-size=
"pageSize"
:index=
"true"
:indexLabel=
"'序号'"
title=
""
:border=
"true"
@
size-change=
"handleSizeChange"
@
current-page-change=
"handleCurrentPageChange"
>
<template
#
operations=
"
{ row, index }">
<el-button
link
type=
"primary"
size=
"small"
@
click=
"previewStatement(row)"
>
查看
</el-button
>
<el-button
link
type=
"primary"
size=
"small"
@
click=
"editStatement(row)"
>
编辑
</el-button
>
<el-button
link
type=
"danger"
size=
"small"
@
click=
"deleteStatement(row)"
>
删除
</el-button
>
</
template
>
</common-table>
</div>
</div>
</div>
</template>
<
script
setup
></
script
>
<
style
scoped
lang=
"scss"
></
style
>
<
script
setup
>
import
{
ref
,
onMounted
,
getCurrentInstance
}
from
"vue"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
CommonTable
from
"@/components/common/commonTable.vue"
;
const
router
=
useRouter
();
const
{
proxy
}
=
getCurrentInstance
();
let
tableData
=
ref
([]);
let
tableColumns
=
ref
([
{
prop
:
"archiveName"
,
label
:
"档案名称"
,
showOverflowTooltip
:
true
,
},
{
prop
:
"archiveNumber"
,
label
:
"档案编号"
,
showOverflowTooltip
:
true
,
},
{
prop
:
"archiveDate"
,
label
:
"档案日期"
,
showOverflowTooltip
:
true
,
},
{
prop
:
"operations"
,
label
:
"操作"
,
width
:
170
,
slot
:
"operations"
,
fixed
:
"right"
,
align
:
"center"
,
},
]);
let
loading
=
ref
(
false
);
let
total
=
ref
(
0
);
let
currentPage
=
ref
(
1
);
let
pageSize
=
ref
(
10
);
// 获取列表数据
const
getStatementData
=
()
=>
{
loading
.
value
=
true
;
proxy
.
$post
({
url
:
"/api/project/getTzdaglList"
,
data
:
{
page
:
currentPage
.
value
,
pagesize
:
pageSize
.
value
,
},
callback
:
(
data
)
=>
{
tableData
.
value
=
data
.
rows
.
map
((
it
)
=>
{
return
{
...
it
,
meetingMinutesAttachmentLen
:
it
.
meetingMinutesAttachment
?.
length
+
"份"
,
};
});
total
.
value
=
data
.
count
;
loading
.
value
=
false
;
},
});
};
// 分页
const
handleSizeChange
=
(
size
)
=>
{
pageSize
.
value
=
size
;
currentPage
.
value
=
1
;
getStatementData
();
};
const
handleCurrentPageChange
=
(
page
)
=>
{
currentPage
.
value
=
page
;
getStatementData
();
};
const
recordAdd
=
()
=>
{
router
.
push
(
"/recordAdd"
);
};
const
editStatement
=
(
item
)
=>
{
router
.
push
({
name
:
"recordAdd"
,
query
:
{
id
:
item
.
id
,
},
});
};
const
previewStatement
=
(
item
)
=>
{
router
.
push
({
name
:
"recordAdd"
,
query
:
{
isPreview
:
true
,
id
:
item
.
id
,
},
});
};
const
deleteStatement
=
(
item
)
=>
{
ElMessageBox
.
confirm
(
"确认删除该项?"
,
"提示"
,
{
confirmButtonText
:
"确认"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
proxy
.
$post
({
url
:
"/api/project/deleteTzdagl"
,
data
:
{
id
:
item
.
id
,
},
callback
:
(
data
)
=>
{
ElMessage
.
success
(
"删除成功"
);
getStatementData
();
},
});
})
.
catch
(()
=>
{});
};
onMounted
(()
=>
{
getStatementData
();
});
</
script
>
<
style
scoped
lang=
"less"
>
@import "@/styles/verticalManages.less";
</
style
>
src/views/everydayPage/recordAdd.vue
View file @
ddba0094
<
template
>
<div>
recordAdd
</div>
<div
class=
"add-project-container"
>
<div
class=
"add-project-content"
v-loading=
"loading"
>
<div
class=
"add-project-header"
>
<div
class=
"header-left"
></div>
<div
class=
"header-right"
>
<el-button
type=
"default"
@
click=
"backClick"
>
返回
</el-button>
<template
v-if=
"!loading && !isPreview"
>
<el-button
type=
"primary"
@
click=
"saveClick"
>
保存
</el-button>
</
template
>
</div>
</div>
<div
class=
"tabs-content"
>
<div
class=
"project-tab-content"
>
<div
class=
"tab-content"
>
<el-form
:model=
"formData"
:label-width=
"200"
:disabled=
"isPreview"
>
<!-- 仅保留档案基本信息折叠项,删除所有无用折叠项 -->
<el-collapse
v-model=
"activeCollapse"
>
<el-collapse-item
title=
"档案基本信息"
name=
"档案基本信息"
>
<el-row
:gutter=
"20"
>
<!-- 所属项目ID(后端有对应字段) -->
<el-col
:span=
"12"
>
<el-form-item
label=
"项目信息"
required
>
<el-select
v-model=
"formData.projectId"
placeholder=
"请选择项目信息"
no-data-text=
"暂无数据"
@
change=
"changeProject"
>
<el-option
v-for=
"item in projectList"
:key=
"item.id"
:label=
"item.projectName"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<!-- 档案分类:绑定后端archiveCategory(非空),保留通用选择器 -->
<el-col
:span=
"12"
>
<el-form-item
label=
"档案分类"
>
<CommonSelector
v-model=
"formData.archiveCategory"
dictName=
"dafl"
/>
</el-form-item>
</el-col>
<!-- 档案名称:绑定后端archiveName(非空),修正原重复的qc绑定 -->
<el-col
:span=
"12"
>
<el-form-item
label=
"档案名称"
>
<el-input
v-model=
"formData.archiveName"
placeholder=
"请输入档案名称"
/>
</el-form-item>
</el-col>
<!-- 档案编号:绑定后端archiveNumber,修正原重复的qc绑定 -->
<el-col
:span=
"12"
>
<el-form-item
label=
"档案编号"
>
<el-input
v-model=
"formData.archiveNumber"
placeholder=
"请输入档案编号"
/>
</el-form-item>
</el-col>
<!-- 档案日期:绑定后端archiveDate,保留时间选择器 -->
<el-col
:span=
"12"
>
<el-form-item
label=
"档案日期"
>
<el-date-picker
v-model=
"formData.archiveDate"
type=
"date"
format=
"YYYY-MM-DD"
value-format=
"YYYY-MM-DD"
placeholder=
"请选择档案日期"
style=
"width: 100%"
/>
</el-form-item>
</el-col>
<!-- 附件上传:绑定后端fjsc(JSON类型),修正原bjdwtzgh绑定 -->
<el-col
:span=
"24"
>
<el-form-item
label=
"附件上传"
>
<FileUploader
v-model=
"formData.fjsc"
/>
</el-form-item>
</el-col>
<!-- 备注:绑定后端remark,修正原bz绑定 -->
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
>
<el-input
v-model=
"formData.remark"
rows=
"4"
placeholder=
"请输入备注"
type=
"textarea"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-collapse-item>
</el-collapse>
</el-form>
</div>
</div>
</div>
</div>
</div>
</template>
<
script
setup
></
script
>
<
style
scoped
lang=
"scss"
></
style
>
<
script
setup
>
import
{
reactive
,
ref
,
onMounted
,
getCurrentInstance
}
from
"vue"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
{
ElMessage
}
from
"element-plus"
;
import
{
useUserStore
}
from
"@/stores/user.js"
;
// 引入组件:仅保留实际用到的
import
FileUploader
from
"@/components/FileUploader/index.vue"
;
// 初始化必要全局变量:删除无用的token/options
const
userStore
=
useUserStore
();
const
router
=
useRouter
();
const
route
=
useRoute
();
const
{
proxy
}
=
getCurrentInstance
();
// 折叠面板:仅保留档案基本信息,删除所有无用展开项
const
activeCollapse
=
ref
([
"档案基本信息"
]);
// 表单核心数据:**完全匹配后端RcTzdagl模型字段**,删除所有无用字段
const
formData
=
reactive
({
archiveCategory
:
""
,
// 档案分类 ★非空★
archiveName
:
""
,
// 档案名称 ★非空★
archiveNumber
:
""
,
// 档案编号
archiveDate
:
""
,
// 档案日期
remark
:
""
,
// 备注
fjsc
:
[],
// 附件上传(JSON数组,绑定上传组件)
projectId
:
""
,
// 所属项目ID
del
:
0
,
// 删除标记,默认0正常(后端默认值)
creator
:
userStore
.
userId
||
""
,
// 创建人ID(从用户仓库取,后端需要)
createdAt
:
""
,
// 创建时间(后端自动生成,前端仅回显)
updatedAt
:
""
,
// 更新时间(后端自动生成,前端仅回显)
});
// 页面核心状态:保留必要的加载/预览/编辑ID
const
loading
=
ref
(
false
);
// 全局加载状态
const
isPreview
=
ref
(
!!
route
.
query
.
isPreview
);
// 预览模式(表单禁用)
const
rcTzdaglId
=
ref
(
route
.
query
.
id
||
""
);
// 当前编辑的档案ID(匹配表名)
const
projectList
=
ref
([]);
// 项目下拉列表数据
// 接口请求:仅保留**实际用到的**,删除所有无用的合计/新增/删除方法
// 获取项目下拉列表(绑定所属项目)
const
getProjectData
=
()
=>
{
proxy
.
$post
({
url
:
"/api/project/listProject"
,
data
:
{
page
:
1
,
pagesize
:
1000
,
attributes
:
[],
menuType
:
"xmjc"
,
},
callback
:
(
data
)
=>
{
projectList
.
value
=
data
.
rows
||
[];
},
});
};
// 选择项目后同步项目名称(前端展示用,后端无该字段,保留不影响)
const
changeProject
=
(
val
)
=>
{
const
selectItem
=
projectList
.
value
.
find
((
item
)
=>
item
.
id
===
val
);
if
(
selectItem
)
{
formData
.
projectName
=
selectItem
.
projectName
;
// 临时字段,仅前端展示
}
};
// 获取档案单条记录详情(编辑/预览用):删除无用的wtyys/tzfhs赋值
const
getRcTzdaglDetail
=
()
=>
{
if
(
!
rcTzdaglId
.
value
)
return
;
loading
.
value
=
true
;
proxy
.
$post
({
url
:
"/api/project/getTzdagl"
,
data
:
{
id
:
rcTzdaglId
.
value
},
callback
:
(
data
)
=>
{
loading
.
value
=
false
;
Object
.
assign
(
formData
,
data
);
// 直接赋值,后端返回字段与前端完全匹配
},
error
:
()
=>
(
loading
.
value
=
false
),
// 补充错误回调,防止加载状态卡死
});
};
// 页面操作:仅保留必要的返回/保存
const
backClick
=
()
=>
{
router
.
back
(
-
1
);
};
// 保存/提交表单:★补全非空校验★、删除无用的wtyys/tzfhs提交、匹配后端字段
const
saveClick
=
()
=>
{
// 基础非空校验:匹配后端allowNull:false的字段
if
(
!
formData
.
projectId
)
{
ElMessage
.
warning
(
"请选择所属项目"
);
return
;
}
if
(
!
formData
.
archiveCategory
)
{
// 档案分类非空校验
ElMessage
.
warning
(
"请选择档案分类"
);
return
;
}
if
(
!
formData
.
archiveName
)
{
// 档案名称非空校验
ElMessage
.
warning
(
"请输入档案名称"
);
return
;
}
loading
.
value
=
true
;
// 区分新增/编辑接口
const
url
=
rcTzdaglId
.
value
?
"/api/project/updateTzdagl"
:
"/api/project/createTzdagl"
;
// 提交数据:仅传递后端需要的字段,删除无用的wtyys/tzfhs
const
submitData
=
{
...
formData
,
projectId
:
formData
.
projectId
+
""
,
// 项目ID转字符串,保持原处理逻辑
};
proxy
.
$post
({
url
:
url
,
data
:
submitData
,
callback
:
()
=>
{
loading
.
value
=
false
;
ElMessage
.
success
(
rcTzdaglId
.
value
?
"编辑成功"
:
"新增成功"
);
router
.
back
(
-
1
);
},
error
:
(
err
)
=>
{
// 补充错误回调,处理接口报错+关闭加载
loading
.
value
=
false
;
// 唯一键/其他报错提示(可选)
if
(
err
.
msg
?.
includes
(
"unique"
)
||
err
.
msg
?.
includes
(
"重复"
))
{
ElMessage
.
error
(
"档案编号已存在,请更换后重试"
);
}
},
});
};
// 页面初始化:仅保留必要的接口调用
onMounted
(()
=>
{
getProjectData
();
// 获取项目下拉列表
if
(
rcTzdaglId
.
value
)
{
getRcTzdaglDetail
();
// 编辑/预览时加载档案详情
}
});
</
script
>
<
style
scoped
lang=
"less"
>
@import "@/styles/verticalManages.less";
</
style
>
src/views/homePage/oldIndex.vue
View file @
ddba0094
...
...
@@ -1452,10 +1452,12 @@ const handleClose = () => {
.header-middile {
background-image: url("@/assets/images/header.png");
background-size: 100% 100%;
padding: 0 20px;
.vw(width,750);
font-weight: 400;
font-family: "YouSheBiaoTiHei";
.vh(height,75);
.vh(font-size,38);
display: flex;
justify-content: center;
align-items: center;
...
...
@@ -1466,7 +1468,7 @@ const handleClose = () => {
}
@media screen and (max-width: 2560px) {
// flex: 1;
.font(
2
8);
.font(
3
8);
}
@media screen and (max-width: 1920px) {
// flex: 0.7;
...
...
@@ -1537,8 +1539,10 @@ const handleClose = () => {
.vw(margin-top, 10);
span {
.font(14);
width: 110px;
height: 35px;
.vw(width, 110);
.vw(height, 35);
// width: 110px;
// height: 35px;
display: flex;
align-items: center;
justify-content: center;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment