| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706 |
- <template>
- <page-meta :root-font-size="getFontSizeValue"></page-meta>
- <view class="wrapper">
- <view class="form">
- <!-- 基础表单校验 -->
- <uni-forms ref="valiForm" :rules="rules" :modelValue="valiFormData">
- <uni-forms-item label="工单类别" required name="WorkOrderCategory">
- <order-select :orderType="valiFormData.WorkOrderCategory" @post-select-data="postSelectData"
- :typeid="2000" :readonly="readonly"></order-select>
- </uni-forms-item>
- <uni-forms-item label="申请科室" required name="ApplicationDept">
- <uni-data-picker :readonly="true" placeholder="请选择申请科室" :localdata="deptDataTree"
- v-model="valiFormData.ApplicationDept" @nodeclick="deptNodeclick" :showSearch="showSearch" @popupclosed="popupclosedDept" @searchTrue="departSearchTrue">
- </uni-data-picker>
- </uni-forms-item>
- <uni-forms-item label="科室电话" required name="DeptPhone">
- <uni-easyinput v-model="valiFormData.DeptPhone" placeholder="请输入联系电话" />
- </uni-forms-item>
- <uni-forms-item label="申请人" required name="ApplicantName">
- <uni-combox :candidates="candidates" placeholder="输入搜索内容" @input="handleInput" v-model="valiFormData.ApplicantName"></uni-combox>
- </uni-forms-item>
-
- <uni-forms-item label="联系电话" required name="Phone">
- <uni-easyinput v-model="valiFormData.Phone" placeholder="请输入联系电话" />
- </uni-forms-item>
- <uni-forms-item label="科室位置" required name="Location">
- <uni-easyinput v-model="valiFormData.Location" placeholder="请输入科室位置" />
- </uni-forms-item>
- <view style="margin: 15px 0;" v-show="valiFormData.WorkOrderCategory && flag[flaginfo]">
- <view style="margin-bottom: 15px;">
- <text class="infoTittle"><text v-show="flaginfo==='2001' || flaginfo==='2003'|| flaginfo==='127548'|| flaginfo==='10617' || flaginfo==='9129'|| flaginfo==='9130' || flaginfo==='2007'" style="color: red;">*</text>{{flagName[flaginfo]}}</text>
- <uni-icons type="plus" size="30" color="#007aff" @click="plusClck()"></uni-icons>
- <uni-icons type="minus" size="30" color="#007aff" @click="minusClck()"></uni-icons>
- </view>
- <view style="width: 100%;height: 85px;" v-for="(item, index) in dicList">
- <view class="dicSelect" v-if="identification==='JC' || identification==='FJ'">
- <uni-data-picker class="uni_item" placeholder="请选择标本信息" :localdata="dataOrderType" @nodeclick="(e)=>nodeclickMuter(e,index)">
- </uni-data-picker>
- </view>
- <view style="margin-bottom: 2px;width: 100%;" v-if="identification==='2007'">
- <uni-data-picker placeholder="请选择科室" v-model="item.F_ToDept" :showSearch="showSearch" :localdata="deptDataTree" @nodeclick="(e)=>nodeclickDept(e,index)">
- </uni-data-picker>
- </view>
- <view v-if="identification!=='JC' && identification!=='FJ'" class="dicSelect">
- <dictionaries-select v-if="identification!=='2007'" :flag="flag[flaginfo]" :valInfo="index" :val="item.F_DicId + ','+ item.F_DicName"
- @post-select-dic="postSelectDic"></dictionaries-select>
- <luyj-select-lay v-if="identification==='2007'" lay-omit name="name" :options="bloodList" :zindex="1" slabel='text' @selectitem="(e)=>selectitem(e,index)">
- </luyj-select-lay>
- </view>
- <view class="dicNum">
- <uni-number-box v-model="item.F_Number" />
- </view>
- <view style="display: block;width: 100%;text-align: center;" v-if="identification === '2001' || identification === '2003'|| identification === 'YQT'">
- <uni-data-checkbox v-model="item.F_IsBorrow" :localdata="F_IsBorrowTypesList" />
- </view>
- </view>
- </view>
- <!-- <uni-forms-item label="送达地点" required name="ToPlace">
- <dictionaries-select flag="SDKS" @post-select-dic="postSelectDicPlace" v-if="identification === '2006' || identification === 'JC' || identification === 'FJ'"></dictionaries-select>
- <uni-easyinput v-model="valiFormData.ToPlace" placeholder="请输入送达地点" v-else/>
- </uni-forms-item> -->
- <uni-forms-item label="备注" name="Content">
- <uni-easyinput type="textarea" v-model="valiFormData.Content" placeholder="请输入备注" />
- </uni-forms-item>
- <uni-forms-item label="红处方数量" required name="redPrescriptionNum" v-show="flaginfo == '2004' ">
- <uni-number-box v-model="redPrescriptionNum" />
- </uni-forms-item>
- <!-- <uni-forms-item label="紧急程度" name="EmergencyTypes">
- <uni-data-checkbox v-model="valiFormData.EmergencyTypes" :localdata="EmergencyTypesList" />
- </uni-forms-item> -->
- <uni-forms-item label="附件" name="">
- <view class="example-body">
- <!-- <upload @post-string-data="getImgData" :imgUrlList="imgUrlList"></upload> -->
- <l-file ref="lFile" :logo="logo" @up-success="onSuccess"></l-file>
- <view class="padding" style="margin-top: 10px;">
- <button class="mini-btn" type="primary" size="mini" @tap="onUpload">上传</button>
- </view>
- <view class="padding">
- <uni-file-picker limit="5" file-mediatype="all" :value="fileLists" @delete="deleteFile"></uni-file-picker>
- </view>
- </view>
- </uni-forms-item>
- </uni-forms>
- <view class="btnClass">
- <button type="primary" :disabled="disabledButton" @click="submit('valiForm')">提交工单</button>
- </view>
- </view>
- </view>
- </template>
- <script>
- import orderSelect from "@/pages/components/orderSelect/orderSelect"
- import indexConfig from '@/config/index.config';
- import {
- filterTreeDatas,
- filterSelectData
- } from '@/utils/dataTreating.js'
- import pageData from "@/pages/myTask/repairList/addRepair/pageData.js"
- import upload from '@/pages/components/upload/upload.vue' //upload
- import uploadFile from '@/pages/components/upload/uploadFile.vue' //upload
- import newfile from '@/pages/components/upload-imagesAndvideo/index.vue' //upload
- import dictionariesSelect from '@/pages/components/dictionariesSelect/dictionariesSelect.vue' //upload
- export default {
- components: {
- upload,
- uploadFile,
- newfile,
- orderSelect,
- dictionariesSelect
- },
- data() {
- return {
- bloodList:[],
- dataOrderType:[],
- identification: '', // 工单标识
- getFontSizeValue:'1rem',
- showSearch: true,
- logo: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fbpic.588ku.com%2Felement_origin_min_pic%2F00%2F00%2F07%2F155788a6d8a5c42.jpg&refer=http%3A%2F%2Fbpic.588ku.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1619847627&t=2da40b583002205c204d980b54b35040',
- isShowIsEnd: false,
- readonly: false,
- disabledButton: false,
- // 校验表单数据
- valiFormData: {
- WorkOrderCategory: '', //工单类别
- ApplicationDept: '', //申请部门
- Applicant: '', //申请人
- ApplicantName: '',
- Phone: '', //联系电话
- Location: '', // 科室位置
- DeptPhone:'',
- ToPlace: '', // 送达地点
- Content: '', // 工单内容
- DealDept: '', // 维修部门
- DealMan: '', // 维修人
- File: '', // 文件
- opt: 2,
- EmergencyTypes: '',
- },
- F_IsBorrowTypesList:[{
- text: '借',
- value: '1'
- },{
- text: '还',
- value: '2'
- }],
- EmergencyTypesList: [{
- text: '一般',
- value: '一般'
- },{
- text: '紧急',
- value: '紧急'
- }],
- changeindex:"",
- changedept:"",
- departId:0,
- redPrescriptionNum: 0, // 红处方数量
- workorderid: '',
- stepData: pageData.stepData,
- departMain: '',
- imgUrlList: [], // 附件数据
- imgIdList: [], //上传附件id
- clickImgState: 0, // 图片回显的状态
- departList: [],
- deptDataTree: [], // 科室-部门数据
- ApplicantData: [], // 获取人员数据
- assignedDepartData: [], //指派部门数据
- MaintenancerData: [], //指派人数据
- orderApplicantData: [], // 用户人员信息
- userListSelect: [],
- typeid: 0,
- candidates: [],
- // 标本信息(BBXX),设备信息(SBXX),物资信息(WZXX),病床信息(BCXX),药品信息(YPXX)
- flagid: ["2001","2002","2003","2006","2005","9014","9129","9130",'2007',"127548","10617"],
- flaginfo: '',
- fileLists: [],
- flag: {
- "2006": 'BBXX',
- "2001": 'SBXX',
- "2002": 'WZXX',
- "2003": 'BCXX',
- "2005": 'YPXX',
- "9014": 'YPXX',
- "9129": 'BBXX',
- "9130": 'BBXX',
- "2007": 'XYLX',
- "127548": 'YQT',
- "10617": 'YQT',
- },
- flagName: {
- "2001": '设备信息',
- "2002": '物资信息',
- "2003": '病床信息',
- "2006": '标本信息',
- "2005": '药品信息',
- "9014": '药品信息',
- "9129": '标本信息',
- "9130": '标本信息',
- "2007": '送达科室',
- "127548": '设备信息',
- "10617": '设备信息',
- },
- dicList: [{
- F_DicId: 0,
- F_DicName: '',
- F_Number: 0,
- F_IsBorrow: '',
- F_ToDept: '',
- }],
- // 校验规则
- rules: {
- WorkOrderCategory: {
- rules: [{
- required: true,
- errorMessage: '请选择工单类别'
- }]
- },
- ApplicationDept: {
- rules: [{
- required: true,
- errorMessage: '请选择申请科室'
- }]
- },
- ApplicantName: {
- rules: [{
- required: true,
- errorMessage: '请选择申请人'
- }]
- },
- Phone: {
- rules: [{
- required: true,
- errorMessage: '清输入联系电话'
- }]
- },
- // Content: {
- // rules: [{
- // required: true,
- // errorMessage: '清输入工单内容'
- // }]
- // }
- },
- }
- },
- onLoad(option) {
- this.getFontSizeValue = uni.getStorageSync('fontSizeValue')+'rem'
- this.workorderid = option.wid
- // 添加工单,申请人默认当前登录人
- if(uni.getStorageSync("deptId")){
- this.valiFormData.ApplicationDept = uni.getStorageSync("deptId")
- this.getDeptLocation(uni.getStorageSync("deptId"))
- pageData.getApplicant(uni.getStorageSync("deptId"), (res, data, candidates) => {
- this.candidates = candidates
- this.ApplicantData = res
- this.orderApplicantData = data
- if(uni.getStorageSync("userCode")) {
- this.valiFormData.Applicant = uni.getStorageSync("userCode")
- this.valiFormData.ApplicantName = this.$mHelper.findUserName(this.ApplicantData, uni.getStorageSync("userCode"))
- const user = this.orderApplicantData.find((o) => {
- return o.usercode === this.valiFormData.Applicant.toString()
- })
- if (user) {
- this.valiFormData.Phone = user.usertelphone
- }
- this.getLocation(this.valiFormData.Applicant)
- }
- })
- }
- // 部门数据
- pageData.getDet((res, data) => {
- console.log(res)
- this.departList = data
- this.deptDataTree = res
- this.assignedDepartData = res
- })
- if(this.workorderid) {
- this.readonly = true
- this.getDetail()
- }
- window.scrollTo(0,0)
- this.getDicValueList()
- },
- watch: {
- 'departList': function() {
- this.valiFormData.ApplicationDept = this.$mHelper.findParents(this.departList,this.valiFormData.ApplicationDept).split('/').length + '_'+ this.valiFormData.ApplicationDept
- }
- },
- methods: {
- getDicValueList() {
- const params = {
- Flag: 'XYLX',
- Name: ''
- }
- this.$http.get("Dictionary/GetDicValueList",params).then((response)=>{
- let newData = []
- response.rows.forEach((element, index) => {
- const obj = {}
- obj.value = element.F_DictionaryValueId + ',' + element.F_Name
- obj.text = element.F_Name
- newData.push(obj)
- });
- this.bloodList = newData;
- // if(this.val) {
- // this.id = this.val
- // }
- })
- },
- selectitem(val,index) {
- var namestr = ''
- var idstr = ''
- if (val) {
- for(var i=0;i<val.length;i++){
- namestr += val[i].value.split(',')[1]+','
- idstr += val[i].value.split(',')[0]+','
- }
- this.dicList[index].F_DicId = idstr.slice(0,namestr.length-1)
- this.dicList[index].F_DicName = namestr.slice(0,namestr.length-1)
- }
-
- },
- getBBxx(){
- let str
- if(this.identification == 'JC'){
- str = '急查标本'
- }
- if(this.identification == 'FJ'){
- str = '非急查标本'
- }
- pageData.getBB(str,(res, data) => {
- this.dataOrderType = res
- })
- },
- nodeclickMuter(e,index){
- this.dicList[index].F_DicId = e.value
- this.dicList[index].F_DicName = e.text
- },
- nodeclickDept(e,index){
- this.dicList[index].F_ToDept = e.value
- // if(e.zIndex==0){
- // this.changedept = ""
- // this.changeindex = ""
- // this.dicList[index].F_ToDept = ""
- // }else{
- // this.changedept = e.value
- // this.changeindex = index
- // this.dicList[index].F_ToDept = e.value
- // }
- },
- // 获取科室位置
- postSelectDicPlace(res) {
- this.valiFormData.ToPlace = res.split(',')[1]
- },
- // 删除附件
- deleteFile(res) {
- const num = this.fileLists.findIndex(v => v.url === res.tempFile.path);
- this.fileLists.splice(num, 1)
- },
- /* 附件上传 */
- onUpload() {
- this.$refs.lFile.upload({
- //替换为你的上传接口地址
- url: indexConfig.baseUrl + "/FaultRepair/UploadFile",
- // 服务端接收附件的key
- name: 'file',
- //根据你接口需求自定义 (优先不传content-type,安卓端无法收到参数再传)
- header: {
- Authorization: uni.getStorageSync('Admin-Token')
- },
- })
- },
- // 附件上传
- onSuccess(res) {
- res.data.data.forEach(v => {
- this.fileLists.push({
- url: indexConfig.baseUrl + v.F_FileUrl,
- extname: v.F_FileType,
- name: v.F_FileName.substring(19),
- id: v.F_FileId
- })
- })
- },
- postImgData(res) {
- },
- // 工单类别
- postSelectData(e,id,type,ident) {
- console.log(e,ident)
- this.identification = ident
- this.flaginfo = String(id)
- this.valiFormData.WorkOrderCategory = e
- if(this.flagid.indexOf(this.flaginfo) > -1) {
- this.dicList = [{
- F_DicId: 0,
- F_DicName: '',
- F_Number: 0
- }]
- }else{
- this.dicList = 0
- }
- this.getBBxx()
- },
- // 综合调度信息
- postSelectDic(e, index) {
- console.log(e,'888999')
- this.dicList[index].F_DicId = e.split(',')[0]
- this.dicList[index].F_DicName = e.split(',')[1]
- },
- plusClck() {
- const params = {
- F_DicId: 0,
- F_DicName: '',
- F_Number: 0,
- F_ToDept:""
- }
- this.dicList.push(params)
- },
- minusClck() {
- this.dicList.splice(this.dicList.length - 1, 1)
- },
- clearTagAdmin(value){
- this.userListSelect = this.userListSelect.filter(item => item != value);
- },
- // 申请部门
- deptNodeclick(e) {
- if (e) {
- this.departId = e.value
- pageData.getApplicant(e.value.split('_')[1], (res, data, candidates) => {
- this.candidates = candidates
- console.log(this.candidates)
- this.ApplicantData = res
- this.orderApplicantData = data
- })
- this.candidates = []
- this.valiFormData.Applicant = ''
- this.valiFormData.ApplicantName = ''
- this.valiFormData.Phone = ''
- this.valiFormData.Location = ''
- this.valiFormData.ToPlace = ''
- this.valiFormData.DeptPhone = ''
- this.getDeptLocation(e.value.split('_')[1])
- }
- },
- departSearchTrue(e){
- this.valiFormData.ApplicationDept = e.value
- },
- popupclosedDept(e) {
- this.valiFormData.ApplicationDept = this.departId
- },
- // popupclosedDeptww(e){
- // if(this.changeindex){
- // const index = this.changeindex
- // console.log(index,this.changedept)
- // this.dicList[index].F_ToDept = this.changedept
- // }
- // },
- //科室位置
- getDeptLocation(id){
- this.$http.get("Department/GetModel", {deptid:id}).then((response) => {
- if (response.state.toLowerCase() === "success") {
- this.valiFormData.Location = response.data.F_Location
- this.valiFormData.ToPlace = response.data.F_Location
- this.valiFormData.DeptPhone = response.data.F_OfficeTelephone
- }
- })
- },
- handleInput(res) {
- let e = this.$mHelper.getValueByText(res,this.ApplicantData)
- this.valiFormData.Applicant = e
- this.valiFormData.ApplicantName = res
- const user = this.orderApplicantData.find((o) => {
- return o.usercode === e.toString()
- })
- if (user) {
- this.valiFormData.Phone = user.usertelphone
- }
- this.getLocation(this.valiFormData.Applicant)
- },
- // 地址
- getLocation(user) {
- this.$http.get("UserAccount/GetModel", {usercode: user}).then((response) => {
- if (response.state.toLowerCase() === "success") {
- this.valiFormData.Location = response.data.F_Location
- this.valiFormData.ToPlace = response.data.F_Location
- }
- })
- },
- // 指派部门
- maintenanceNodeclick(e) {
- if(e) {
- this.departMain = e.value
- pageData.getApplicant(e.value, (res) => {
- this.MaintenancerData = res
- })
- }
- },
- maintenanceclosed() {
- this.valiFormData.DealDept = this.departMain
- },
- //指派人
- changeMaintenancer(e) {
- this.valiFormData.DealMan = e
- },
- // 工单提交
- submit(ref) {
- // console.log(this.dicList)
- // return
- if(this.identification === '2001' || this.identification === '2003' || this.identification === 'YQT'|| this.identification === 'JC' || this.identification === 'FJ' || this.identification === '2007'){
- if(this.dicList.length == 0 || (this.dicList.length>0 && !this.dicList[0].F_DicName)){
- this.$mHelper.toast('请选择对应物资信息')
- return
- }
- }
- if(this.identification === '2001' || this.identification === '2003'|| this.identification === 'YQT'){
- const index = this.dicList.findIndex((o) => {
- return !o.F_IsBorrow || !o.F_DicName || !o.F_Number;
- });
- if (index >= 0) {
- this.$mHelper.toast('请选择对应物资信息')
- return;
- }
- }
- if(this.identification === '2007'){
- const index = this.dicList.findIndex((o) => {
- return !o.F_ToDept || !o.F_DicName || !o.F_Number;
- });
- if (index >= 0) {
- this.$mHelper.toast('请选择对应物资信息')
- return;
- }
- }
- if(this.identification === 'JC'||this.identification === 'FJ'){
- const index = this.dicList.findIndex((o) => {
- return !o.F_DicName || !o.F_Number;
- });
- if (index >= 0) {
- this.$mHelper.toast('请选择对应物资信息')
- return;
- }
- }
- if(this.dicList.length == 0 || (this.dicList.length>0 && !this.dicList[0].F_DicName)){
- this.dicList = null
- }
- this.imgIdList = []
- this.disabledButton = true
- this.fileLists.forEach(v =>{
- this.imgIdList.push(v.id)
- })
- for(var i=0;i<this.dicList.length;i++){
- if(this.dicList[i].F_ToDept){
- this.dicList[i].F_ToDept = this.dicList[i].F_ToDept.split('_')[1]
- }
- }
- this.$refs[ref].validate().then(res => {
- const params = {
- WorkOrderCategory: this.valiFormData.WorkOrderCategory, //工单类别
- ApplicationDept: this.valiFormData.ApplicationDept.split('_')[1], //申请部门
- Applicant: this.valiFormData.Applicant, //申请人
- Phone: this.valiFormData.Phone, //联系电话
- Location: this.valiFormData.Location, // 科室位置
- DeptPhone:this.valiFormData.DeptPhone,
- // ToPlace: this.valiFormData.ToPlace, // 送达地点
- Content: this.valiFormData.Content, // 工单内容
- DealDept: this.valiFormData.DealDept, // 维修部门
- DealMan: this.valiFormData.DealMan, // 维修人
- File: this.$mHelper.getImgString(this.imgIdList), // 文件
- detailists: this.dicList,
- opt: this.valiFormData.opt,
- // EmergencyTypes: this.valiFormData.EmergencyTypes,
- cfnum: this.redPrescriptionNum
- }
- if(this.workorderid) {
- params.WorkOrderCode = this.workorderid
- params.usertype = 1
- this.$mHelper.httpPost("Scheduling/UpdateSchedulingWorkOrder", this.serialize(params), 1, res => this.disabledButton = res)
- }else{
- this.$mHelper.httpPost("Scheduling/AddSchedulingWorkOrder", this.serialize(params), 1, res => this.disabledButton = res)
- }
- }).catch(err => {
- this.disabledButton = false
- console.log('err', err);
- })
- },
- serialize(obj, prefix) {
- const str = []
- let p
- if (obj.length === 0) {
- // str.push(encodeURIComponent(prefix) + '=1')
- } else {
- for (p in obj) {
- if (obj.hasOwnProperty(p)) {
- const k = prefix ? prefix + '[' + p + ']' : p
- let v = obj[p]
- if (v instanceof Date) {
- v = parseTime(v)
- }
- str.push((v !== null && typeof v === 'object') ? this.serialize(v, k) : encodeURIComponent(k) +'=' + encodeURIComponent(v))
- }
- }
- }
- return str.join('&')
- },
- getDetail() {
- const params = {
- WorkOrderCode: this.workorderid,
- type: 0
- }
- this.$http.get("Scheduling/GetWorkOrder", params).then((response) => {
- if (response.state.toLowerCase() === "success") {
- this.valiFormData.WorkOrderCategory = response.data[0].F_WorkOrderCategory // 工单类别
- this.valiFormData.Content = response.data[0].F_Content // 工单内容
- if(response.data[0].F_ApplicationDept) {
- this.valiFormData.ApplicationDept = response.data[0].F_ApplicationDept.trim() // 申请部门
- pageData.getApplicant(this.valiFormData.ApplicationDept, (res) => {
- this.ApplicantData = res
- })
- this.valiFormData.ApplicantName = this.$mHelper.findUserName(this.ApplicantData, response.data[0].F_Applicant)
- this.valiFormData.Applicant = response.data[0].F_Applicant //申请人
- }
- this.valiFormData.Phone = response.data[0].F_Phone // 联系电话
- this.valiFormData.DeptPhone = response.data[0].F_DeptPhone
- this.valiFormData.Location = response.data[0].F_Location
- // this.valiFormData.ToPlace = response.data[0].F_ToPlace
- this.valiFormData.File = response.data[0].F_File
- // this.valiFormData.EmergencyTypes = response.data[0].F_EmergencyTypes
- const ps = []
- response.data[0].PSInfo.forEach(v => {
- ps.push({
- F_DicId: v.F_DicId,
- F_DicName: v.F_DicName,
- F_Number: v.F_Number
- })
- })
- this.dicList = ps
- if (response.data[0].FileUrl) {
- response.data[0].FileUrl.forEach((v, n) => {
- //详情图片回显
- this.fileLists.push({
- url: v.F_FileUrl,
- extname: v.F_FileType,
- name: v.F_FileName.substring(19),
- id:v.F_FileId
- })
- })
- }
- }
- }).catch((e) => {
- console.log(e);
- })
- },
- // 上传图片
- getImgData(data) {
- this.clickImgState = 1
- this.imgIdList = data
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- @import '@/common/addFormDeep.scss';
-
- .wrapper {
- padding: 10px 15px;
- background-color: #fff;
- .form {
- .infoTittle {
- align-items: center;
- text-align: left;
- font-size: 14px;
- color: #606266;
- height: 36px;
- padding: 0 12px 0 0;
- vertical-align: middle;
- flex-shrink: 0;
- // box-sizing: border-box;
- margin-right: 10px;
- }
- .dicSelect {
- width: 65%;
- display: inline-block;
- margin-right: 10px;
- margin-bottom: 15px;
- }
- .dicNum {
- width: 30%;
- display: inline-block;
- }
- /deep/.uni-icons[data-v-a2e81f6e] {
- vertical-align: middle;
- }
- .point {
- color: #f00;
- vertical-align: middle;
- margin-right: 2px;
- }
- }
- }
- </style>
|