index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803
  1. <template>
  2. <view class="addPost">
  3. <u-navbar ref="uNavbar" :border-bottom="false" :back-icon-color="setNav.backColor" :is-back="setNav.isdisPlayNavTitle"
  4. :title-size="setNav.size" :title-bold="setNav.bold" :title="setNav.navTitle" :title-color="setNav.color" :background="setNav"></u-navbar>
  5. <view class="content">
  6. <view class="title">
  7. <view class="lable">发文字号</view>
  8. <view class="text" @click="onShowZihao()">查看近期发文字号</view>
  9. </view>
  10. <view class="list">
  11. <textarea placeholder-style="color:#AAAAAA;font-size: 28rpx;" style="height:146rpx;width:calc(100% - (10px + 5px) * 2);;background: #EDEDED;color:#333;font-size: 28rpx;padding: 30rpx;border-radius: 6rpx;"
  12. v-model="fixedData.message_code" placeholder="请输入发文字号" />
  13. </view>
  14. <view class="title">
  15. <view class="lable">发文日期</view>
  16. <u-input @click="onShowTime()" class="input" v-model="fixedData.message_time" placeholder-style="{color:#AAAAAA}" input-align="right" placeholder="请选择发文日期" type="text" :border="false" disabled />
  17. </view>
  18. <!-- #ifdef MP-WEIXIN -->
  19. <view class="title" @click="selectFile('text_data')">
  20. <view class="lable">正文上传</view>
  21. <view class="select">请选择pdf格式文件上传</view>
  22. <image class="black" src="/static/img/black.png" mode=""></image>
  23. </view>
  24. <!-- #endif -->
  25. <!-- #ifndef MP-WEIXIN -->
  26. <view class="title">
  27. <view class="lable">正文上传</view>
  28. <lsj-upload
  29. ref="lsjUpload"
  30. childId="upload"
  31. :size="10"
  32. style="width: 100%;"
  33. v-model="percent"
  34. @input="onInput"
  35. @callback="onCallback($event,'text_data')">
  36. <view class="title" >
  37. <view class="select">请选择文件</view>
  38. <image class="black" src="/static/img/black.png" mode=""></image>
  39. </view>
  40. </lsj-upload>
  41. </view>
  42. <!-- #endif -->
  43. <view class="uptEext" v-if="text_data.length > 0">
  44. <view class="item" v-for="(item, index) in text_data" :key="index">
  45. <view class="text">{{item.name}}</view>
  46. <image class="icon_sc_close" src="/static/img/icon_sc_close.png" mode="" @click="delFile('text_data', index)"></image>
  47. </view>
  48. </view>
  49. <!-- #ifdef MP-WEIXIN -->
  50. <view class="title" @click="selectFile('enclosure_data')">
  51. <view class="lable">附件上传</view>
  52. <view class="select">请选择文件</view>
  53. <image class="black" src="/static/img/black.png" mode=""></image>
  54. </view>
  55. <!-- #endif -->
  56. <!-- #ifndef MP-WEIXIN -->
  57. <view class="title">
  58. <view class="lable">附件上传</view>
  59. <lsj-upload
  60. ref="lsjUploadS"
  61. childId="upload"
  62. :size="10"
  63. style="width: 100%;"
  64. v-model="percent2"
  65. @input="onInput"
  66. @callback="onCallback($event,'enclosure_data')">
  67. <view class="title" >
  68. <view class="select">请选择文件</view>
  69. <image class="black" src="/static/img/black.png" mode=""></image>
  70. </view>
  71. </lsj-upload>
  72. <!-- <uni-file-picker @select="selectAPP($event,'enclosure_data')" limit="1" file-mediatype="all"></uni-file-picker> -->
  73. </view>
  74. <!-- #endif -->
  75. <view class="uptEexts" v-if="enclosure_data.length > 0">
  76. <view class="item" v-for="(item, index) in enclosure_data" :key="index">
  77. <image class="icon_sc_wj" src="/static/img/icon_sc_wj.png" mode=""></image>
  78. <view class="text">{{item.name}}</view>
  79. <image class="icon_sc_close" src="/static/img/icon_sc_close.png" mode="" @click="delFile('enclosure_data', index)"></image>
  80. </view>
  81. </view>
  82. <view class="title">
  83. <view class="lable">文件标题</view>
  84. <u-input class="input" v-model="fixedData.message_title" placeholder-style="{color:#AAAAAA}" input-align="right" placeholder="请输入文件标题" type="text" :border="false" />
  85. </view>
  86. <view class="title" @click="selectPeople">
  87. <view class="lable">分发人员</view>
  88. <view class="select">请选择分发人员</view>
  89. <image class="black" src="/static/img/black.png" mode=""></image>
  90. </view>
  91. <view class="list">
  92. <view class="renyuan">
  93. <view class="tip" v-if="selectData.length">
  94. <text v-for="(item, index) in selectData" :key="index">{{item.nickName}}{{index == (selectData.length - 1) ? '' : ','}}</text>
  95. </view>
  96. <view class="tip" v-else>请选择分发人员</view>
  97. </view>
  98. </view>
  99. <view class="title">
  100. <view class="lable">分发单位</view>
  101. <view class="select" style="color: #343434;" @click="getDeptNameAndRoleName">请选择上方分发人员</view>
  102. <!-- <image class="black" src="/static/img/black.png" mode=""></image> -->
  103. </view>
  104. <view class="list">
  105. <view class="renyuan">
  106. <view class="tip" v-if="deptNameList.length">
  107. <text v-for="(item, index) in deptNameList" :key="index">{{item}}{{index == (deptNameList.length - 1) ? '' : ','}}</text>
  108. </view>
  109. <view class="tip" v-else>请选择上方分发人员</view>
  110. </view>
  111. </view>
  112. <view class="title">
  113. <view class="lable">备注</view>
  114. </view>
  115. <view class="list">
  116. <textarea v-model="fixedData.message_remark" placeholder-style="color:#AAAAAA;font-size: 28rpx;" style="height:146rpx;width:calc(100% - (10px + 5px) * 2);;background: #EDEDED;color:#333;font-size: 28rpx;padding: 30rpx;border-radius: 6rpx;" placeholder="请输入备注"/>
  117. </view>
  118. <view class="btnBox" @click="complexSave">提交</view>
  119. <view class="tipBtn">* 请仔细阅读发文信息后再提交</view>
  120. </view>
  121. <!-- 近期字号 -->
  122. <u-popup v-model="showZihao" mode="center" width="80%" border-radius="6" height="800">
  123. <view class="showZihao">
  124. <view class="ziTitle">
  125. <image class="icon_tc_close" src="/static/img/icon_tc_close.png" mode="" style="opacity: 0;"></image>
  126. <view class="text">近期发文字号</view>
  127. <image class="icon_tc_close" src="/static/img/icon_tc_close.png" mode="" @click="onShowZihao()"></image>
  128. </view>
  129. <view class="itemBox">
  130. <scroll-view class="scroll-view_H" scroll-x="true" @scroll="scroll" scroll-left="120" style="height: 550rpx;">
  131. <view class="item" v-for="(item,index) in csQueryListData" :key="index" @click="onCopy(index,item.message_code)">
  132. <view class="ld"></view>
  133. <view class="text" :class="index == copyIndex?'active':''">{{item.message_code}}</view>
  134. </view>
  135. </scroll-view>
  136. </view>
  137. <view class="btn" @click="ckCopy()">复制发文字号</view>
  138. </view>
  139. </u-popup>
  140. <!-- 时间 -->
  141. <u-picker mode="time" v-model="showTime" :params="params" @confirm="getTime"></u-picker>
  142. </view>
  143. </template>
  144. <script>
  145. // import upload from '@/components/pretty-uploadFile/pretty-uploadFile.vue'
  146. // import upload from '@/components/uni-file-picker/uni-file-picker.vue'
  147. export default {
  148. components: {
  149. // upload
  150. },
  151. data() {
  152. return {
  153. percent: '',
  154. percent2: '',
  155. setNav:{
  156. backgroundColor:'#fff', //背景色
  157. color:'#333', //字体颜色
  158. bold: true,
  159. size: '36',
  160. backColor: '#333',
  161. isdisPlayNavTitle: true, //是否显示返回按钮
  162. navTitle:'填写发文信息' //导航标题
  163. },
  164. fromData: {
  165. table: 'boman_message',
  166. objId: -1,
  167. message_time:''
  168. },
  169. fixedData: {
  170. message_code: '',
  171. message_title: '',
  172. message_remark: '',
  173. send_time: '',
  174. message_situation: '1',
  175. send_user_id: '',
  176. send_user_name: '',
  177. create_dept_nam: '',
  178. message_time: '',
  179. message_upload: [],
  180. message_id: 'fk.boman_message'
  181. },
  182. textareaVal: '',
  183. showZihao: false,
  184. queryListPageNo: 1,
  185. csQueryListData: [],
  186. copyIndex: null,
  187. ckCopyData: '',
  188. showTime: false,
  189. params: {
  190. year: true,
  191. month: true,
  192. day: true,
  193. hour: true,
  194. minute: true,
  195. second: true
  196. },
  197. text_data: [],
  198. enclosure_data: [],
  199. userInfo: {},
  200. isGo: false,
  201. selectData: [],
  202. deptNameList: [],
  203. tableInfo: {},
  204. objId: '',
  205. isLogin: false,
  206. isWixin: false,
  207. tmpId: []
  208. }
  209. },
  210. onLoad(options) {
  211. this.objId = options.objId && options.objId != 'undefined' ? options.objId : ''
  212. if (this.objId) {
  213. this.getOneMap()
  214. this.getChldren()
  215. }
  216. uni.removeStorageSync('selectData')
  217. this.userInfo = JSON.parse(uni.getStorageSync('userInfo') || '{}');
  218. this.fixedData.send_user_id = this.userInfo.id
  219. this.fixedData.send_user_name = this.userInfo.userName
  220. this.fixedData.create_dept_nam = this.userInfo.dept.deptName
  221. this.getCsQueryList()
  222. this.tableInfo = JSON.parse(uni.getStorageSync('byTableInfo') || '{}')
  223. // #ifdef MP-WEIXIN
  224. this.isWixin = true
  225. // #endif
  226. },
  227. onShow() {
  228. let selectData = JSON.parse(uni.getStorageSync('selectData') || '[]')
  229. this.selectData = selectData
  230. console.log(selectData)
  231. if (selectData && selectData.length) {
  232. this.getDeptNameAndRoleName()
  233. }
  234. },
  235. onReady() {
  236. this.onCreate();
  237. },
  238. methods: {
  239. onCreate() {
  240. // 初始化参数并创建上传DOM
  241. this.$refs.lsjUpload.create({
  242. // #ifdef APP-PLUS
  243. cuWebview: this.$mp.page.$getAppWebview(), // app必传
  244. // #endif
  245. url: 'https://qsjyoa.qs163.cn/prod-api/boman-file/upload', //替换为你的接口地址
  246. name: 'file', // 附件key
  247. size: 10, // 附件上传大小上限(M),默认10M
  248. debug: true,
  249. //根据你接口需求自定义请求头
  250. formData: {
  251. filename: ''
  252. },
  253. header: {
  254. 'Authorization': uni.getStorageSync('authToken')
  255. },
  256. });
  257. this.$refs.lsjUploadS.create({
  258. // #ifdef APP-PLUS
  259. cuWebview: this.$mp.page.$getAppWebview(), // app必传
  260. // #endif
  261. url: 'https://qsjyoa.qs163.cn/prod-api/boman-file/upload', //替换为你的接口地址
  262. name: 'file', // 附件key
  263. size: 10, // 附件上传大小上限(M),默认10M
  264. debug: true,
  265. //根据你接口需求自定义请求头
  266. formData: {
  267. filename: ''
  268. },
  269. header: {
  270. 'Authorization': uni.getStorageSync('authToken')
  271. },
  272. });
  273. },
  274. onInput(e) {
  275. uni.showLoading({
  276. mask: true,
  277. title: '文件上传中'
  278. })
  279. },
  280. onCallback(e,type) {
  281. let files = JSON.parse(e.responseText)
  282. if (files.code == 200) {
  283. if (type == 'text_data') {
  284. this.fixedData.message_title = files.data.name.substring(0, files.data.name.indexOf('.'))
  285. }
  286. this[type].push(files.data)
  287. }
  288. uni.hideLoading()
  289. },
  290. selectAPP(e,type) {
  291. console.log(e)
  292. uni.showLoading({
  293. mask: true,
  294. title: '文件上传中'
  295. })
  296. uni.uploadFile({
  297. url: 'https://qsjyoa.qs163.cn/prod-api/boman-file/upload',
  298. filePath: e.tempFilePaths[0],
  299. name: 'file',
  300. formData: {
  301. filename: e.tempFiles[0].name
  302. },
  303. header: {
  304. 'Authorization': uni.getStorageSync('authToken')
  305. },
  306. success: resFile => {
  307. let files = JSON.parse(resFile.data)
  308. if (files.code == 200) {
  309. if (type == 'text_data') {
  310. this.fixedData.message_title = files.data.name.substring(0, files.data.name.indexOf('.'))
  311. }
  312. this[type].push(files.data)
  313. }
  314. },
  315. complete: () => {
  316. uni.hideLoading()
  317. }
  318. })
  319. },
  320. onShowZihao() {
  321. this.showZihao = !this.showZihao
  322. },
  323. async getCsQueryList () {
  324. let that = this
  325. let data = {
  326. "table": "boman_message",
  327. "orderBy":
  328. "create_time desc",
  329. "pageSize": 10,
  330. "pageNo": that.queryListPageNo,
  331. "showData": [ "message_code" ] ,
  332. }
  333. let res = await that.$u.post(`boman-web-core/p/cs/queryList`,data)
  334. that.csQueryListData = res.data.rows
  335. },
  336. async getOneMap () {
  337. let that = this
  338. let data = {
  339. "table": "boman_message",
  340. "fixedData": {
  341. "id": this.objId
  342. }
  343. }
  344. let res = await that.$u.post(`boman-web-core/p/cs/one/map`,data)
  345. if (res.code == 200) {
  346. let {message_code, message_time, message_title, message_remark, send_time, message_upload = "", message_enclosure = ""} = res.data
  347. this.fixedData.message_code = message_code
  348. this.fixedData.message_time = message_time
  349. this.fixedData.message_title = message_title
  350. this.fixedData.message_remark = message_remark
  351. this.fixedData.send_time = send_time
  352. if (message_upload) {
  353. this.text_data = JSON.parse(message_upload)
  354. }
  355. if (message_enclosure) {
  356. this.enclosure_data = JSON.parse(message_enclosure)
  357. }
  358. }
  359. },
  360. async getChldren () {
  361. let that = this
  362. let data = {
  363. "table": "boman_message_receive",
  364. "pageNo": 1,
  365. "isUi": false,
  366. "pageSize": 1000,
  367. "orderBy": "create_time desc",
  368. "fixedData": {
  369. "condition": {
  370. "visible": "Y",
  371. "message_id": this.objId,
  372. "is_del":"N"
  373. }
  374. }
  375. }
  376. let res = await that.$u.post(`boman-web-core/p/cs/queryList`,data)
  377. if (res.code == 200) {
  378. this.deptNameList = []
  379. this.selectData = res.data.rows.map(item => {
  380. this.deptNameList.push(item.receive_dept_name)
  381. return {
  382. userName: item.receive_user_name,
  383. deptName: item.receive_dept_name,
  384. id: item.receive_user_id
  385. }
  386. })
  387. // if (selectData && selectData.length) {
  388. // this.getDeptNameAndRoleName()
  389. // }
  390. }
  391. },
  392. onCopy(index,val) {
  393. this.copyIndex = index
  394. this.ckCopyData = val
  395. },
  396. ckCopy() {
  397. this.fixedData.message_code = this.ckCopyData
  398. this.showZihao = false
  399. // uni.setClipboardData({
  400. // data: this.ckCopyData ,
  401. // success: function () {
  402. // uni.showToast({
  403. // icon: 'none',
  404. // title: '已复制'
  405. // })
  406. // }
  407. // });
  408. },
  409. async complexSave () {
  410. if (this.isLogin) {
  411. return
  412. }
  413. if (!this.fixedData.message_time) {
  414. return uni.showToast({
  415. title: '请选择发文日期',
  416. icon: 'none'
  417. })
  418. }
  419. // if (!this.text_data.length) {
  420. // return uni.showToast({
  421. // title: '请上传正文',
  422. // icon: 'none'
  423. // })
  424. // }
  425. if (!this.selectData.length) {
  426. return uni.showToast({
  427. title: '请选择分发人员',
  428. icon: 'none'
  429. })
  430. }
  431. this.isLogin = true
  432. uni.showLoading({
  433. title: '发文中...'
  434. })
  435. let json = Object.assign({}, this.fixedData, {
  436. send_time: this.setTime(),
  437. has_annex: "N",
  438. message_upload: JSON.stringify(this.text_data.concat(this.enclosure_data))
  439. })
  440. let children = []
  441. if (this.selectData.length) {
  442. children = this.selectData.map((item, index) => {
  443. return {
  444. "table": 'boman_message_receive',
  445. "objId": -1, //this.objId ||
  446. "from_dept_name": this.fixedData.create_dept_nam,
  447. "fixedData": {
  448. "message_id": "fk.boman_message",
  449. "send_message_time": json.send_time,
  450. // 'message_situation': '1',
  451. // "create_dept_name": this.fixedData.create_dept_nam,
  452. "receive_user_id": item.id,
  453. "receive_user_name": item.nickName,
  454. "receive_dept_name": item.dept.deptName,
  455. "send_user_id": json.send_user_id,
  456. "from_dept_name": json.create_dept_nam,
  457. "message_title": json.message_title,
  458. "send_user_name": json.send_user_name
  459. }
  460. }
  461. })
  462. }
  463. let res = await this.$u.post(`boman-web-core/p/cs/complex/save`, {
  464. "table": "boman_message",
  465. "objId": -1, // this.objId ||
  466. "create_dept_name": this.fixedData.create_dept_nam,
  467. "fixedData": json,
  468. children
  469. })
  470. if (res.code == 200) {
  471. let ress = await this.$u.post(`jflow/p/c/process/launch`, {
  472. "businessCodes": res.data[0].data,
  473. "businessType": this.tableInfo.id,
  474. "businessTypeName": this.tableInfo.tableName,
  475. "dbname": this.tableInfo.tableName,
  476. "initiator": this.fixedData.send_user_id,
  477. "userName": this.fixedData.send_user_name
  478. })
  479. if (ress.resultCode == 0) {
  480. uni.showToast({
  481. title: '发文成功',
  482. })
  483. setTimeout(() => {
  484. uni.switchTab({
  485. url: `/pages/tabbar/index/index`, //要跳转的路径
  486. })
  487. }, 1500)
  488. }
  489. this.isLogin = false
  490. uni.hideLoading()
  491. } else {
  492. uni.showToast({
  493. title: '发文错误,联系管理员',
  494. icon: 'none'
  495. })
  496. this.isLogin = false
  497. uni.hideLoading()
  498. }
  499. },
  500. async getDeptNameAndRoleName () {
  501. if (!this.selectData.length) {
  502. return uni.showToast({
  503. title: '请选择分发人员',
  504. icon: 'none'
  505. })
  506. }
  507. let res = await this.$u.post(`system/user/getDeptNameAndRoleName`, this.selectData)
  508. if (res.nikeNameList) {
  509. this.deptNameList = res.nikeNameList
  510. }
  511. },
  512. setTime () {
  513. let dateTime
  514. let yy = new Date().getFullYear()
  515. let mm = new Date().getMonth() + 1
  516. let dd = new Date().getDate()
  517. let hh = new Date().getHours()
  518. let mf = new Date().getMinutes() < 10 ? ('0' + new Date().getMinutes())
  519. :
  520. new Date().getMinutes()
  521. let ss = new Date().getSeconds() < 10 ? ('0' + new Date().getSeconds())
  522. :
  523. new Date().getSeconds()
  524. dateTime = yy + '-' + (mm < 10 ? ('0' + mm) : mm) + '-' + (dd < 10 ? ('0' + dd) : dd) + ' ' + (hh < 10 ? ('0' + hh) : hh) + ':' + (mf < 10 ? ('0' + mf) : mf) + ':' + (ss < 10 ? ('0' + ss) : ss)
  525. return dateTime
  526. },
  527. onShowTime() {
  528. this.showTime = !this.showTime
  529. },
  530. getTime(e) {
  531. // console.log(e);
  532. this.fixedData.message_time = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`
  533. },
  534. selectPeople () {
  535. uni.navigateTo({
  536. url: '/pages/postView/selectPeople/index'
  537. })
  538. },
  539. delFile (type, index) {
  540. this[type].splice(index, 1)
  541. this[type] = JSON.parse(JSON.stringify(this[type]))
  542. },
  543. selectFile (type) {
  544. let chooseFile = uni.chooseFile;
  545. if (typeof wx !== 'undefined' &&
  546. typeof wx.chooseMessageFile === 'function') {
  547. chooseFile = wx.chooseMessageFile;
  548. }
  549. if (typeof chooseFile !== 'function') {
  550. return uni.showToast({
  551. title: '请指定 type 类型,该平台仅支持选择 image 或 video。',
  552. icon:'none',
  553. })
  554. }
  555. chooseFile({
  556. count: 1,
  557. type: 'all',
  558. success: (res) => {
  559. // tempFilePath可以作为img标签的src属性显示图片
  560. const tempFilePaths = res.tempFiles
  561. if (tempFilePaths && tempFilePaths.length) {
  562. // if (tempFilePaths[0].path.indexOf('.pdf') != -1) {
  563. uni.showLoading({
  564. mask: true,
  565. title: '文件上传中'
  566. })
  567. uni.uploadFile({
  568. url: 'https://qsjyoa.qs163.cn/prod-api/boman-file/upload',
  569. filePath: tempFilePaths[0].path,
  570. name: 'file',
  571. formData: {
  572. filename: tempFilePaths[0].name
  573. },
  574. header: {
  575. 'Authorization': uni.getStorageSync('authToken')
  576. },
  577. success: resFile => {
  578. uni.hideLoading()
  579. let files = JSON.parse(resFile.data)
  580. if (files.code == 200) {
  581. if (type == 'text_data') {
  582. this.fixedData.message_title = files.data.name.substring(0, files.data.name.indexOf('.'))
  583. }
  584. this[type].push(files.data)
  585. }
  586. }
  587. })
  588. // } else {
  589. // uni.showToast({
  590. // title: '请选择pdf文件',
  591. // icon:'none',
  592. // })
  593. // }
  594. }
  595. },
  596. fail: (res) => {
  597. // uni.showToast({
  598. // title: res.errMsg,
  599. // icon:'none',
  600. // })
  601. }
  602. })
  603. },
  604. getPdf() {
  605. uni.chooseImage({
  606. count: 1, //默认100
  607. success: function (res) {
  608. uni.uploadFile({
  609. url: 'https://qsjyoa.qs163.cn/prod-api/boman-file/upload', //仅为示例,非真实的接口地址
  610. filePath: res.tempFilePaths[0],
  611. name: 'file',
  612. header: {
  613. Authorization: uni.getStorageSync('authToken')
  614. },
  615. success: (uploadFileRes) => {
  616. console.log(uploadFileRes.data);
  617. },
  618. complete: (err) => {
  619. console.log(err);
  620. }
  621. });
  622. }
  623. });
  624. }
  625. }
  626. }
  627. </script>
  628. <style>
  629. page{
  630. background: #FFFFFF;
  631. }
  632. </style>
  633. <style lang="scss" scoped>
  634. .content{
  635. padding: 30rpx;
  636. .title{
  637. display: flex;
  638. align-items: center;
  639. justify-content: space-between;
  640. font-weight: 500;
  641. padding: 30rpx 0 0 0;
  642. .lable{
  643. font-size: 28rpx;
  644. color: #343434;
  645. flex: 0 0 120rpx;
  646. }
  647. .text{
  648. font-size: 26rpx;
  649. color: #0099FF;
  650. }
  651. .input{
  652. font-size: 28rpx;
  653. }
  654. .select {
  655. color: #aaa;
  656. font-size: 28rpx;
  657. flex: 1;
  658. text-align: right;
  659. }
  660. .black{
  661. width: 15rpx;
  662. height: 26rpx;
  663. margin-left: 20rpx;
  664. }
  665. }
  666. .list{
  667. margin-top: 30rpx;
  668. .textarea{
  669. background: #EDEDED;
  670. border-radius: 8rpx;
  671. padding: 20rpx 30rpx !important;
  672. }
  673. .renyuan{
  674. background: #EDEDED;
  675. border-radius: 8rpx;
  676. min-height: 186rpx;
  677. padding: 20rpx 30rpx !important;
  678. color: #AAAAAA;
  679. }
  680. }
  681. .uptEext{
  682. margin-top: 30rpx;
  683. .item{
  684. font-size: 26rpx;
  685. color: #0099FF;
  686. margin-bottom: 20rpx;
  687. display: flex;
  688. &:last-child{
  689. margin-bottom: 0;
  690. }
  691. .text{
  692. flex: 1;
  693. margin-right: 30rpx;
  694. }
  695. .icon_sc_close{
  696. width: 30rpx;
  697. height: 30rpx;
  698. margin-left: auto;
  699. }
  700. }
  701. }
  702. .uptEexts{
  703. margin-top: 30rpx;
  704. .item{
  705. font-size: 26rpx;
  706. color: #0099FF;
  707. margin-bottom: 20rpx;
  708. display: flex;
  709. &:last-child{
  710. margin-bottom: 0;
  711. }
  712. .text{
  713. flex: 1;
  714. margin: 0 30rpx;
  715. }
  716. .icon_sc_wj{
  717. width: 33rpx;
  718. height: 29rpx;
  719. margin-top: 4rpx;
  720. }
  721. .icon_sc_close{
  722. width: 30rpx;
  723. height: 30rpx;
  724. margin-left: auto;
  725. }
  726. }
  727. }
  728. .btnBox{
  729. color: #fff;
  730. background: #009FE8;
  731. line-height: 84rpx;
  732. border-radius: 6rpx;
  733. text-align: center;
  734. margin-top: 60rpx;
  735. }
  736. .tipBtn{
  737. font-size: 24rpx;
  738. color: #FF0000;
  739. text-align: center;
  740. margin-top: 20rpx;
  741. }
  742. }
  743. .showZihao{
  744. .ziTitle{
  745. display: flex;
  746. align-items: center;
  747. height: 100rpx;
  748. padding: 0 30rpx;
  749. .icon_tc_close{
  750. width: 30rpx;
  751. height: 30rpx;
  752. }
  753. .text{
  754. flex: 1;
  755. text-align: center;
  756. margin: 0 30rpx;
  757. font-size: 30rpx;
  758. font-weight: 700;
  759. }
  760. }
  761. .btn{
  762. font-size: 28rpx;
  763. background: #009FE8;
  764. color: #fff;
  765. text-align: center;
  766. line-height: 80rpx;
  767. border-radius: 10rpx;
  768. margin: 30rpx;
  769. }
  770. .itemBox{
  771. .item{
  772. display: flex;
  773. align-items: center;
  774. padding: 30rpx 30rpx 0 30rpx;
  775. .ld{
  776. width: 14rpx;
  777. height: 14rpx;
  778. background: #009FE8;
  779. border-radius: 100%;
  780. }
  781. .text{
  782. flex: 1;
  783. font-size: 26rpx;
  784. margin-left: 30rpx;
  785. line-height: 33rpx;
  786. }
  787. .active{
  788. color: #009FE8;
  789. }
  790. }
  791. }
  792. }
  793. </style>