12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013 |
- <!--
- * @Author: ysh
- * @Date: 2025-05-26 10:44:29
- * @LastEditors: Please set LastEditors
- * @LastEditTime: 2025-05-30 15:05:07
- -->
- <template>
- <view class="container">
- <!-- 内容区域 -->
- <view class="content">
- <!-- 项目基本信息 -->
- <view class="section" id="section1">
- <view class="section-title">
- <view class="line"></view>
- <text>项目基本信息</text>
- </view>
- <view class="info-list">
- <view class="info-item">
- <text class="label">项目编号</text>
- <text class="value">{{ project.projectNumber }}</text>
- </view>
- <view class="info-item">
- <text class="label">项目名称</text>
- <text class="value">{{ project.projectName }}</text>
- </view>
- <view class="info-item">
- <text class="label">项目类型</text>
- <text class="value">{{ project.projectType }}</text>
- </view>
- <view class="info-item">
- <text class="label">项目来源</text>
- <text class="value">{{ project.projectSource == '0' ? '院内' : '院外' }}</text>
- </view>
- <view class="info-item">
- <text class="label">项目级别</text>
- <text class="value" :class="project.projectLevel === '0' ? 'normal' : 'important'">
- {{ project.projectLevel ? (project.projectLevel == '0' ? '一般项目' : '重大项目') : '一般项目' }}
- </text>
- </view>
- <view class="info-item">
- <text class="label">甲方单位</text>
- <text class="value">{{ project.partyA ? project.partyA.partyAName : '' }}</text>
- </view>
- <view class="info-item">
- <text class="label">联系人</text>
- <text class="value">{{ project.contactPerson }}</text>
- </view>
- <view class="info-item">
- <text class="label">联系电话</text>
- <text class="value">{{ project.telephone }}</text>
- </view>
- <view class="info-item">
- <text class="label">承担部门</text>
- <text class="value">{{ project.undertakingDeptName }}</text>
- </view>
- <view class="info-item">
- <text class="label">项目登记人</text>
- <text class="value">{{ getUserName(project.projectRegistrant) }}</text>
- </view>
- <view class="info-item">
- <text class="label">项目登记时间</text>
- <text class="value">{{ project.registerTime }}</text>
- </view>
- <view class="info-item">
- <text class="label">合同编码</text>
- <text class="value">{{ contractCode }}</text>
- </view>
- <view class="info-item">
- <text class="label">合同编号</text>
- <text class="value">{{ contractNumber }}</text>
- </view>
- <view class="info-item full-width">
- <text class="label">项目概况</text>
- <view class="value">
- <view class="card-container">
- <view class="card" v-for="(item, index) in workList" :key="index">
- <view class="card-content">
- <view class="card-left">
- <text class="card-title">工作内容{{ index + 1 }}</text>
- </view>
- <view class="card-right">
- <view class="card-item">
- <text class="label">工作内容:</text>
- <text class="value">{{ item.content }}</text>
- </view>
- <view class="card-item">
- <text class="label">等级或比例尺:</text>
- <text class="value">{{ item.scale }}</text>
- </view>
- <view class="card-item">
- <text class="label">单位:</text>
- <text class="value">{{ item.unit }}</text>
- </view>
- <view class="card-item">
- <text class="label">工作量:</text>
- <text class="value">{{ item.workload }}</text>
- </view>
- <view class="card-item">
- <text class="label">要求完成时间:</text>
- <text class="value">{{ item.deadline }}</text>
- </view>
- <view class="card-item">
- <text class="label">备注:</text>
- <text class="value">{{ item.remark }}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="info-item full-width">
- <text class="label">资料提交要求</text>
- <text class="value">{{ project.projectRequest }}</text>
- </view>
- <view class="info-item">
- <text class="label">项目备注</text>
- <text class="value">{{ project.remark }}</text>
- </view>
- </view>
- </view>
-
- <!-- 项目安排 -->
- <view class="section" id="section2">
- <view class="section-title">
- <view class="line"></view>
- <text>项目安排</text>
- </view>
- <view class="info-list">
- <view class="info-item">
- <text class="label">承担部门</text>
- <view class="value">
- <text>{{ project.undertakingDeptName }}</text>
- <button class="btn-small" @click="deptOpen = true" v-if="hasPermi(['oa:project:edit'])">更换部门</button>
- </view>
- </view>
- <view class="info-item">
- <text class="label">部门负责人</text>
- <text class="value">{{ deptLeaderList.join(',') }}</text>
- </view>
- <view class="info-item">
- <text class="label">项目负责人</text>
- <view class="value">
- <text>{{ project.projectLeaderUser ? project.projectLeaderUser.nickName : "" }}</text>
- <button class="btn-small" @click="prLeaderOpen = true"
- v-if="hasPermi(['oa:project:edit'])">更换项目负责人</button>
- </view>
- </view>
- <view class="info-item">
- <text class="label">现场负责人</text>
- <text class="value">{{ getUserName(project.siteLeader) }}</text>
- </view>
- <view class="info-item full-width">
- <text class="label">项目预算编制</text>
- <view class="value">
- <text class="link" @click="openBudgetFn" v-if="isProjectLeader">项目预算表</text>
- </view>
- </view>
- </view>
- </view>
-
- <!-- 技术安排 -->
- <view class="section" id="section3">
- <view class="section-title">
- <view class="line"></view>
- <text>技术安排</text>
- </view>
- <view class="info-list">
- <view class="info-item">
- <text class="label">技术负责人</text>
- <text class="value">{{ project.technicalDirectorUser ? project.technicalDirectorUser.nickName : '' }}</text>
- </view>
- <view class="info-item">
- <text class="label">技术设计人</text>
- <text class="value">{{ project.technicalDesignerUser ? project.technicalDesignerUser.nickName : '' }}</text>
- </view>
- <view class="info-item">
- <text class="label">质量检查员</text>
- <text class="value">{{ project.qualityInspectorName }}</text>
- </view>
- <!-- <view class="info-item">
- <text class="label">技术方案设计</text>
- <text class="value link" @click="openPlan = true">技术方案审批表</text>
- </view> -->
- </view>
- </view>
-
- <!-- 任务审核情况 -->
- <view class="section" id="section4">
- <view class="section-title">
- <view class="line"></view>
- <text>任务审核情况</text>
- </view>
- <view class="info-list">
- <view class="info-item full-width">
- <text class="label">经营副总审核</text>
- <view class="value">
- <textarea disabled v-model="projectComment.jyComment" class="textarea"></textarea>
- <view class="sign">
- <text>签名:
- <text class="auditor">
- {{ projectComment.jyUser ? projectComment.jyUser.nickName : '' }}
- </text>
- </text>
- <text>审核时间:{{ projectComment.jyApprovalTime }}</text>
- </view>
- </view>
- </view>
- <view class="info-item full-width">
- <text class="label">分管领导批准</text>
- <view class="value">
- <textarea disabled v-model="projectComment.manageComment" class="textarea"></textarea>
- <view class="sign">
- <text>签名:
- <text class="auditor">
- {{ projectComment.managerUser ? projectComment.managerUser.nickName : '' }}
- </text>
- </text>
- <text>审核时间:{{ projectComment.manageApprovalTime }}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
-
- <!-- 项目生产情况 -->
- <view class="section" id="section5">
- <view class="section-title">
- <view class="line"></view>
- <text>项目生产情况</text>
- </view>
- <view class="info-list">
- <!-- <view class="info-item full-width">
- <text class="label" style="width:200rpx">安全交底记录表</text>
- <view class="value">
- <text class="link" @click="openSafe = true">安全交底记录表</text>
- <button class="btn-small" @click="handleUrge('1')" v-if="isSend">发送企业微信消息提醒相关人员</button>
- </view>
- </view>
- <view class="info-item full-width">
- <text class="label" style="width:200rpx">技术交底记录表</text>
- <view class="value">
- <text class="link" @click="openTech = true">技术交底记录表</text>
- <button class="btn-small" @click="handleUrge('2')" v-if="isSend">发送企业微信消息提醒相关人员</button>
- </view>
- </view> -->
- <view class="info-item full-width">
- <text class="label">申请设备</text>
- <view class="value">
- <view>
- <view class="device-item" v-for="(item, index) in devices" :key="index">
- <text>{{ item }}</text>
- </view>
- </view>
- </view>
- </view>
- <view class="info-item full-width">
- <text class="label">使用车辆</text>
- <view class="value">
- <text>{{ cars.join(',') }}</text>
- </view>
- </view>
- <view class="info-item full-width">
- <text class="label">驾驶员</text>
- <view class="value">
- <text>{{ drivers.join(',') }}</text>
- </view>
- </view>
- <view class="info-item full-width">
- <text class="label">参与人员</text>
- <view class="value">
- <text class="participate-list">{{ participates.join(',') }}</text>
- </view>
- </view>
- <view class="info-item">
- <text class="label">进场时间</text>
- <text class="value">{{ project.entryTime }}</text>
- </view>
- <view class="info-item">
- <text class="label">撤场时间</text>
- <text class="value">{{ project.exitTime }}</text>
- </view>
- <view class="info-item full-width">
- <text class="label">项目进度</text>
- <view class="value">
- <view class="card-container">
- <view class="card" v-for="(item, index) in progressList" :key="index">
- <view class="card-content">
- <view class="card-left">
- <text class="card-title">进度记录 {{ index + 1 }}</text>
- </view>
- <view class="card-right">
- <view class="card-item">
- <text class="label">截至日期:</text>
- <text class="value">{{ item.date }}</text>
- </view>
- <view class="card-item">
- <text class="label">累计总进度:</text>
- <text class="value">{{ item.percentage }}%</text>
- </view>
- <view class="card-item">
- <text class="label">情况说明:</text>
- <text class="value">{{ item.situation }}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="info-item full-width">
- <text class="label" style="width:200rpx">实际完成工作量</text>
- <view class="value">
- <view class="card-container">
- <view class="card" v-for="(item, index) in actualList" :key="index">
- <view class="card-content">
- <view class="card-left">
- <text class="card-title">实际工作量记录 {{ index + 1 }}</text>
- </view>
- <view class="card-right">
- <view class="card-item">
- <text class="label">工作内容:</text>
- <text class="value">{{ item.content }}</text>
- </view>
- <view class="card-item">
- <text class="label">等级或比例尺:</text>
- <text class="value">{{ item.scale }}</text>
- </view>
- <view class="card-item">
- <text class="label">单位:</text>
- <text class="value">{{ item.unit }}</text>
- </view>
- <view class="card-item">
- <text class="label">工作量:</text>
- <text class="value">{{ item.workload }}</text>
- </view>
- <view class="card-item">
- <text class="label">实际完成时间:</text>
- <text class="value">{{ parseTime(item.finishTime, '{y}-{m}-{d}') }}</text>
- </view>
- <view class="card-item">
- <text class="label">备注:</text>
- <text class="value">{{ item.remark }}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
-
- <!-- 弹窗组件 -->
- <uni-popup ref="popup" type="center">
- <view class="popup-content">
- <!-- 这里可以添加弹窗内容 -->
- </view>
- </uni-popup>
- </view>
- </template>
-
- <script>
- import { getDept } from "@/api/system/dept";
- import { getUsersDeptLeaderByDept, getUserByPost, getUsersManageLeaderByDept } from '@/api/system/post'
- import { listUser, getUser } from "@/api/system/user";
- import { getProject, updateProject } from "@/api/oa/project/project";
- import { listProjectWork, addProjectWork } from "@/api/oa/project/projectWork";
- import { listProjectComment, getProjectComment } from "@/api/oa/project/projectComment";
- import { listProjectProgress, getProjectProgress } from "@/api/oa/project/projectProgress";
- import { listProjectWorkload } from '@/api/oa/project/projectWorkload'
- import { listProjectContract, addProjectContract } from "@/api/oa/contract/projectContract";
- import { listContract, getContract } from "@/api/oa/contract/contract";
- import { listDevice, getDevice } from "@/api/oa/device/device";
- import { listCar, getCar } from '@/api/oa/car/car';
- import { listProjectChange } from "@/api/oa/project/projectChange";
- import { flowXmlAndNodeByFormId } from "@/api/flowable/definition";
- import { sendQyMessage } from "@/api/qywx/index"
-
- export default {
- props: {
- needReturn: {
- type: Boolean,
- default: true
- }
- },
- data() {
- return {
- baseUrl: process.env.VUE_APP_BASE_API,
- project: {},
- userList: [],
- deviceList: [],
- carList: [],
- workList: [],
- deptLeaderList: [],
- progressList: [],
- actualList: [],
- contractCode: "",
- contractNumber: "",
- openPlan: false,
- openSafe: false,
- openTech: false,
- prLeaderOpen: false,
- deptOpen: false,
- taskForm: {
- formId: ''
- },
- projectComment: {},
- devices: [],
- cars: [],
- drivers: [],
- participates: [],
- undertakingDept: [],
- projectChangeList: [],
- drawerOpen: false,
- flowData: {},
- recordOpen: false,
- clickRow: {
- procInsId: '',
- deployId: ''
- },
- isProjectLeader: false,
- printOpen: false,
- isSend: false,
- }
- },
- created() {
- // 初始化数据
- this.userList = [];
- this.deviceList = [];
- this.carList = [];
- this.workList = [];
- this.deptLeaderList = [];
- this.progressList = [];
- this.actualList = [];
- this.projectChangeList = [];
-
- // 获取基础数据
- this.getUserList();
- this.getDeviceList();
- this.getCarList();
-
- // 获取项目相关数据
- if (this.$route.query.projectId) {
- this.taskForm.formId = this.$route.query.projectId;
- let projectId = this.$route.query.projectId;
- this.getProjectInfo(projectId);
- this.getProjectWorkList(projectId);
- this.getProjectCommentList(projectId);
- this.getContractDataList(projectId);
- this.getProjectProgressList(projectId);
- this.getActualList(projectId);
- this.getProjectChangeList(projectId);
- } else {
- this.goBack();
- }
- },
- methods: {
- // 获取项目信息
- async getProjectInfo(projectId) {
- const res = await getProject(projectId)
- if (res.data) {
- this.project = res.data;
- if (this.project.projectLeader == this.$store.getters.userId) {
- this.isProjectLeader = true;
- }
- let deptArr = [];
- if (this.project.undertakingDept && this.project.undertakingDept.trim() !== '') {
- deptArr = (this.project.undertakingDept.split(',')).map(Number)
- }
- for (let dept of deptArr) {
- const res = await getUsersDeptLeaderByDept({ deptId: Number(dept) })
- this.deptLeaderList.push(res.data.nickName);
- }
- if (this.project.devices && this.project.devices.trim() !== '') {
- this.devices = (this.project.devices.split(',')).map(Number)
- this.devices = await Promise.all(this.devices.map(async item => {
- const res = await getDevice(item)
- return res.data.name + '【' + res.data.code + '】' + '(' + res.data.brand + ')'
- }))
- }
- if (this.project.cars && this.project.cars.trim() !== '') {
- this.cars = (this.project.cars.split(',')).map(Number)
- this.cars = await Promise.all(this.cars.map(async item => {
- const res = await getCar(item)
- return res.data.licensePlate + '(' + res.data.brand + ')'
- }))
- }
- if (this.project.drivers && this.project.drivers.trim() !== '') {
- this.drivers = (this.project.drivers.split(',')).map(Number)
- this.drivers = await Promise.all(this.drivers.map(async item => {
- const res = await getUser(item)
- return res.data.nickName
- }))
- }
- if (this.project.participates && this.project.participates.trim() !== '') {
- this.participates = (this.project.participates.split(',')).map(Number);
- this.participates = await Promise.all(this.participates.map(async item => {
- const res = await getUser(item)
- return res.data.nickName
- }))
- }
- this.getManagerList();
- }
- },
-
- // 获取用户列表
- getUserList() {
- listUser({
- pageNum: 1,
- pageSize: 9999
- }).then(res => {
- if (res.code == 200) {
- this.userList = res.rows
- }
- })
- },
-
- // 获取设备列表
- getDeviceList() {
- listDevice({
- pageNum: 1,
- pageSize: 99999999,
- type: '仪器设备'
- }).then(res => {
- this.deviceList = res.rows
- })
- },
-
- // 获取车辆列表
- getCarList() {
- listCar({ pageSize: 9999, pageNum: 1 }).then(res => {
- this.carList = res.rows
- })
- },
-
- // 获取项目工作列表
- getProjectWorkList(projectId) {
- listProjectWork({ pageNum: 1, pageSize: 50, projectId }).then(res => {
- this.workList = res.rows;
- })
- },
-
- // 获取项目评论列表
- getProjectCommentList(projectId) {
- getProjectComment(projectId).then(res => {
- if (res.data) {
- this.projectComment = res.data
- }
- })
- },
-
- // 获取项目进度列表
- getProjectProgressList(projectId) {
- getProjectProgress(projectId).then(res => {
- if (res.data) {
- this.progressList = res.data;
- }
- });
- },
-
- // 获取实际工作量列表
- getActualList(projectId) {
- listProjectWorkload({ pageNum: 1, pageSize: 100, projectId: projectId }).then(res => {
- if (res.total > 0) {
- this.actualList = res.rows;
- }
- })
- },
-
- // 获取合同数据列表
- getContractDataList(projectId) {
- listProjectContract({ projectId }).then(res => {
- if (res.rows) {
- for (let row of res.rows) {
- getContract(row.contractId).then(res => {
- if (res.data) {
- if (this.contractCode != '') {
- this.contractCode = this.contractCode + '、' + res.data.contractCode;
- } else {
- this.contractCode = res.data.contractCode;
- }
- if (this.contractNumber != '') {
- this.contractNumber = this.contractNumber + '、' + res.data.contractNumber;
- } else {
- this.contractNumber = res.data.contractNumber;
- }
- }
- })
- }
- }
- })
- },
-
- // 获取项目变更列表
- getProjectChangeList(projectId) {
- listProjectChange({ pageNum: 1, pageSize: 100, projectId }).then(response => {
- this.projectChangeList = response.rows;
- });
- },
-
- // 获取该项目的分管领导
- getManagerList() {
- let deptArr = [];
- if (this.project.undertakingDept && this.project.undertakingDept.trim() !== '') {
- deptArr = (this.project.undertakingDept.split(',')).map(Number)
- }
- for (let deptId of deptArr) {
- getUsersManageLeaderByDept({ deptId }).then(resopnse => {
- if (resopnse.data) {
- resopnse.data.forEach(element => {
- if (this.$store.getters.userId == element.userId) {
- this.isSend = true
- }
- });
- }
- })
- }
- },
-
- // 获取部门名称
- getDeptNames(deptIds) {
- if (!deptIds) return '';
- if (!this.$store.state.user || !this.$store.state.user.deptList) return deptIds;
-
- let names = [];
- let ids = deptIds.split(',');
- ids.forEach(id => {
- let dept = this.$store.state.user.deptList.find(d => d.deptId == id);
- if (dept) {
- names.push(dept.deptName);
- }
- });
- return names.length > 0 ? names.join(',') : deptIds;
- },
-
- // 获取用户名称
- getUserName(userId) {
- if (!userId || !this.userList) return '';
- let user = this.userList.find(u => u.userId == userId);
- return user ? user.nickName : '';
- },
-
- // 获取设备名称
- getDeviceNames(deviceIds) {
- if (!deviceIds || !deviceIds.length || !this.deviceList) return '';
- return deviceIds.map(id => {
- let device = this.deviceList.find(d => d.deviceId == id);
- return device ? device.name : '';
- }).join(',');
- },
-
- // 获取车辆名称
- getCarNames(carIds) {
- if (!carIds || !carIds.length || !this.carList) return '';
- return carIds.map(id => {
- let car = this.carList.find(c => c.carId == id);
- return car ? car.licensePlate : '';
- }).join(',');
- },
-
- // 获取用户名称列表
- getUserNames(userIds) {
- if (!userIds || !userIds.length || !this.userList) return '';
- return userIds.map(id => {
- let user = this.userList.find(u => u.userId == id);
- return user ? user.nickName : '';
- }).join(',');
- },
-
- // 获取文件名
- getFileName(name) {
- if (name != null) {
- let arr = name.split('/')
- return arr[arr.length - 1];
- }
- },
-
- // 返回上一页
- goBack() {
- uni.navigateBack();
- },
-
- // 处理设备选择变化
- onDeviceChange(e) {
- this.devices = e.detail.value;
- },
-
- // 处理车辆选择变化
- onCarChange(e) {
- this.cars = e.detail.value;
- },
-
- // 处理驾驶员选择变化
- onDriverChange(e) {
- this.drivers = e.detail.value;
- },
-
- // 处理参与人员选择变化
- onParticipateChange(e) {
- this.participates = e.detail.value;
- },
-
- // 处理催促消息
- async handleUrge(type) {
- if (!this.project.projectLeader) {
- uni.showToast({
- title: '项目负责人未选定',
- icon: 'none'
- });
- return;
- }
- let message = '';
- let user = [];
- let userStirngList = [];
- if (type == '1') {
- let { data } = await getUserByPost({ postName: "专职安全员" });
- user.push(data[0].userId);
- message = "<font color='warning'>请尽快进行安全交底:</font> \n>" +
- "项目编号:" + this.project.projectNumber + " \n>" +
- "项目名称:" + this.project.projectName + " \n>";
- } else if (type == '2') {
- message = "<font color='warning'>请尽快进行技术交底:</font> \n>" +
- "项目编号:" + this.project.projectNumber + " \n>" +
- "项目名称:" + this.project.projectName + " \n>";
- }
- let deptList = (this.project.undertakingDept.split(',')).map(Number);
- for (let d of deptList) {
- let { data } = await getUsersDeptLeaderByDept({ deptId: d });
- user.push(data.userId);
- }
- user.push(this.project.projectLeader);
- for (let u of user) {
- let { data } = await getUser(u);
- userStirngList.push(data.pinyin);
- }
- let userString = userStirngList.join('|');
-
- uni.showModal({
- title: '提示',
- content: '是否发送企业微信消息?',
- success: (res) => {
- if (res.confirm) {
- let formData = new FormData();
- formData.append('message', message);
- formData.append('userString', userString + '|YuSiHan|WangRongHua');
- sendQyMessage(formData).then(() => {
- uni.showToast({
- title: '消息已发送!',
- icon: 'success'
- });
- });
- }
- }
- });
- },
-
- // 检查权限
- hasPermi(permission) {
- return this.$store.getters.permissions.includes(permission);
- },
-
- // 格式化时间
- parseTime(time, pattern) {
- if (!time) return '';
- let date = new Date(time);
- let year = date.getFullYear();
- let month = date.getMonth() + 1;
- let day = date.getDate();
- return pattern.replace('{y}', year)
- .replace('{m}', month.toString().padStart(2, '0'))
- .replace('{d}', day.toString().padStart(2, '0'));
- },
- openBudgetFn() {
- uni.navigateTo({
- url: '/pages/form/budget/budgetInfo?projectId=' + this.project.projectId
- })
- }
- }
- }
- </script>
-
- <style lang="scss" scoped>
- .container {
- padding: 20rpx;
- background-color: #f3f5f7;
- }
-
- .header {
- background-color: #fff;
- padding: 20rpx;
- margin-bottom: 20rpx;
- position: relative;
- text-align: center;
-
- .header-btns {
- display: flex;
- justify-content: space-between;
- margin-bottom: 20rpx;
- }
-
- .title {
- font-size: 36rpx;
- font-weight: bold;
- }
- }
-
- .section {
- background-color: #fff;
- margin-bottom: 20rpx;
- padding: 20rpx;
-
- .section-title {
- font-size: 32rpx;
- font-weight: bold;
- margin-bottom: 20rpx;
- position: relative;
- padding-left: 20rpx;
-
- .line {
- position: absolute;
- left: 0;
- top: 50%;
- transform: translateY(-50%);
- width: 8rpx;
- height: 32rpx;
- background-color: #303133;
- border-radius: 4rpx;
- }
- }
- }
-
- .info-list {
- .info-item {
- display: flex;
- margin-bottom: 20rpx;
- padding: 20rpx;
- background-color: #f8f9fa;
- border-radius: 8rpx;
-
- &.full-width {
- flex-direction: column;
- }
-
- .label {
- width: 175rpx;
- color: #5a5757;
- font-weight: bold;
- }
-
- .value {
- flex: 1;
- color: #333;
- padding-left: 10rpx;
- }
- }
- }
-
- .table {
- width: 100%;
- border: 1px solid #eee;
-
- .table-header {
- display: flex;
- background-color: #f5f7fa;
-
- .th {
- flex: 1;
- padding: 20rpx;
- text-align: center;
- font-weight: bold;
- border-right: 1px solid #eee;
- border-bottom: 1px solid #eee;
- }
- }
-
- .table-body {
- .tr {
- display: flex;
- border-bottom: 1px solid #eee;
-
- .td {
- flex: 1;
- padding: 20rpx;
- text-align: center;
- border-right: 1px solid #eee;
- }
- }
- }
- }
-
- .btn {
- padding: 20rpx 40rpx;
- background-color: #409eff;
- color: #fff;
- border-radius: 8rpx;
- font-size: 28rpx;
- margin: 0 10rpx;
-
- &.btn-small {
- padding: 10rpx 20rpx;
- font-size: 24rpx;
- }
- }
-
- .link {
- color: #409eff;
- text-decoration: underline;
- }
-
- .textarea {
- width: 100%;
- height: 200rpx;
- border: 1px solid #eee;
- border-radius: 8rpx;
- padding: 20rpx;
- margin-bottom: 20rpx;
- }
-
- .sign {
- display: flex;
- justify-content: space-between;
- color: #666;
- font-size: 24rpx;
- }
-
- .picker {
- padding: 20rpx;
- background-color: #fff;
- border: 1px solid #eee;
- border-radius: 8rpx;
- }
-
- .normal {
- color: #909399;
- }
-
- .important {
- color: #f56c6c;
- }
-
- .card-container {
- display: flex;
- flex-direction: column;
- gap: 20rpx;
- width: 100%;
- margin-top: 20rpx;
- }
-
- .card {
- background-color: #fff;
- border-radius: 12rpx;
- box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);
- overflow: hidden;
- margin-bottom: 20rpx;
- }
-
- .card-content {
- display: flex;
- flex-direction: column;
- min-height: 200rpx;
- }
-
- .card-left {
- width: 100%;
- background-color: #f5f7fa;
- padding: 20rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- border-bottom: 1px solid #eee;
- }
-
- .card-title {
- font-size: 28rpx;
- font-weight: bold;
- color: #303133;
- letter-spacing: 4rpx;
- }
-
- .card-right {
- flex: 1;
- padding: 20rpx;
- }
-
- .card-item {
- display: flex;
- margin-bottom: 16rpx;
- line-height: 1.5;
- }
-
- .card-item .label {
- width: 180rpx;
- font-size: 26rpx;
- color: #5a5757;
- font-weight: bold;
- text-align: right;
- }
-
- .card-item .value {
- flex: 1;
- font-size: 26rpx;
- color: #333;
- word-break: break-all;
- padding-left: 10rpx;
- }
-
- .device-item {
- border-bottom: 1px solid #e2e2e2;
- padding: 10rpx;
- }
- </style>
|