123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664 |
- <template>
- <view>
- <u--form labelPosition="left" labelAlign="center" :model="content" ref="uForm" :rules="rules"
- :labelStyle="{fontSize:'32rpx'}" labelWidth="130"> <u-form-item label="督办事项:" borderBottom prop="title">
- <u--input placeholder='请输入督办事项' v-model="content.title" border="none"></u--input>
- </u-form-item>
- <u-form-item label="发起时间:" borderBottom prop="submitTime">
- <u--input v-model="content.submitTime" border="none" readonly></u--input>
- </u-form-item>
- <!-- <u-form-item label="处室及负责人:" borderBottom prop="departmentHead">
- <u--input v-model="content.departmentHead" border="none" readonly></u--input>
- </u-form-item> -->
- <!-- <u-form-item label="信息类别:" borderBottom prop="infoType">
- <u--textarea type="textarea" v-model="content.infoType" placeholder="请输入信息类别"
- border="none"></u--textarea>
- </u-form-item> -->
- <u-form-item label="督办来源:" borderBottom prop="infoSource">
- <uni-data-select @change="infoSourceChange" v-model="content.infoSource" :clear="false"
- placeholder="请选择督办来源" :localdata="InfoList"></uni-data-select>
- </u-form-item>
- <u-form-item label="督办内容:" borderBottom prop="infoSourceContent">
- <u--textarea type="textarea" v-model="content.infoSourceContent" :placeholder="infoSourceContent"
- border="none"></u--textarea>
- </u-form-item>
- <u-form-item label="完成时限:" @click="typeChange('shixian')" borderBottom prop="doneTime">
- <view>
- {{content.doneTime}}
- </view>
- <!-- <u--input v-model="content.doneTime" border="none" readonly></u--input> -->
- </u-form-item>
- <u-form-item label="责任处室:" borderBottom prop="prersonLiable">
- <u--textarea disabled style="width: 190rpx;" type="textarea" v-model="content.prersonLiable"
- placeholder="请选择责任处室" border="none"></u--textarea>
- <u-button v-if="title=='督办编辑'" size="small" type="primary" text="选择" @click="handelSelect"
- style="margin-top: 40rpx;width: 50rpx;margin-right: 10rpx;"></u-button>
- </u-form-item>
- <!-- <u-form-item label="各处室进度详情:" style="" borderBottom prop="ywSupervisionItemList"> -->
- <view style="text-align: center;font-size: 34rpx;margin-top: 50rpx;font-weight: 700;" class="">
- 各处室进度详情:
- </view>
- <view v-for="item in content.ywSupervisionItemList" :key="item.id"
- style="padding: 20rpx 40rpx;border-bottom: 1px solid #ceccca;background-color: #fff;">
- <uni-card style="width:600rpx">
- <view style='margin:20rpx 40rpx' class="">
- <text> 部门: {{item.deptName}}</text>
- <br />
- <text> 姓名: {{item.userName}}</text>
- <br />
- <text>
- 进展情况:<view v-if="
- userId == item.userId &&
- item.submitState != '1' " class="">
- <u--textarea type="textarea" v-model="item.progress"
- placeholder="请输入进展情况"></u--textarea><br />
- </view>
- <span v-else class="">
- {{item.progress}}
- <br />
- </span>
- </text>
- <text>
- 完成佐证材料:<view v-if="
- userId == item.userId &&
- item.submitState != '1' " class="example-body">
- <!-- <uni-file-picker file-mediatype="fileMediatype === 'image'" mode="grid"
- @select="select($event,item)" @progress="progress" @delete="deleteFile"
- @success="success" @fail="fail">
- </uni-file-picker> -->
- <u-button type="primary" @click="uploadPic(item)">上传</u-button>
- <!-- 展示 -->
- <view style="margin-bottom: 30rpx;display: flex;margin-top: 4rpx;"
- v-for="v in item.ywFileList" :key="v.fileId">
- <u-icon style="margin-top: 4rpx;color: #2979FF;" name="attach"></u-icon><u--text
- :lines="1" size="14" color="#2979FF" decoration="underline" :text="v.name"
- @click="downLoad(v.url)">{{v.name}}</u--text><u-icon @click="delFile(v)"
- style="margin-top: 0rpx;" name="close"></u-icon>
- </view>
- <u-action-sheet @select="selectClick" :actions="list" :closeOnClickOverlay="true"
- :closeOnClickAction="true" title="请选择" :show="showUpload"></u-action-sheet>
- </view>
- <view v-else
- style="border-radius: 8rpx;background-color: #f3f3f3;margin-top: 40rpx;padding: 20rpx 40rpx;">
- <!-- <view style="display: flex;align-items: center;margin-bottom: 20rpx;f">
- <u-icon name="file-text-fill" color="#000"></u-icon>
- 附件
- </view> -->
- <view style="margin-bottom: 30rpx;" v-for="v in item.ywFileList" :key="v.fileId">
- <u--text :lines="1" size="15" color="#2979FF" decoration="underline" :text="v.name"
- @click="downLoad(v.url)">{{v.name}}</u--text>
- </view>
- </view>
- </text>
- <br />
- <text> 提交时间: {{item.submitTime}}</text>
- <br />
- <text> 审核领导: {{item.leaderName}}</text>
- <br />
- <text> 审核时间: {{item.approveTime}}</text>
- <br />
- <text>
- 领导意见:<u--textarea v-if="
- userId == item.leaderUserId &&
- item.submitState == '1'
- " type="textarea" v-model="item.leaderMsg" placeholder="请输入领导意见"></u--textarea>
- <span v-else> {{item.leaderMsg}}</span>
- </text>
- <br />
- <text> 领导审核结果:
- <span>
- <span v-for="(aa, index) in leaderOpinList" :key="index">
- <span v-if="aa.value == item.leaderApprove">
- {{ aa.text }}
- <span v-if="true"></span>
- </span>
- </span>
- </span>
- </text>
- </view>
- <span style="display: flex;" v-if="item.leaderApprove == '0'">
- <u-button style="width: 100rpx;" v-if="
- userId == item.leaderUserId &&
- item.submitState == '1'
- " size="small" @click="sendBackInfo(item)" type="error">退回
- </u-button>
- <u-button style="width: 100rpx;margin-left:20rpx" v-if="
- userId == item.leaderUserId &&
- item.submitState == '1'
- " size="small" @click="pass(item)" type="primary">通过
- </u-button>
- </span>
- </uni-card>
- </view>
- <view v-if="showTijiao" style="padding: 0 20rpx;">
- <!-- <u-button v-if="title=='督办编辑'" type="primary" text="保存" @click="keep"
- style="margin-top: 40rpx;"></u-button> -->
- <u-button v-if="tijiaoBtn" type="primary" text="提交" @click="submit"
- style="margin-top: 40rpx;"></u-button>
- <u-button v-else type="warning" text="提交" @click="submit" style="margin-top: 40rpx;"></u-button>
- </view>
- <!-- </u-form-item> -->
- </u--form>
- <u-calendar placeholder="请选择日期" :show="show1" mode="single" allowSameDay @confirm="confirmOne"
- @close="show1 = false"></u-calendar>
- <u-modal :show="peoShow1" title="请选择接收领导" showCancelButton @cancel="cancel1" @confirm="queren1">
- <view style="width: 100%;height: 40vh;overflow: auto;" v-if="peoShow1 == true">
- <u-radio-group v-model="value1" @change="radioChange1" iconPlacement="right">
- <u-collapse accordion style="width: 100%;">
- <u-collapse-item :title="v.Name" :name="v.No" :key="v.No" v-for="v in deptList"
- style="width: 100%;">
- <view style="font-size: 32rpx; padding: 20rpx 0; border-bottom: 1px solid #eaeaea;"
- v-for=" i in userList" :key="i.NO" v-if="i.FK_Dept == v.No">
- <u-radio :label="i.Name" :name="i"></u-radio>
- </view>
- </u-collapse-item>
- </u-collapse>
- </u-radio-group>
- </view>
- </u-modal>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- leaderOpinList: [],
- list: [{
- name: '拍照上传'
- }, {
- name: '从相册上传'
- }],
- userId: '',
- uploadUrl: 'http://121.28.24.104:13898/app/' + "/system/file/fileupload",
- baseURL: null,
- dataSubmit: {
- ywFileList: [],
- leaderUserName: ""
- },
- rowThis: {
- ywFileList: []
- },
- peoShow1: false,
- show1: false,
- typeDate: '',
- content: {
- ywSupervisionStartUserList: [],
- prersonLiable: ''
- },
- rules: {},
- InfoList: [],
- infoSourceContent: '',
- db_template: [],
- title: '',
- deptList: [],
- userList: [],
- dataInfo: {},
- Optionsid: null,
- showTijiao: false,
- tijiaoBtn: false,
- showUpload: false
- }
- },
- onLoad(options) {
- // console.log('config.baseURL', this.arg)
- this.baseURL = uni.getStorageSync('baseUrl');
- this.Optionsid = options.id
- this.getDictsInfo()
- this.getPeoList('016')
- uni.setNavigationBarTitle({
- title: options.title
- })
- this.title = options.title
- uni.$u.http.get('/getInfo').then((res) => {
- console.log('res1', res)
- this.userId = res.user.userId
- console.log('this.userId', this.userId)
- setTimeout(() => {
- uni.$u.http.get('/offcial/supervision/' + options.id).then((res) => {
- console.log('res2222', res)
- console.log(this.userId)
- this.content = res.data
- this.dataInfo.supervisionId = res.data.id;
- this.tijiaoBtn = res.data.submitState == "1" ? true : false;
- this.showTijiao = false;
- for (let i = 0; i < this.content.ywSupervisionItemList.length; i++) {
- if (
- this.content.ywSupervisionItemList[i].userId == this.userId &&
- this.content.ywSupervisionItemList[i].submitState == "0"
- ) {
- this.showTijiao = true;
- }
- }
- })
- }, 200)
- })
- },
- onShow() {
- uni.$once('query', (query) => {
- if (query.a == 'two') {
- if (this.content.prersonLiable != null) {
- // let arrPeo = this.content.prersonLiable.split(",");
- // let arr = getApp().globalData.zerenList.split(',')
- // arr = arr.concat(this.content.prersonLiable)
- this.content.prersonLiable = getApp().globalData.zerenList
- // this.content.prersonLiable = arr.join(" , ");
- this.content.ywSupervisionStartUserList = getApp().globalData.ywListZR
- } else {
- this.content.prersonLiable = getApp().globalData.zerenList
- }
- }
- })
- },
- methods: {
- delFile(itemFile) {
- console.log('itemFILE', itemFile)
- this.rowThis.ywFileList.splice(itemFile, 1)
- },
- uploadPic(item) {
- this.showUpload = true
- this.dataSubmit.id = item.id
- this.rowThis = item
- console.log('this.rowT', this.rowThis)
- },
- selectClick(index) {
- console.log(index)
- let that = this
- if (index.name == '拍照上传') {
- uni.chooseImage({
- count: 9, // 默认9,设置图片的数量
- sourceType: ['camera'], // 可以指定来源是相册还是相机,默认二者都有
- success: function(res) {
- // 返回选定照片的本地文件路径列表 tempFilePaths
- console.log(res.tempFilePaths);
- const pathUrl = res.tempFilePaths[0]
- uni.uploadFile({
- url: 'http://121.28.24.104:13898/app/' + "/system/file/fileupload",
- filePath: pathUrl,
- name: 'file',
- header: {
- Authorization: 'Bearer ' + uni.getStorageSync('token')
- },
- success: (response) => {
- console.log('1111111111111111')
- console.log('96+', response.data)
- console.log(that.rowThis)
- let dataFile = JSON.parse(response.data)
- that.rowThis.ywFileList.push(dataFile.data)
- // if (this.rowThis.ywFileList.length != 0) {
- // for (let i = 0; i < this.rowThis.ywFileList.length; i++) {
- // if (this.rowThis.ywFileList[i].response != undefined) {
- // this.dataSubmit.ywFileList.push(
- // this.rowThis.ywFileList[i].response.data
- // );
- // } else {
- // this.dataSubmit.ywFileList.push(this.rowThis
- // .ywFileList[i]);
- // }
- // }
- // }
- // this.dataSubmit.ywFileList.push()
- },
- fail: (response) => {
- console.log('fail', response)
- }
- })
- }
- });
- } else if (index.name == '从相册上传') {
- console.log('586', this.rowThis)
- uni.chooseImage({
- count: 1, // 默认9,设置图片的数量
- sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
- sourceType: ['album'], // 可以指定来源是相册还是相机,默认二者都有
- success: function(res) {
- // 返回选定照片的本地文件路径列表 tempFilePaths
- console.log(res);
- const pathUrl = res.tempFilePaths[0]
- uni.uploadFile({
- url: 'http://121.28.24.104:13898/app/' + "/system/file/fileupload",
- filePath: pathUrl,
- name: 'file',
- header: {
- Authorization: 'Bearer ' + uni.getStorageSync('token')
- },
- success: (response) => {
- console.log('1111111111111111')
- console.log('96+', response.data)
- console.log(that.rowThis)
- let dataFile = JSON.parse(response.data)
- that.rowThis.ywFileList.push(dataFile.data)
- // if (this.rowThis.ywFileList.length != 0) {
- // for (let i = 0; i < this.rowThis.ywFileList.length; i++) {
- // if (this.rowThis.ywFileList[i].response != undefined) {
- // this.dataSubmit.ywFileList.push(
- // this.rowThis.ywFileList[i].response.data
- // );
- // } else {
- // this.dataSubmit.ywFileList.push(this.rowThis
- // .ywFileList[i]);
- // }
- // }
- // }
- // this.dataSubmit.ywFileList.push()
- },
- fail: (response) => {
- console.log('fail', response)
- }
- })
- }
- });
- }
- this.showUpload = false
- },
- downLoad(path) {
- console.log('’', path)
- uni.downloadFile({
- url: path,
- success: (res) => {
- var filePath = res.tempFilePath;
- uni.openDocument({
- filePath: filePath,
- showMenu: true,
- success: function(res) {
- console.log('打开文档成功');
- }
- });
- }
- })
- },
- sendBackInfo(row) {
- if (
- row.leaderMsg == "" ||
- row.leaderMsg == null ||
- row.leaderMsg == undefined
- ) {
- uni.showToast({
- title: "请填写领导意见",
- icon: "none",
- mask: true,
- duration: 3000
- })
- return;
- } else {
- this.dataInfo.id = row.id;
- this.dataInfo.leaderMsg = row.leaderMsg;
- this.dataInfo.leaderApprove = "1";
- uni.$u.http.post('/offcial/supervision/leaderApprove', this.dataInfo).then(res => {
- uni.showToast({
- title: "退回成功",
- icon: "none",
- mask: true,
- duration: 3000
- })
- uni.$u.http.get('/offcial/supervision/' + this.Optionsid).then((res) => {
- console.log('res', res)
- this.content = res.data
- this.dataInfo.supervisionId = res.data.id;
- this.tijiaoBtn = res.data.submitState == "1" ? true : false;
- this.showTijiao = false;
- for (let i = 0; i < this.content.ywSupervisionItemList.length; i++) {
- if (
- this.content.ywSupervisionItemList[i].userId == this.userId &&
- this.content.ywSupervisionItemList[i].submitState == "0"
- ) {
- this.showTijiao = true;
- }
- }
- })
- })
- }
- },
- pass(row) {
- if (
- row.leaderMsg == "" ||
- row.leaderMsg == null ||
- row.leaderMsg == undefined
- ) {
- uni.showToast({
- title: "请填写领导意见",
- icon: "none",
- mask: true,
- duration: 3000
- })
- return;
- } else {
- this.dataInfo.id = row.id;
- // this.dataInfo.supervisionId = row.id;
- this.dataInfo.leaderMsg = row.leaderMsg;
- this.dataInfo.leaderApprove = "2";
- uni.$u.http.post('/offcial/supervision/leaderApprove', this.dataInfo).then(res => {
- uni.showToast({
- title: "通过成功",
- icon: "none",
- mask: true,
- duration: 3000
- })
- uni.$u.http.get('/offcial/supervision/' + this.Optionsid).then((res) => {
- console.log('res', res)
- this.content = res.data
- this.dataInfo.supervisionId = res.data.id;
- this.tijiaoBtn = res.data.submitState == "1" ? true : false;
- this.showTijiao = false;
- for (let i = 0; i < this.content.ywSupervisionItemList.length; i++) {
- if (
- this.content.ywSupervisionItemList[i].userId == this.userId &&
- this.content.ywSupervisionItemList[i].submitState == "0"
- ) {
- this.showTijiao = true;
- }
- }
- })
- })
- }
- },
- select(e, item) {
- console.log('e', e)
- console.log('item', item)
- this.dataSubmit.id = item.id
- this.rowThis = item
- const pathUrl = e.tempFilePaths[0]
- uni.uploadFile({
- url: this.uploadUrl,
- filePath: pathUrl,
- name: 'file',
- header: {
- Authorization: 'Bearer ' + uni.getStorageSync('token')
- },
- // formData: {
- // 'path': 'supervision'
- // },
- success: (uploadFileRes) => {
- console.log('uploadFileRes', uploadFileRes)
- this.rowThis.ywFileList.push(uploadFileRes.data)
- if (this.rowThis.ywFileList.length != 0) {
- for (let i = 0; i < this.rowThis.ywFileList.length; i++) {
- if (this.rowThis.ywFileList[i].response != undefined) {
- this.dataSubmit.ywFileList.push(
- this.rowThis.ywFileList[i].response.data
- );
- } else {
- this.dataSubmit.ywFileList.push(this.rowThis.ywFileList[i]);
- }
- }
- }
- }
- })
- },
- progress(e) {
- console.log('progress', e)
- },
- success(e) {
- console.log('success', e)
- },
- fail(e) {
- console.log('fail', e)
- },
- deleteFile(e) {
- console.log('del', e)
- },
- //选择接收人
- queren1() {
- this.peoShow1 = false
- this.dataSubmit.ywFileList = this.rowThis.ywFileList
- this.dataSubmit.progress = this.rowThis.progress
- console.log('dataSubmit', this.dataSubmit)
- uni.$u.http.post('/offcial/supervision/editItem', this.dataSubmit).then(res => {
- uni.showToast({
- title: "提交成功",
- icon: "none",
- mask: true,
- duration: 3000
- })
- uni.$emit('query', {
- a: 'back'
- })
- setTimeout(() => {
- uni.navigateBack()
- }, 2000)
- }).catch((err) => {
- uni.showToast({
- title: err.msg,
- icon: "none",
- mask: true,
- duration: 3000
- })
- })
- },
- radioChange1(e) {
- console.log('65846', e)
- // this.content.params.toEmps = e.NO
- // this.content.toEmpsName = e.Name
- let selUsers = e.NO
- if (selUsers != undefined && selUsers != "") {
- this.dataSubmit.leaderUserName = selUsers;
- }
- },
- cancel1() {
- this.peoShow1 = false
- this.content.params.toEmps = null
- this.content.toEmpsName = null
- this.value1 = null
- },
- submit() {
- this.peoShow1 = true
- },
- //获取接收人信息
- getPeoList(v) {
- uni.$u.http.get(`/jflow/restful/GenerNextStepNodeEmpsNoWorkId?flowNo=${v}&toNodeID=602`).then(
- res => {
- this.deptList = res.Depts
- this.userList = res.Emps
- console.log(this.deptList)
- console.log(this.userList)
- })
- },
- keep() {
- uni.showLoading({
- title: "保存中...",
- mask: true
- })
- uni.$u.http.put("/offcial/supervision", this.content).then(res => {
- uni.showToast({
- title: "保存成功",
- icon: "none",
- mask: true,
- duration: 3000
- })
- uni.hideLoading()
- uni.$emit('query', {
- a: 'back'
- })
- setTimeout(() => {
- uni.navigateBack()
- }, 2000)
- }).catch((err) => {
- uni.showToast({
- title: err.msg,
- icon: "none",
- mask: true,
- duration: 3000
- })
- uni.hideLoading()
- })
- },
- handelSelect() {
- uni.navigateTo({
- url: `/pages/zerenchushi/zerenchushi`
- })
- },
- confirmOne(e) {
- if (this.typeDate == 'shixian') {
- console.log('11')
- this.content.doneTime = e[0]
- }
- this.show1 = false
- },
- typeChange(e) {
- this.show1 = true
- this.typeDate = e
- },
- infoSourceChange(val) {
- console.log("db_template", this.db_template);
- console.log('val', val);
- this.infoSourceContent = this.db_template[val - 1].text;
- },
- getDictsInfo() {
- let that = this
- uni.$u.http.get('/system/dict/data/type/info_source').then(res => {
- this.InfoList = res.data.map((item, index) => {
- let obj = {
- value: item.dictValue,
- id: item.dictValue,
- text: item.dictLabel
- }
- return obj
- })
- })
- uni.$u.http.get('/system/dict/data/type/leader_approve').then(res => {
- that.leaderOpinList = res.data.map((item, index) => {
- let obj = {
- value: item.dictValue,
- id: item.dictValue,
- text: item.dictLabel
- }
- return obj
- })
- console.log('leaderOpinList', this.leaderOpinList)
- })
- uni.$u.http.get('/system/dict/data/type/db_template').then(res => {
- this.db_template = res.data.map((item, index) => {
- let obj = {
- value: item.dictValue,
- id: item.dictValue,
- text: item.dictLabel
- }
- return obj
- })
- })
- }
- }
- }
- </script>
- <style>
- </style>
|