0801
This commit is contained in:
parent
0a645b2f3a
commit
ad71e379a9
|
@ -12,11 +12,11 @@
|
|||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="FileEditorManager">
|
||||
<leaf>
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/App.vue">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="6">
|
||||
<state relative-caret-position="960">
|
||||
<caret line="32" column="46" selection-start-line="32" selection-start-column="46" selection-end-line="32" selection-end-column="46" />
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/store/index.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1020">
|
||||
<state relative-caret-position="990">
|
||||
<caret line="34" column="67" selection-start-line="34" selection-start-column="67" selection-end-line="34" selection-end-column="67" />
|
||||
<folding>
|
||||
<element signature="e#0#21#0" expanded="true" />
|
||||
|
@ -37,12 +37,8 @@
|
|||
<file pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/pages/my/my_.vue">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="690">
|
||||
<state relative-caret-position="1050">
|
||||
<caret line="41" column="83" selection-start-line="41" selection-start-column="83" selection-end-line="41" selection-end-column="83" />
|
||||
<folding>
|
||||
<element signature="e#3837#4097#0" />
|
||||
<element signature="e#4110#8160#0" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -50,12 +46,10 @@
|
|||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/pages/my/my.vue">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="540">
|
||||
<state relative-caret-position="690">
|
||||
<caret line="23" column="78" selection-start-line="23" selection-start-column="77" selection-end-line="23" selection-end-column="78" />
|
||||
<folding>
|
||||
<element signature="n#style#0;n#view#0;n#view#1;n#view#0;n#view#1;n#view#0;n#template#0;n#!!top" expanded="true" />
|
||||
<element signature="e#3841#4101#0" />
|
||||
<element signature="e#4114#8164#0" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -92,7 +86,6 @@
|
|||
<foldersAlwaysOnTop value="true" />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="Scope" />
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
<expand>
|
||||
|
@ -120,11 +113,12 @@
|
|||
<select />
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="Scope" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/../ehs_web" />
|
||||
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
|
||||
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
|
||||
</component>
|
||||
|
@ -151,23 +145,20 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1658992730309</updated>
|
||||
<workItem from="1658992731466" duration="2219000" />
|
||||
<workItem from="1659061865638" duration="593000" />
|
||||
<workItem from="1659314745160" duration="18000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="2219000" />
|
||||
<option name="totallyTimeSpent" value="2830000" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="-2231" y="53" width="2139" height="1390" extended-state="0" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info id="Favorites" side_tool="true" />
|
||||
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24988101" />
|
||||
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Docker" show_stripe_button="false" />
|
||||
<window_info anchor="bottom" id="Version Control" />
|
||||
<window_info anchor="bottom" id="Terminal" />
|
||||
<window_info anchor="bottom" id="Event Log" side_tool="true" />
|
||||
<window_info id="Favorites" order="2" side_tool="true" />
|
||||
<window_info anchor="bottom" id="Message" order="0" />
|
||||
<window_info anchor="bottom" id="Find" order="1" />
|
||||
<window_info anchor="bottom" id="Run" order="2" />
|
||||
|
@ -175,6 +166,10 @@
|
|||
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
||||
<window_info anchor="bottom" id="TODO" order="6" />
|
||||
<window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
|
||||
<window_info anchor="bottom" id="Version Control" order="8" />
|
||||
<window_info anchor="bottom" id="Terminal" order="9" />
|
||||
<window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
|
||||
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
|
||||
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
||||
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
|
||||
|
@ -186,14 +181,14 @@
|
|||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/App.vue">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="6">
|
||||
<state relative-caret-position="960">
|
||||
<caret line="32" column="46" selection-start-line="32" selection-start-column="46" selection-end-line="32" selection-end-column="46" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/store/index.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1020">
|
||||
<state relative-caret-position="990">
|
||||
<caret line="34" column="67" selection-start-line="34" selection-start-column="67" selection-end-line="34" selection-end-column="67" />
|
||||
<folding>
|
||||
<element signature="e#0#21#0" expanded="true" />
|
||||
|
@ -203,24 +198,18 @@
|
|||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/pages/my/my.vue">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="540">
|
||||
<state relative-caret-position="690">
|
||||
<caret line="23" column="78" selection-start-line="23" selection-start-column="77" selection-end-line="23" selection-end-column="78" />
|
||||
<folding>
|
||||
<element signature="n#style#0;n#view#0;n#view#1;n#view#0;n#view#1;n#view#0;n#template#0;n#!!top" expanded="true" />
|
||||
<element signature="e#3841#4101#0" />
|
||||
<element signature="e#4114#8164#0" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/pages/my/my_.vue">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="690">
|
||||
<state relative-caret-position="1050">
|
||||
<caret line="41" column="83" selection-start-line="41" selection-start-column="83" selection-end-line="41" selection-end-column="83" />
|
||||
<folding>
|
||||
<element signature="e#3837#4097#0" />
|
||||
<element signature="e#4110#8160#0" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
|
|
@ -26,10 +26,25 @@ const install = (Vue, vm) => {
|
|||
|
||||
let unbindmp = (data = {}) => vm.$u.post('/system/user/unbind_wxmp/', data); //微信小程序解绑
|
||||
let getDickey = (params={})=>vm.$u.get('/system/dict/', params);//查询字典
|
||||
let userList = (params={})=>vm.$u.get('/system/user/', params);//
|
||||
let deptList = (params={})=>vm.$u.get('/system/dept/', params);//
|
||||
let getTickets = (params={})=>vm.$u.get('/wf/ticket/', params);//工单查询/wf/ticket/{id}/
|
||||
let getTicketItem = (id)=>vm.$u.get(`/wf/ticket/${id}/`);//工单详情
|
||||
let getTicketTransitions = (id)=>vm.$u.get(`/wf/ticket/${id}/transitions/`);//工单按钮查询
|
||||
|
||||
let addNode = (id,data={})=>vm.$u.get(`/wf/ticket/${id}/add_node/`,data);//加签
|
||||
let addNodeEnd = (id,data={})=>vm.$u.get(`/wf/ticket/${id}/add_node_end/`,data);//加签处理
|
||||
let deliver = (id,data={})=>vm.$u.get(`/wf/ticket/${id}/deliver/`,data);//转交工单
|
||||
let ticketHandle = (id,data={})=>vm.$u.get(`/wf/ticket/${id}/handle/`,data);//工单处理
|
||||
|
||||
|
||||
let operationCreat = (data = {}) => vm.$u.post('/opm/operation/', data);//作业
|
||||
|
||||
let areaLists = (data = {}) => vm.$u.get('/am/area/', data);//作业区域
|
||||
|
||||
let getVisit = (id)=>vm.$u.get(`/vm/visit/${id}/`);//visit查询
|
||||
let vmVisitor = (data={})=>vm.$u.get(`/vm/visitor/`,data);//visit查询
|
||||
let addVisitor = (data={})=>vm.$u.post(`vm/visitor/`,data);//visitor添加
|
||||
|
||||
let getRpj = (id)=>vm.$u.get(`/rpm/rpj/${id}`);//rpj查询
|
||||
let getOpreation = (id)=>vm.$u.get(`/opm/operation/${id}/`);//rpj查询
|
||||
|
@ -43,14 +58,21 @@ const install = (Vue, vm) => {
|
|||
wxmplogin,
|
||||
bindmp,
|
||||
unbindmp,
|
||||
userList,
|
||||
deptList,
|
||||
getDickey,
|
||||
getTickets,
|
||||
getTicketItem,
|
||||
getTicketTransitions,
|
||||
getVisit,
|
||||
vmVisitor,
|
||||
addVisitor,
|
||||
getRpj,
|
||||
getOpreation,
|
||||
getOpl
|
||||
getOpl,
|
||||
|
||||
operationCreat,
|
||||
areaLists
|
||||
};
|
||||
}
|
||||
|
||||
|
|
22
pages.json
22
pages.json
|
@ -16,6 +16,12 @@
|
|||
"navigationBarTitleText": "密码登录",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},{
|
||||
"path": "pages/login/userRegister",
|
||||
"style": {
|
||||
"navigationBarTitleText": "新用户注册",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/login/login",
|
||||
|
@ -109,6 +115,22 @@
|
|||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/newWork/userList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "选择人员",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/newWork/addUser",
|
||||
"style": {
|
||||
"navigationBarTitleText": "添加人员",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/list/opreation",
|
||||
"style": {
|
||||
|
|
|
@ -3,29 +3,103 @@
|
|||
<uni-nav-bar @clickLeft="goBack()" class="nav-bar" height="110rpx" leftWidth="200rpx" leftText="加签"
|
||||
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
<view class="ticket-info">
|
||||
<view class="form-item border-bottom" v-if="ticketType === 'add'">
|
||||
<view class="form-left">
|
||||
<text class="star">*</text>
|
||||
<text class="form-left-text">加签给</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-select v-model="toadd_user" :localdata="range" label="加签给">
|
||||
</uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom" v-else>
|
||||
<view class="form-left">
|
||||
<text class="star">*</text>
|
||||
<text class="form-left-text">转交给</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-select v-model="target_user" :localdata="range" label="转交给">
|
||||
</uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" style="height: 300rpx;">
|
||||
<view class="form-left-text">
|
||||
<text class="star">*</text>
|
||||
<text>加签原因</text>
|
||||
<text>{{labelText}}</text>
|
||||
</view>
|
||||
<textarea class="apply-reason-text" v-model="form.name" maxlength="250" placeholder="请输入" />
|
||||
</view>
|
||||
<view class="btn" style="display: flex;justify-content: space-between;">
|
||||
<button class="handleBtn" type="primary" @click="addNode">提交</button>
|
||||
<button class="handleBtn" type="primary" @click="handleClick">提交</button>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "addNode",
|
||||
data() {
|
||||
return {
|
||||
ticketId: "",
|
||||
ticketType: "",
|
||||
labelText: '加签原因',
|
||||
form:{
|
||||
suggestion:'',
|
||||
},
|
||||
toadd_user:'',
|
||||
target_user:'',
|
||||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
// debugger;
|
||||
console.log(params)
|
||||
this.ticketId = params.ticketId;
|
||||
this.ticketType = params.type;
|
||||
},
|
||||
onShow() {
|
||||
if (this.ticketType === 'add') {
|
||||
this.labelText = '加签原因'
|
||||
} else {
|
||||
this.labelText = '转交原因'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
handleClick(){
|
||||
if (this.ticketType === 'add') {
|
||||
this.form.toadd_user = this.toadd_user;
|
||||
this.$u.api.getTicketItem(this.form).then((res) => {
|
||||
this.ticketDetail = res;
|
||||
});
|
||||
} else {
|
||||
this.form.target_user = this.target_user;
|
||||
this.$u.api.getTicketItem(this.form).then((res) => {
|
||||
this.ticketDetail = res;
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* 主体 */
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar {
|
||||
background-image: linear-gradient(90deg, #164cc3 0%, #2c6fd9 100%), linear-gradient(#e60012, #e60012) !important;
|
||||
}
|
||||
.ticket-handle {
|
||||
background-color: #f3fbff;
|
||||
padding-bottom: 227rpx;
|
||||
}
|
||||
|
||||
.ticket-info {
|
||||
width: 720rpx;
|
||||
margin: 0 auto;
|
||||
|
@ -35,7 +109,47 @@
|
|||
box-sizing: border-box;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
.form-item {
|
||||
/* display: flex; */
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 16px;
|
||||
min-height: 160rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
.form-left {
|
||||
/* min-width: 160rpx; */
|
||||
width: 100%;
|
||||
}
|
||||
.form-left-text {
|
||||
color: #212121;
|
||||
margin-bottom: 13rpx;
|
||||
}
|
||||
.form-right {
|
||||
margin-left: 20rpx;
|
||||
flex: 1;
|
||||
color: #414141;
|
||||
}
|
||||
.star {
|
||||
color: red;
|
||||
}
|
||||
.apply-reason-text {
|
||||
width: 653rpx;
|
||||
height: 179rpx;
|
||||
background-color: #f6f8fc;
|
||||
border: solid 1rpx #e5e5e5;
|
||||
padding: 14rpx 24rpx;
|
||||
font-size: 26rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.border-bottom {
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.fixed-assets-list .ticket-info {
|
||||
padding-top: 0rpx;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
@ -364,7 +364,21 @@
|
|||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="ticket-info">
|
||||
<view class="ticket-info" v-if="type==='handle'">
|
||||
<view class="form-item" v-if="ticketDetail.state_&&ticketDetail.state_.key==='opl_close'">
|
||||
<view class="form-left-text" style="width: 100%;">
|
||||
<text class="star">*</text>
|
||||
<text>作业情况</text>
|
||||
</view>
|
||||
<uni-data-select v-model="form.close_note" :localdata="noteOption" label="选择关闭原因"></uni-data-select>
|
||||
</view>
|
||||
<view class="form-item" v-if="ticketDetail.state_&&ticketDetail.state_.key==='opl_close'">
|
||||
<view class="form-left-text">
|
||||
<text class="star">*</text>
|
||||
<text>关闭处理</text>
|
||||
</view>
|
||||
<uni-data-select v-model="form.close_dos" :localdata="dosOption" label="关闭处理"></uni-data-select>
|
||||
</view>
|
||||
<view class="form-item" style="height: 300rpx;">
|
||||
<view class="form-left-text">
|
||||
<text class="star">*</text>
|
||||
|
@ -372,20 +386,19 @@
|
|||
</view>
|
||||
<textarea class="apply-reason-text" v-model="form.name" maxlength="250" placeholder="请输入" />
|
||||
</view>
|
||||
<view class="btn" style="display: flex;justify-content: space-between;">
|
||||
<view class="btn" style="display: flex;justify-content: space-between;margin-top: 20rpx;">
|
||||
<view class="left-content">
|
||||
<button class="handleBtn" type="primary" @click="addNode">加签</button>
|
||||
<button class="handleBtn" v-if="ticketDetail.state_&&ticketDetail.state_.enable_deliver"
|
||||
<button class="mini-btn" size="mini" type="primary" @click="addNode">加签</button>
|
||||
<button class="mini-btn" size="mini" v-if="ticketDetail.state_&&ticketDetail.state_.enable_deliver"
|
||||
type="primary" plain @click="deliverNode">转交
|
||||
</button>
|
||||
</view>
|
||||
<view class="right-time">
|
||||
<button v-for="item in operationBtn" :key="item.id" class="handleBtn"
|
||||
:type="item.attribute_type===2?'danger':'primary'" @click="operationSubmit(item.id)">
|
||||
<button v-for="item in operationBtn" :key="item.id" class="mini-btn" size="mini"
|
||||
:type="item.attribute_type===2?'warn':'primary'" @click="operationSubmit(item.id)">
|
||||
{{item.name}}
|
||||
</button>
|
||||
</view>
|
||||
<!-- <button type="default" class="save-btn">同意</button> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
@ -396,26 +409,7 @@
|
|||
var that;
|
||||
var promise;
|
||||
export default {
|
||||
name: "fafangbaogao_apply",
|
||||
watch: {
|
||||
/* 文件下载监听 */
|
||||
lsDownLoadImg(newVal, oldVal) {
|
||||
let val = newVal;
|
||||
if (String(newVal).indexOf(",") > -1) {
|
||||
val = String(newVal).split(",")[0] === "true";
|
||||
}
|
||||
this.$set(this.downFiles, 'downLoadImg' + this.lsFileId, val)
|
||||
},
|
||||
/* 文件下载监听 */
|
||||
principal(newVal, oldVal) {
|
||||
if (!this.itemId) {
|
||||
if (oldVal.roleId === undefined && newVal.roleId !== undefined) {
|
||||
this.formData.itemInfo.applicationDept = newVal.deptId
|
||||
this.formData.applicationDept = newVal.deptId
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
name: "ticketHandle",
|
||||
data() {
|
||||
const currentDate = this.getDate({
|
||||
format: true
|
||||
|
@ -434,19 +428,7 @@
|
|||
detail: false,
|
||||
isDisabled: false,
|
||||
btnShow: true,
|
||||
lsId: "",
|
||||
sta: null,
|
||||
eventStatus: "",
|
||||
execId: '',
|
||||
// 2022年3月20日
|
||||
result: [],
|
||||
// 文件进度
|
||||
imgFlag: false,
|
||||
//文件下载
|
||||
downFiles: {},
|
||||
timeShow: false,
|
||||
// 发布网站
|
||||
releaseWeb: [],
|
||||
|
||||
ticketDetail: {},
|
||||
visitDetail: {},
|
||||
rpjDetail: {},
|
||||
|
@ -517,6 +499,24 @@
|
|||
40: "进行中",
|
||||
50: "已完成",
|
||||
},
|
||||
noteOption: [{
|
||||
value: 10,
|
||||
text: '作业正常结束'
|
||||
},
|
||||
{
|
||||
value: 20,
|
||||
text: '因计划改变停止作业'
|
||||
},
|
||||
{
|
||||
value: 30,
|
||||
text: '因发生异常终止作业'
|
||||
},
|
||||
{
|
||||
value: 40,
|
||||
text: '其他'
|
||||
},
|
||||
],
|
||||
dosOption: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -534,7 +534,7 @@
|
|||
that.ticketId = params.ticketId;
|
||||
that.projectId = params.projectId;
|
||||
that.cateType = params.cateType;
|
||||
that.operation = params.operation;
|
||||
that.type = params.type;
|
||||
},
|
||||
onShow() {
|
||||
if (this.cateType === 'visit') {
|
||||
|
@ -542,12 +542,7 @@
|
|||
} else if (this.cateType === 'rparty') {
|
||||
this.getRpj();
|
||||
} else {
|
||||
if (this.operation !== null) {
|
||||
this.getOperation();
|
||||
this.getOpl();
|
||||
} else {
|
||||
this.getOpl();
|
||||
}
|
||||
this.getOpl();
|
||||
// this.getCloseDos();
|
||||
}
|
||||
this.getticketItem();
|
||||
|
@ -574,14 +569,6 @@
|
|||
});
|
||||
},
|
||||
|
||||
//作业详情
|
||||
getOperation() {
|
||||
// debugger;
|
||||
this.$u.api.getOpreation(this.operation).then((res) => {
|
||||
// debugger;
|
||||
this.opreationDetail = res;
|
||||
});
|
||||
},
|
||||
//许可证详情
|
||||
getOpl() {
|
||||
this.$u.api.getOpl(this.projectId).then((res) => {
|
||||
|
@ -678,6 +665,15 @@
|
|||
delta: 1
|
||||
})
|
||||
},
|
||||
|
||||
//加签
|
||||
addNode() {
|
||||
const params = `?ticketId=${this.ticketId}&type='add'`;
|
||||
uni.navigateTo({
|
||||
url: '../detail/addNode' + params,
|
||||
})
|
||||
},
|
||||
|
||||
operationSubmit(id) {
|
||||
let params = new Object();
|
||||
params.transition = id;
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
getTicketLists() {
|
||||
let that = this;
|
||||
let obj = {};
|
||||
obj.category = 'duty';
|
||||
obj.category = 'all';
|
||||
obj.pageNum = this.pageNum;
|
||||
obj.pageSize = this.pageSize;
|
||||
if (that.search !== '') {
|
||||
|
@ -90,20 +90,14 @@
|
|||
})
|
||||
},
|
||||
ticketHandle(val) {
|
||||
let projectId = '',//项目、许可证Id
|
||||
operation = null;//作业id
|
||||
let projectId = val.ticket_data.opl;//项目、许可证Id
|
||||
let catetype = val.workflow_.key;
|
||||
if (catetype === 'visit') {
|
||||
projectId = val.ticket_data.visit;
|
||||
} else if (catetype === 'Fire') {
|
||||
projectId = val.ticket_data.opl;
|
||||
operation = val.ticket_data.operation ? val.ticket_data.operation : null;
|
||||
}
|
||||
const params = `?ticketId=${val.id}&projectId=${projectId}&cateType=${catetype}&operation=${operation}`;
|
||||
const params = `?ticketId=${val.id}&projectId=${projectId}&cateType=${catetype}&type='handle'`;
|
||||
uni.navigateTo({
|
||||
url: '../detail/ticketHandle' + params,
|
||||
})
|
||||
},
|
||||
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
|
|
|
@ -67,12 +67,10 @@
|
|||
</view>
|
||||
<view class="wxBig">
|
||||
<view class="Wxtitle">
|
||||
<view class="WxtitleIn">
|
||||
第三方登录
|
||||
</view>
|
||||
<view class="WxtitleIn">新用户注册</view>
|
||||
</view>
|
||||
<view class="wx" @click="mpLogin">
|
||||
<image src="/static/login/weixin.png" mode=""></image>
|
||||
<view class="wx" @click="userRegister">
|
||||
<image src="/static/login/userRegister.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -293,6 +291,11 @@
|
|||
this.isMessage = true;
|
||||
}
|
||||
},
|
||||
userRegister(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/userRegister'
|
||||
})
|
||||
},
|
||||
formSubmit(e) {
|
||||
var that = this;
|
||||
const obj = e.target.value;
|
||||
|
@ -326,13 +329,14 @@
|
|||
// 获取验证码
|
||||
getCode() {
|
||||
debugger;
|
||||
console.log(this.phoneNumber)
|
||||
if (this.phoneNumber !== '') {
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码',
|
||||
mask: true
|
||||
})
|
||||
this.$u.api.getCode({
|
||||
phone: 16619852123
|
||||
phone: this.phoneNumber
|
||||
}).then(res => {
|
||||
setTimeout(() => {
|
||||
uni.hideLoading();
|
||||
|
|
|
@ -0,0 +1,528 @@
|
|||
<template>
|
||||
<view class="login_register">
|
||||
<view class="nav-bar" style="position: relative;">
|
||||
<image style="display: block;width: 100%;height: 100%;" :src="myTopBgSrc"></image>
|
||||
</view>
|
||||
<view class="handle-area">
|
||||
<view class="login-area" v-if="isPassword">
|
||||
<form style="display: block;" @submit="formSubmit">
|
||||
<view class="login-item">
|
||||
<image class="login-icon" src="../../static/login/avatar.png" mode=""></image>
|
||||
<input placeholder-style="color: #2c6fd9;" style="color: #2c6fd9;" class="loginItemInput"
|
||||
type="text" name="username" placeholder="请输入您的账号" />
|
||||
</view>
|
||||
<view class="login-item">
|
||||
<image class="login-icon" src="../../static/login/password.png" mode=""></image>
|
||||
<input placeholder-style="color: #2c6fd9;" style="color: #2c6fd9;" class="loginItemInput"
|
||||
type="text" name="password" placeholder="请输入您的姓名" />
|
||||
</view>
|
||||
<view class="login-item">
|
||||
<image class="login-icon" src="../../static/login/avatar.png" mode=""></image>
|
||||
<input placeholder-style="color: #2c6fd9;" style="color: #2c6fd9;" class="loginItemInput"
|
||||
type="number" name="username" placeholder="请输入您的手机号" />
|
||||
</view>
|
||||
|
||||
<view class="">
|
||||
<button type="default" form-type="submit" class="login-btn">注册</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
</view>
|
||||
<view class="privacy">
|
||||
<view class="privacyIn">
|
||||
<u-checkbox-group>
|
||||
<u-checkbox @change="checkboxChange" v-model="checkedShow"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<view class="privacyCon">
|
||||
我已阅读并同意《<text style="color: #2d8cff;" @click="agreementFn(1)">用户协议</text>》和《<text
|
||||
style="color: #2d8cff;" @click="agreementFn(2)">隐私政策</text>》
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-popup v-model="agreement" mode='center' :mask='true' border-radius='20' width='85%' height='75%'
|
||||
:closeable='true'>
|
||||
<view style="padding: 30upx;" v-html="content">{{content}}</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
var that;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
wxcode: null,
|
||||
agreement: false,
|
||||
checkedShow: true,
|
||||
key: "",
|
||||
img: "",
|
||||
username: '',
|
||||
password: '',
|
||||
phoneNumber: '',
|
||||
message: '',
|
||||
code: "",
|
||||
isShow: true,
|
||||
myTopBgSrc: require("../../static/login/my-bg.jpg"),
|
||||
content: '',
|
||||
userContent: '',
|
||||
privacyContent: '',
|
||||
wxShow: false,
|
||||
isPassword: true,
|
||||
isMessage: false,
|
||||
codeTips: "获取验证码",
|
||||
testUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf7d6140f507466be&redirect_uri=http%3A%2F%2Fqyjy.ctc-zc.com&response_type=code&scope=snsapi_base#wechat_redirect',
|
||||
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
that = this;
|
||||
},
|
||||
methods: {
|
||||
checkboxChange(e) {
|
||||
uni.setStorageSync('privacyShow', e.value)
|
||||
},
|
||||
//第三方登录
|
||||
loginFn() {
|
||||
if (that.checkedShow == false) {
|
||||
uni.showToast({
|
||||
title: '请勾选用户协议和隐私政策',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
return false;
|
||||
}
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success(res) {
|
||||
if (res.authResult.unionid) {
|
||||
appLogin(res.authResult.unionid).then(res1 => {
|
||||
console.log(res1)
|
||||
if (res1.statusCode == 200) {
|
||||
if (res1.data.massage == 1) {
|
||||
uni.navigateTo({
|
||||
url: 'BangWx?unionid=' + res.authResult.unionid
|
||||
})
|
||||
} else {
|
||||
uni.setStorageSync('my_token', res1.data.oAuth2AccessToken
|
||||
.access_token);
|
||||
that.updateCidFn(res1.data.userName);
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '登录失败',
|
||||
duration: 2000,
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
uni.showToast({
|
||||
title: "请求失败",
|
||||
icon: 'none'
|
||||
})
|
||||
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '登录失败请重新登录',
|
||||
duration: 2000,
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
mpLogin() {
|
||||
// #ifdef H5
|
||||
this.getWxCode()
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.showLoading({
|
||||
title: '微信登录中...',
|
||||
mask: true
|
||||
})
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (loginRes) => {
|
||||
this.$u.api.wxmplogin({
|
||||
code: loginRes.code
|
||||
}).then(res => {
|
||||
this.$u.vuex('vuex_token', res.access)
|
||||
this.$u.api.getUserInfo().then(res => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: "登录成功",
|
||||
icon: "none"
|
||||
})
|
||||
uni.reLaunch({
|
||||
url: "/pages/home/home"
|
||||
})
|
||||
this.$u.vuex('vuex_user', res)
|
||||
// 修改资源请求地址
|
||||
// this.$u.vuex('vuex_user.avatar', this.vuex_user.avatar +
|
||||
// '?token=' + this.vuex_token)
|
||||
})
|
||||
}).catch(e => {
|
||||
uni.setStorageSync('wxmp_openid', e.data.wxmp_openid)
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: "暂未绑定微信!",
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
// 获取code
|
||||
// 先判断url中有没有code,如果有code,表明已经授权,如果没有code,跳转微信授权链接
|
||||
getWxCode() {
|
||||
// 截取地址中的code,如果没有code就去微信授权,如果已经获取到code了就直接把code传给后台获取openId
|
||||
let code = this.getUrlCode('code')
|
||||
if (code === null || code === '') {
|
||||
window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + this.vuex_appid +
|
||||
'&redirect_uri=' + encodeURIComponent(this.vuex_login) +
|
||||
'&response_type=code&scope=snsapi_base&state=1#wechat_redirect'
|
||||
// redirect_uri是授权成功后,跳转的url地址,微信会帮我们跳转到该链接,并且通过?的形式拼接code,这里需要用encodeURIComponent对链接进行处理。
|
||||
// 如果配置参数一一对应,那么此时已经通过回调地址刷新页面后,你就会再地址栏中看到code了。
|
||||
// http://127.0.0.1/pages/views/profile/login/login?code=001BWV4J1lRzz00H4J1J1vRE4J1BWV4q&state=1
|
||||
} else {
|
||||
this.wxcode = code
|
||||
this.wxcodeLogin()
|
||||
}
|
||||
// }
|
||||
},
|
||||
|
||||
updateCidFn(username) {
|
||||
var data = {
|
||||
userCid: uni.getStorageSync('setcid'),
|
||||
username: username
|
||||
}
|
||||
updateCid(data).then(res => {
|
||||
console.log(res, 'zhiixngle ')
|
||||
if (res.statusCode == 200) {
|
||||
uni.showToast({
|
||||
title: '登录成功',
|
||||
duration: 2000,
|
||||
icon: 'none',
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '../../index/index'
|
||||
})
|
||||
}, 2000)
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: '请求失败',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
//检查form表单是否填写完整
|
||||
checkedParams(obj) {
|
||||
/*
|
||||
Azuma
|
||||
1234qwer
|
||||
*/
|
||||
if (obj.username == "" || obj.username == undefined || obj.username == null) {
|
||||
myShowToast('用户名不能为空');
|
||||
return false;
|
||||
};
|
||||
if (obj.password == "" || obj.password == undefined || obj.password == null) {
|
||||
myShowToast('密码不能为空');
|
||||
return false;
|
||||
};
|
||||
if (that.checkedShow == false) {
|
||||
myShowToast('请勾选用户协议和隐私政策');
|
||||
return false;
|
||||
}
|
||||
|
||||
function myShowToast(text) {
|
||||
uni.showToast({
|
||||
title: text,
|
||||
icon: 'none'
|
||||
})
|
||||
};
|
||||
return true;
|
||||
},
|
||||
changeLogType(index) {
|
||||
if (index === 'password') {
|
||||
this.isPassword = true;
|
||||
this.isMessage = false;
|
||||
} else {
|
||||
this.isPassword = false;
|
||||
this.isMessage = true;
|
||||
}
|
||||
},
|
||||
formSubmit(e) {
|
||||
var that = this;
|
||||
const obj = e.target.value;
|
||||
if (!that.checkedParams(obj)) return;
|
||||
debugger;
|
||||
console.log(obj)
|
||||
that.$u.api.login(obj).then(res => {
|
||||
that.$u.vuex('vuex_token', res.access)
|
||||
that.$u.vuex('vuex_refresh', res.refresh)
|
||||
// let data = {openid: uni.getStorageSync('wxmp_openid')}
|
||||
// that.$u.api.bindmp(data).then(res=>{})
|
||||
that.$u.api.getUserInfo().then(res => {
|
||||
that.$u.vuex('vuex_user', res)
|
||||
// 修改资源请求地址
|
||||
})
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/home_'
|
||||
})
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
uni.showToast({
|
||||
title: '账户密码错误',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
codeChange(text) {
|
||||
this.codeTips = text;
|
||||
},
|
||||
// 获取验证码
|
||||
getCode() {
|
||||
debugger;
|
||||
if (this.phoneNumber !== '') {
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码',
|
||||
mask: true
|
||||
})
|
||||
this.$u.api.getCode({
|
||||
phone: 16619852123
|
||||
}).then(res => {
|
||||
setTimeout(() => {
|
||||
uni.hideLoading();
|
||||
// 这里此提示会被this.start()方法中的提示覆盖
|
||||
this.$u.toast('验证码已发送');
|
||||
// 通知验证码组件内部开始倒计时
|
||||
this.$refs.uCode.start();
|
||||
}, 2000);
|
||||
})
|
||||
} else {
|
||||
// this.$u.toast('倒计时结束后再发送');
|
||||
this.$u.toast('请输入手机号');
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.privacy {
|
||||
width: 100%;
|
||||
height: 40upx;
|
||||
padding: 0 40upx;
|
||||
margin-bottom: 25upx;
|
||||
position: fixed;
|
||||
bottom: 20upx;
|
||||
.privacyIn {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.privacyCon {
|
||||
font-size: 26upx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wxBig {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-top: 100upx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
|
||||
.Wxtitle {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
padding: 0 50upx;
|
||||
|
||||
.WxtitleIn {
|
||||
width: 100%;
|
||||
font-size: 26upx;
|
||||
color: #808080;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.WxtitleIn::after {
|
||||
content: '';
|
||||
width: 217upx;
|
||||
height: 2upx;
|
||||
background-color: #f6f6f6;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 18upx;
|
||||
}
|
||||
|
||||
.WxtitleIn::before {
|
||||
content: '';
|
||||
width: 217upx;
|
||||
height: 2upx;
|
||||
background-color: #f6f6f6;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 18upx;
|
||||
}
|
||||
}
|
||||
|
||||
.wx {
|
||||
width: 70upx;
|
||||
height: 70upx;
|
||||
margin-top: 50upx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.login_register {
|
||||
position: relative;
|
||||
background-color: #f3fbff;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.nav-bar {
|
||||
height: 494upx;
|
||||
background-color: #2cade8;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.handle-area {
|
||||
width: 705upx;
|
||||
height: auto;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 10upx;
|
||||
position: absolute;
|
||||
top: 360upx;
|
||||
left: 50%;
|
||||
padding-bottom: 80upx;
|
||||
transform: translateX(-50%);
|
||||
box-shadow: 0px 5px 9px 5px rgba(141, 169, 185, 0.3);
|
||||
}
|
||||
.login-area{
|
||||
padding-top: 80upx;
|
||||
}
|
||||
.login-item {
|
||||
width: 635upx;
|
||||
height: 88upx;
|
||||
border-radius: 88upx;
|
||||
margin: 0 auto;
|
||||
background-color: #ebf6ff;
|
||||
padding-left: 72upx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
margin-bottom: 56upx;
|
||||
}
|
||||
|
||||
.loginItemInput {
|
||||
border-radius: 0 88upx 88upx 0;
|
||||
}
|
||||
|
||||
.code-img-item {
|
||||
padding-left: 72upx;
|
||||
}
|
||||
|
||||
.login-item .login-icon {
|
||||
width: 22upx;
|
||||
height: 28upx;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 35upx;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.login-item input {
|
||||
height: 100%;
|
||||
line-height: 88upx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 26upx;
|
||||
}
|
||||
|
||||
.my-code-input {
|
||||
width: 300upx;
|
||||
}
|
||||
|
||||
.code-img {
|
||||
width: 155upx;
|
||||
height: 53upx;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 20upx;
|
||||
transform: translateY(-50%);
|
||||
background-color: #EEEEEE;
|
||||
}
|
||||
|
||||
.getMessageCode {
|
||||
width: fit-content;
|
||||
position: absolute;
|
||||
top: 10%;
|
||||
right: 20upx;
|
||||
height: 80%;
|
||||
color: #ffffff;
|
||||
font-size: 26upx;
|
||||
border-color: #19be6b;
|
||||
background-color: #19be6b;
|
||||
z-index: 100;
|
||||
border-radius: 36upx !important;
|
||||
}
|
||||
|
||||
.login-btn,
|
||||
.register-btn {
|
||||
width: 635upx;
|
||||
height: 88upx;
|
||||
border-radius: 88upx;
|
||||
margin: 0 auto;
|
||||
background-color: #1d7ef3;
|
||||
font-family: AdobeHeitiStd-Regular;
|
||||
font-size: 30upx;
|
||||
line-height: 88upx;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.to-login {
|
||||
font-family: AdobeHeitiStd-Regular;
|
||||
font-size: 24upx;
|
||||
line-height: 72upx;
|
||||
color: #2c6fd9 !important;
|
||||
border: none !important;
|
||||
margin-top: 20upx;
|
||||
}
|
||||
|
||||
.code-item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.my-code {
|
||||
width: 376upx;
|
||||
}
|
||||
|
||||
.code {
|
||||
width: 155upx;
|
||||
height: 53upx;
|
||||
background-color: #0075ff;
|
||||
border-radius: 27upx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 20upx !important;
|
||||
line-height: 53upx;
|
||||
color: #fefeff;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 20upx;
|
||||
transform: translateY(-50%);
|
||||
padding-left: 12upx;
|
||||
padding-right: 12upx;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,179 @@
|
|||
<template>
|
||||
<view class="my-data">
|
||||
<uni-nav-bar @clickLeft="goBack()" class="nav-bar" height="110rpx" leftWidth="200rpx" leftText="添加人员"
|
||||
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
|
||||
<view class="wrap-view">
|
||||
<view class="item">
|
||||
<view class="title">姓名</view>
|
||||
<view class="content">
|
||||
<input type="text" v-model="formData.name" maxlength="20" placeholder="请输入" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">手机号</view>
|
||||
<view class="content">
|
||||
<input type="text" v-model="formData.phone" maxlength="20" placeholder="请输入" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">身份证号</view>
|
||||
<view class="content">
|
||||
<input type="text" v-model="formData.id_number" maxlength="20" placeholder="请输入" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" style="height: fit-content;">
|
||||
<view class="title">证件照</view>
|
||||
<view style="flex: 3;">
|
||||
<uni-file-picker v-model="formData.photo" file-mediatype="image" mode="grid" file-extname="png,jpg"
|
||||
:limit="1" ref="files" :auto-upload="false" @select="select" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn">
|
||||
<button type="default" class="save-btn" @click="saveUser">保存</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
photo: "",
|
||||
name: "",
|
||||
phone: "",
|
||||
id_number: ""
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
saveUser(){
|
||||
this.$u.api.addVisitor(this.formData).then(res=>{
|
||||
if(res.err_msg){}else{
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/newWork/userList'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
select(e) {
|
||||
this.filepath = e.tempFilePaths
|
||||
},
|
||||
async upImg() {
|
||||
var that = this
|
||||
if (that.filepath.length>0) {
|
||||
uni.showLoading({
|
||||
title: '上传中'
|
||||
})
|
||||
|
||||
for(var i=0;i<that.filepath.length;i++){
|
||||
let base64 = 'data:image/jpeg;base64,' + uni.getFileSystemManager().readFileSync(that.filepath[i],
|
||||
'base64')
|
||||
let res;
|
||||
try{
|
||||
res = await that.$u.api.upFile({imgBase64:base64})
|
||||
}
|
||||
catch(e){
|
||||
if(e.data.code==1){
|
||||
that.rpath.push(e.data.path)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
try{
|
||||
let payload = {
|
||||
id: that.rdata.id,
|
||||
voucher_url: that.rpath.join(',')
|
||||
}
|
||||
let res = await that.$u.api.tjfk(payload)
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title:'提交成功'
|
||||
})
|
||||
uni.navigateBack()
|
||||
}catch(e){
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title:'提交失败',
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar {
|
||||
background-image: linear-gradient(254deg,
|
||||
#0ca7ee 0%,
|
||||
#005aff 100%,
|
||||
#2a8cff 100%,
|
||||
#54bdff 100%),
|
||||
linear-gradient(#e60012,
|
||||
#e60012);
|
||||
}
|
||||
|
||||
.my-data {
|
||||
background-color: #f3fbff;
|
||||
padding-bottom: 227rpx;
|
||||
}
|
||||
|
||||
.nav-bar>>>.uni-navbar-btn-text text {
|
||||
font-size: 32rpx !important;
|
||||
}
|
||||
|
||||
.wrap-view {
|
||||
width: 720rpx;
|
||||
margin: 0 auto;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
line-height: 94rpx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.item {
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
margin: 0rpx 32rpx;
|
||||
display: flex;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #212121;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 3;
|
||||
color: #414141;
|
||||
|
||||
}
|
||||
|
||||
.content input {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.save-btn {
|
||||
width: 400rpx;
|
||||
height: 80rpx;
|
||||
background-color: #2c6fd9;
|
||||
border-radius: 40rpx;
|
||||
font-size: 30rpx;
|
||||
line-height: 80rpx;
|
||||
color: #f3fbff;
|
||||
margin-top: 21rpx;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,161 @@
|
|||
<template>
|
||||
<view class="list-body">
|
||||
<uni-nav-bar @clickLeft="goBack()" class="nav-bar" height="110rpx" leftWidth="200rpx" leftText="人员选择"
|
||||
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
<view class="apply-info">
|
||||
<checkbox-group @change="checkboxChange">
|
||||
<label class="uni-list-cell uni-list-cell-pd" v-for="row in userRange" :key="row.value">
|
||||
<view>
|
||||
<checkbox :value="row.value" :checked="row.checked" />
|
||||
</view>
|
||||
<view>
|
||||
<view class="name">姓名:{{row.name}}</view>
|
||||
<view class="tel">手机号:{{row.phone}}</view>
|
||||
<view class="tel">身份证号:{{row.id_number}}</view>
|
||||
</view>
|
||||
</label>
|
||||
</checkbox-group>
|
||||
<!-- <view class="row" v-for="(row,index) in userRange" :key="index" @tap="select(row)">
|
||||
<view class="center">
|
||||
<view class="name-tel">
|
||||
<view class="name">姓名:{{row.name}}</view>
|
||||
<view class="tel">手机号:{{row.phone}}</view>
|
||||
<view class="tel">身份证号:{{row.id_number}}</view>
|
||||
</view>
|
||||
<view class="photo">
|
||||
{{row.photo}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="icon bianji" @tap.stop="edit(row)">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
-->
|
||||
|
||||
</view>
|
||||
<view class="add">
|
||||
<view class="btn">
|
||||
<button type="primary" class="save-btn" @click="add">新增人员</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "userList",
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
name: '',
|
||||
},
|
||||
userRange: [{
|
||||
id: "1553943890468409344",
|
||||
name: "一一",
|
||||
phone: "1",
|
||||
photo: null,
|
||||
id_number: "",
|
||||
employee: null,
|
||||
visit: null,
|
||||
}, {
|
||||
id: "1547149802700148736",
|
||||
name: "test3",
|
||||
phone: "13112340003",
|
||||
photo: "/media/2022/07/13/微信图片_20220713172755.jpg",
|
||||
id_number: "371324198302029824",
|
||||
employee: "1547406632219185152",
|
||||
visit: "1547754231795159040"
|
||||
}],
|
||||
}
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// this.getUserRange();
|
||||
},
|
||||
methods: {
|
||||
//获取用户
|
||||
getUserRange() {
|
||||
this.$u.api.vmVisitor({
|
||||
page: 0
|
||||
}).then(res => {
|
||||
debugger;
|
||||
console.log(res)
|
||||
this.userRange = res;
|
||||
})
|
||||
},
|
||||
select(row) {},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
|
||||
add() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/newWork/addUser'
|
||||
})
|
||||
},
|
||||
edit(row) {},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar {
|
||||
background-image: linear-gradient(90deg, #164cc3 0%, #2c6fd9 100%), linear-gradient(#e60012, #e60012) !important;
|
||||
}
|
||||
|
||||
.list-body {
|
||||
background-color: #f3fbff;
|
||||
padding-bottom: 113px;
|
||||
}
|
||||
|
||||
.apply-info {
|
||||
min-height: 70vh;
|
||||
width: 360px;
|
||||
margin: 0 auto;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 5px;
|
||||
padding: 12px 16px;
|
||||
box-sizing: border-box;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.row {
|
||||
padding: 10upx;
|
||||
margin-bottom: 20upx;
|
||||
border-bottom: 1upx solid #eeeeee;
|
||||
}
|
||||
|
||||
.uni-list-cell {
|
||||
display: flex;
|
||||
padding: 10upx;
|
||||
margin-bottom: 20upx;
|
||||
border-bottom: 1upx solid #eeeeee;
|
||||
}
|
||||
|
||||
.add {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 120upx;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: auto;
|
||||
box-shadow: 0upx 5upx 10upx rgba(0, 0, 0, 0.4);
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.save-btn {
|
||||
height: 80rpx;
|
||||
color: #fff;
|
||||
font-size: 30upx;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
|
@ -12,16 +12,6 @@
|
|||
</view>
|
||||
<view class="apply-info">
|
||||
<view class="form-content ">
|
||||
<view class="form-item border-bottom">
|
||||
<view class="form-left">
|
||||
<text class="star">*</text>
|
||||
<text class="form-left-text">作业状态</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-select v-model="formData.state" :localdata="range" label="应用选择">
|
||||
</uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom">
|
||||
<view class="form-left">
|
||||
<text class="star">*</text>
|
||||
|
@ -59,7 +49,7 @@
|
|||
<text class="form-left-text">生产状态</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-select v-model="formData.state_work" :localdata="range" label="应用选择">
|
||||
<uni-data-select v-model="formData.state_work" :localdata="stateRange" label="生产状态">
|
||||
</uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -70,7 +60,7 @@
|
|||
<text class="form-left-text">作业区域</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-select v-model="formData.area" :localdata="range" label="应用选择">
|
||||
<uni-data-select v-model="formData.area" :localdata="range" label="作业区域">
|
||||
</uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -80,9 +70,8 @@
|
|||
<text class="form-left-text">业务部门</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-picker placeholder="请选择业务部门" popup-title="请选择业务部门" :localdata="dataTree"
|
||||
v-model="classes" @change="onchange" @nodeclick="onnodeclick" @popupopened="onpopupopened"
|
||||
@popupclosed="onpopupclosed">
|
||||
<uni-data-picker placeholder="请选择业务部门" popup-title="请选择业务部门" :localdata="depRange"
|
||||
v-model="formData.dept_bus" >
|
||||
</uni-data-picker>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -93,7 +82,7 @@
|
|||
<text class="form-left-text">部门协调员</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-select v-model="formData.area" :localdata="range" label="应用选择">
|
||||
<uni-data-select v-model="formData.coordinator" :localdata="userRange" label="部门协调员">
|
||||
</uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -104,15 +93,15 @@
|
|||
<text class="form-left-text">属地部门</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-picker placeholder="请选择属地部门" popup-title="请选择属地部门" :localdata="dataTree"
|
||||
v-model="classes" @change="onchange" @nodeclick="onnodeclick" @popupopened="onpopupopened"
|
||||
@popupclosed="onpopupclosed">
|
||||
<uni-data-picker placeholder="请选择属地部门" popup-title="请选择属地部门" :localdata="depRange"
|
||||
v-model="formData.dept_ter" @change="onchange" @nodeclick="onnodeclick"
|
||||
@popupopened="onpopupopened" @popupclosed="onpopupclosed">
|
||||
</uni-data-picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="btn">
|
||||
<button type="default" class="save-btn">保存</button>
|
||||
<button type="default" class="save-btn" @click="saveSubmit">下一步</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -120,32 +109,10 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
/* 这是条件编译,意思是:只在APP中出现如下的代码,小程序是不支持的 */
|
||||
var that;
|
||||
var promise;
|
||||
export default {
|
||||
name: "fafangbaogao_apply",
|
||||
// mixins: [myMixin],
|
||||
watch: {
|
||||
/* 文件下载监听 */
|
||||
|
||||
lsDownLoadImg(newVal, oldVal) {
|
||||
let val = newVal;
|
||||
if (String(newVal).indexOf(",") > -1) {
|
||||
val = String(newVal).split(",")[0] === "true";
|
||||
}
|
||||
this.$set(this.downFiles, 'downLoadImg' + this.lsFileId, val)
|
||||
},
|
||||
/* 文件下载监听 */
|
||||
principal(newVal, oldVal) {
|
||||
if (!this.itemId) {
|
||||
if (oldVal.roleId === undefined && newVal.roleId !== undefined) {
|
||||
this.formData.itemInfo.applicationDept = newVal.deptId
|
||||
this.formData.applicationDept = newVal.deptId
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
name: "work",
|
||||
data() {
|
||||
const currentDate = this.getDate({
|
||||
format: true
|
||||
|
@ -166,7 +133,7 @@
|
|||
coordinator: '', //业务部门协调员
|
||||
},
|
||||
|
||||
depRange: [],
|
||||
|
||||
publishRangeCon: '',
|
||||
menuId: "",
|
||||
itemId: "",
|
||||
|
@ -191,15 +158,11 @@
|
|||
createTimeFromShow: false,
|
||||
createTimeFromList: [],
|
||||
createTimeFromCon: '',
|
||||
depRange: [{
|
||||
label: "name1",
|
||||
id: 1
|
||||
}, {
|
||||
label: "name2",
|
||||
id: 2
|
||||
}],
|
||||
|
||||
range: [{
|
||||
userRange: [],
|
||||
//作业区域
|
||||
range: [],
|
||||
//生产状态
|
||||
stateRange: [{
|
||||
value: 0,
|
||||
text: "运行"
|
||||
},
|
||||
|
@ -212,29 +175,8 @@
|
|||
text: "检修"
|
||||
},
|
||||
],
|
||||
dataTree: [{
|
||||
text: "曲阳金隅",
|
||||
value: "1",
|
||||
children: [{
|
||||
text: "设计部",
|
||||
value: "11",
|
||||
children: [{
|
||||
text: "设计一部",
|
||||
value: "111"
|
||||
},
|
||||
{
|
||||
text: "设计一部",
|
||||
value: "112"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: "12生产部",
|
||||
value: "12"
|
||||
}
|
||||
]
|
||||
}]
|
||||
|
||||
//部门
|
||||
depRange: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -246,49 +188,60 @@
|
|||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
/* that = this;
|
||||
|
||||
promise = new Promise(function(resolve, reject) {
|
||||
that.nodeFn();
|
||||
that.createTimeFromFn();
|
||||
resolve()
|
||||
})
|
||||
promise.then(function(){
|
||||
if (Object.keys(params).length > 0) {
|
||||
console.log(params.itemId)
|
||||
that.itemId = params.itemId;
|
||||
that.pkId = params.pkId;
|
||||
that.eventStatus = params.eventStatus;
|
||||
that.execId = params.execId;
|
||||
if (params.detail !== undefined && params.detail !== null && params.detail !== "") {
|
||||
if (typeof params.detail === "string") {
|
||||
that.detail = JSON.parse(params.detail);
|
||||
} else if (typeof params.detail === "boolean") {
|
||||
that.detail = params.detail
|
||||
}
|
||||
}
|
||||
that._initPrintList()
|
||||
}
|
||||
})
|
||||
*/
|
||||
|
||||
},
|
||||
onShow() {
|
||||
/* that._getDeptListMenu();
|
||||
var timestamp = (new Date()).valueOf();
|
||||
that.formData.createTimeTo = that.happenTimeFun(timestamp); */
|
||||
this.getdept();
|
||||
this.getRange();
|
||||
this.getUserRange();
|
||||
this.range = [];
|
||||
},
|
||||
methods: {
|
||||
onnodeclick(e) {
|
||||
console.log(e);
|
||||
saveSubmit() {
|
||||
debugger;
|
||||
console.log(this.formData)
|
||||
that.$u.api.operationCreat(this.formData).then(res => {
|
||||
that.depRange = that.redata(res);
|
||||
debugger;
|
||||
console.log(that.depRange)
|
||||
})
|
||||
},
|
||||
onpopupopened(e) {
|
||||
console.log('popupopened');
|
||||
//获取dept
|
||||
getdept() {
|
||||
let that = this;
|
||||
that.$u.api.deptList({page: 0}).then(res => {
|
||||
that.depRange = that.redata(res);
|
||||
debugger;
|
||||
console.log(that.depRange)
|
||||
})
|
||||
},
|
||||
onpopupclosed(e) {
|
||||
console.log('popupclosed');
|
||||
//获取作业区域
|
||||
getRange() {
|
||||
this.$u.api.areaLists({page: 0}).then(res => {
|
||||
let range = [];
|
||||
let obj = {};
|
||||
res.forEach(item => {
|
||||
obj = {value: null,text: ''};
|
||||
obj.value = item.id;
|
||||
obj.text = item.name;
|
||||
range.push(obj);
|
||||
})
|
||||
this.range = range
|
||||
})
|
||||
},
|
||||
onchange(e) {
|
||||
console.log('onchange:', e);
|
||||
//获取用户
|
||||
getUserRange() {
|
||||
this.$u.api.userList({page: 0}).then(res => {
|
||||
let user = [];
|
||||
let obj = {};
|
||||
res.forEach(item => {
|
||||
obj = {value: null,text: ''};
|
||||
obj.value = item.id;
|
||||
obj.text = item.name;
|
||||
user.push(obj);
|
||||
})
|
||||
this.userRange = user
|
||||
})
|
||||
},
|
||||
getDate(type) {
|
||||
const date = new Date();
|
||||
|
@ -337,587 +290,33 @@
|
|||
that.formData.createTimeFrom = that.createTimeFromList[index].id
|
||||
that.createTimeFromCon = that.createTimeFromList[index].label
|
||||
},
|
||||
//发布网站
|
||||
nodeFn() {
|
||||
var data = {
|
||||
dictCode: "FBWZ"
|
||||
|
||||
redata(postList) {
|
||||
let posts = [];
|
||||
postList.forEach((item) => {
|
||||
let obj = new Object();
|
||||
obj = {
|
||||
...item
|
||||
};
|
||||
obj.value = item.id;
|
||||
obj.text = item.name;
|
||||
obj.parentId = item.parent;
|
||||
posts.push(obj);
|
||||
});
|
||||
let obj = posts.reduce((res, v) => ((res[v.id] = v), res), {}); //Object
|
||||
let arr = [];
|
||||
for (let item of posts) {
|
||||
if (item.parentId == null) {
|
||||
arr.push(item);
|
||||
continue;
|
||||
}
|
||||
let parent = obj[item.parentId];
|
||||
parent.children = parent.children ? parent.children : [];
|
||||
parent.children.push(item);
|
||||
}
|
||||
node(data).then(res => {
|
||||
console.log(res)
|
||||
if (res.statusCode === 200) {
|
||||
if (res.data.data !== undefined && res.data.data !== null && res.data.data !== "") {
|
||||
for (let i = 0; i < res.data.data.length; i++) {
|
||||
res.data.data[i].checked = false;
|
||||
}
|
||||
}
|
||||
that.releaseWeb = res.data.data;
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: '网络异常, 请求失败',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
console.log(arr);
|
||||
return arr;
|
||||
},
|
||||
//信息有效期
|
||||
createTimeFromFn() {
|
||||
var data = {
|
||||
dictCode: "XXYXSC"
|
||||
}
|
||||
node(data).then(res => {
|
||||
if (res.statusCode === 200) {
|
||||
if (res.data.data !== undefined && res.data.data !== null && res.data.data !== "") {
|
||||
that.createTimeFromList = res.data.data;
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: '网络异常, 请求失败',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
/* 文件删除 */
|
||||
delFile(index) {
|
||||
this.formData.newsBulletinFiles.splice(index, 1);
|
||||
},
|
||||
/* 文件上传 */
|
||||
onClickOpenMyFile() {
|
||||
if (this.imgFlag) return;
|
||||
var zzzzzzzzz = this;
|
||||
const token = uni.getStorageSync('my_token');
|
||||
let platform = uni.getSystemInfoSync().platform;
|
||||
|
||||
|
||||
|
||||
plus.nativeUI.actionSheet({
|
||||
cancel: "取消",
|
||||
buttons: [{
|
||||
title: "照片"
|
||||
},
|
||||
{
|
||||
title: "相机"
|
||||
},
|
||||
{
|
||||
title: "手机文件"
|
||||
},
|
||||
]
|
||||
},
|
||||
function(e) {
|
||||
if (e.index == 1 || e.index == 2) {
|
||||
let sourceType = ["album", "camera"];
|
||||
if (e.index == 1) {
|
||||
sourceType = ["album"];
|
||||
} else if (e.index == 2) {
|
||||
sourceType = ["camera"];
|
||||
}
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sourceType,
|
||||
success: ((res1) => {
|
||||
zzzzzzzzz.imgFlag = true;
|
||||
if (res1.errMsg === "chooseImage:ok") {
|
||||
const tempFilePaths = res1.tempFilePaths[0];
|
||||
if (tempFilePaths !== undefined && tempFilePaths !== null &&
|
||||
tempFilePaths !== "") {
|
||||
let myFiles = []
|
||||
// 这种是直接从相册选的
|
||||
// 直接上传
|
||||
if (tempFilePaths.indexOf("file:") > -1) {
|
||||
let myFile = {};
|
||||
myFile.uri = tempFilePaths;
|
||||
myFile.name = "file";
|
||||
myFiles.push(myFile)
|
||||
} else {
|
||||
let myFile = {};
|
||||
var ccc = 'file://' + plus.io
|
||||
.convertLocalFileSystemURL(tempFilePaths);
|
||||
myFile.uri = ccc;
|
||||
myFile.name = "file";
|
||||
myFiles.push(myFile)
|
||||
}
|
||||
let uploadTask = uni.uploadFile({
|
||||
url: myUploadFileUrl,
|
||||
header: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
'Authorization': 'bearer ' + token
|
||||
},
|
||||
files: myFiles,
|
||||
success: ((res_c) => {
|
||||
if (res_c.statusCode === 200) {
|
||||
let fileData = {};
|
||||
if (typeof res_c.data ==
|
||||
"string") {
|
||||
fileData = JSON.parse(res_c
|
||||
.data).data;
|
||||
} else {
|
||||
fileData = res_c.data.data;
|
||||
}
|
||||
if (fileData.fileId !== null &&
|
||||
fileData.fileId !==
|
||||
undefined && fileData
|
||||
.fileName !== undefined &&
|
||||
fileData.fileName !== null
|
||||
) {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
|
||||
zzzzzzzzz.$set(zzzzzzzzz
|
||||
.downFiles,
|
||||
'downLoadImg' +
|
||||
fileData.fileId,
|
||||
false);
|
||||
const obj = {};
|
||||
obj.fileId = fileData
|
||||
.fileId + "";
|
||||
obj.fileName = fileData
|
||||
.fileName;
|
||||
zzzzzzzzz.formData
|
||||
.newsBulletinFiles
|
||||
.push(obj);
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "上传成功"
|
||||
})
|
||||
} else {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "缺少fileData.fileId, 上传文件失败"
|
||||
})
|
||||
}
|
||||
} else {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: res_c.data
|
||||
.message ||
|
||||
"上传文件失败"
|
||||
})
|
||||
}
|
||||
}),
|
||||
fail: (() => {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "上传文件失败"
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
} else {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "获取文件失败"
|
||||
})
|
||||
}
|
||||
}),
|
||||
fail: (() => {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "取消选择文件"
|
||||
})
|
||||
})
|
||||
});
|
||||
} else if (e.index == 3) {
|
||||
if (platform === "android") {
|
||||
plugin.chooseFileAction({
|
||||
maxNum: 1, // 最大数量
|
||||
isNeedDetail: true, // 是否返回具体的信息
|
||||
btnText: "选择", // 右下角的文字
|
||||
fileTypes: ["doc", "docx", "xls", "xlsx", "pdf", "png", "jpg"], // 支持的类型
|
||||
extraApps: ["qqbrowser", "dingtalk"], // 额外支持的应用,QQ浏览器、钉钉
|
||||
}, (res) => {
|
||||
if (res.code === "0") {
|
||||
// console.log(res.dataDetail[0].path);
|
||||
zzzzzzzzz.imgFlag = true;
|
||||
if (res.dataDetail[0].path !== undefined && res.dataDetail[0].path !==
|
||||
null && res.dataDetail[0].path !== "") {
|
||||
let url = decodeURI(res.dataDetail[0].path);
|
||||
plus.io.resolveLocalFileSystemURL(url, function(entry) {
|
||||
let result = 'file://' + entry.fullPath;
|
||||
|
||||
let myFile = {};
|
||||
myFile.uri = result;
|
||||
myFile.name = "file";
|
||||
let myFiles = []
|
||||
myFiles.push(myFile)
|
||||
|
||||
let uploadTask = uni.uploadFile({
|
||||
url: myUploadFileUrl,
|
||||
header: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
'Authorization': 'bearer ' + token
|
||||
},
|
||||
files: myFiles,
|
||||
success: ((res_c) => {
|
||||
if (res_c.statusCode === 200) {
|
||||
let fileData = {};
|
||||
if (typeof res_c.data ==
|
||||
"string") {
|
||||
fileData = JSON.parse(
|
||||
res_c.data)
|
||||
.data;
|
||||
} else {
|
||||
fileData = res_c.data
|
||||
.data;
|
||||
}
|
||||
if (fileData.fileId !==
|
||||
null && fileData
|
||||
.fileId !==
|
||||
undefined && fileData
|
||||
.fileName !==
|
||||
undefined && fileData
|
||||
.fileName !== null) {
|
||||
zzzzzzzzz.imgFlag =
|
||||
false;
|
||||
|
||||
zzzzzzzzz.$set(
|
||||
zzzzzzzzz
|
||||
.downFiles,
|
||||
'downLoadImg' +
|
||||
fileData
|
||||
.fileId, false);
|
||||
const obj = {};
|
||||
obj.fileId = fileData
|
||||
.fileId + "";
|
||||
obj.fileName = fileData
|
||||
.fileName;
|
||||
zzzzzzzzz.formData
|
||||
.newsBulletinFiles
|
||||
.push(obj);
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "上传成功"
|
||||
})
|
||||
} else {
|
||||
zzzzzzzzz.imgFlag =
|
||||
false;
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "缺少fileData.fileId, 上传文件失败"
|
||||
})
|
||||
}
|
||||
} else {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: res_c
|
||||
.data
|
||||
.message ||
|
||||
"上传文件失败"
|
||||
})
|
||||
}
|
||||
}),
|
||||
fail: (() => {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "上传文件失败"
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
}, function(e) {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
console.log("读取文件出错: " + e.message);
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "读取文件出错" + e.message
|
||||
})
|
||||
});
|
||||
} else {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "读取文件出错"
|
||||
})
|
||||
}
|
||||
} else {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: res.msg
|
||||
})
|
||||
}
|
||||
});
|
||||
/*
|
||||
plug.filePicker({
|
||||
bgcolor: "#42b983",
|
||||
title: "文件选择",
|
||||
max: 1,
|
||||
fileTypes: ["doc", "docx", "xls", "xlsx", "pdf", "jpg", "png"]
|
||||
}, ret => {
|
||||
zzzzzzzzz.imgFlag = true;
|
||||
if (ret.fileList[0].path !== undefined && ret.fileList[0].path !== null && ret.fileList[0].path !== "") {
|
||||
let url = decodeURI(ret.fileList[0].path);
|
||||
plus.io.resolveLocalFileSystemURL(url, function(entry) {
|
||||
let result = 'file://' + entry.fullPath;
|
||||
|
||||
let myFile = {};
|
||||
myFile.uri = result;
|
||||
myFile.name = "file";
|
||||
let myFiles = []
|
||||
myFiles.push(myFile)
|
||||
|
||||
let uploadTask = uni.uploadFile({
|
||||
url: myUploadFileUrl,
|
||||
header: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
'Authorization': 'bearer ' + token
|
||||
},
|
||||
files: myFiles,
|
||||
success: ((res_c) => {
|
||||
if (res_c.statusCode === 200) {
|
||||
let fileData = {};
|
||||
if (typeof res_c.data == "string") {
|
||||
fileData = JSON.parse(res_c.data).data;
|
||||
} else {
|
||||
fileData = res_c.data.data;
|
||||
}
|
||||
if (fileData.fileId !== null && fileData.fileId !== undefined && fileData.fileName !== undefined && fileData.fileName !== null) {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
|
||||
zzzzzzzzz.$set(zzzzzzzzz.downFiles,'downLoadImg'+fileData.fileId,false);
|
||||
const obj = {};
|
||||
obj.fileId = fileData.fileId + "";
|
||||
obj.fileName = fileData.fileName;
|
||||
zzzzzzzzz.formData.newsBulletinFiles.push(obj);
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "上传成功"
|
||||
})
|
||||
} else {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "缺少fileData.fileId, 上传文件失败"
|
||||
})
|
||||
}
|
||||
} else {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: res_c.data.message || "上传文件失败"
|
||||
})
|
||||
}
|
||||
}),
|
||||
fail: (() => {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "上传文件失败"
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
}, function(e) {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
console.log("读取文件出错: " + e.message);
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "读取文件出错" + e.message
|
||||
})
|
||||
});
|
||||
} else {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "读取文件出错"
|
||||
})
|
||||
}
|
||||
});
|
||||
*/
|
||||
} else if (platform === "ios") {
|
||||
file.select({
|
||||
type: [
|
||||
"public.data",
|
||||
"com.microsoft.powerpoint.ppt",
|
||||
"com.microsoft.word.doc",
|
||||
"com.microsoft.excel.xls",
|
||||
"org.openxmlformats.presentationml.presentation", // pptx
|
||||
"org.openxmlformats.wordprocessingml.document", // docx
|
||||
"org.openxmlformats.spreadsheetml.sheet", // xlsx
|
||||
"public.avi",
|
||||
"public.3gpp",
|
||||
"public.mpeg-4",
|
||||
"com.compuserve.gif",
|
||||
"public.jpeg",
|
||||
"public.png",
|
||||
"public.plain-text",
|
||||
"com.adobe.pdf"
|
||||
],
|
||||
model: 0
|
||||
}, result => {
|
||||
zzzzzzzzz.imgFlag = true;
|
||||
if (result.filePath === undefined || result.filePath === null || result
|
||||
.filePath === "") {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "缺少路径, 无法上传"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
let localPath = result.filePath;
|
||||
localPath = decodeURI(localPath)
|
||||
let myFiles = []
|
||||
let myFile = {};
|
||||
myFile.uri = localPath;
|
||||
myFile.name = "file";
|
||||
myFiles.push(myFile);
|
||||
let uploadTask = uni.uploadFile({
|
||||
url: myUploadFileUrl,
|
||||
header: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
'Authorization': 'bearer ' + token
|
||||
},
|
||||
files: myFiles,
|
||||
success: ((res_c) => {
|
||||
console.log(res_c);
|
||||
if (res_c.statusCode === 200) {
|
||||
let fileData = {};
|
||||
if (typeof res_c.data == "string") {
|
||||
fileData = JSON.parse(res_c.data).data;
|
||||
} else {
|
||||
fileData = res_c.data.data;
|
||||
}
|
||||
if (fileData.fileId !== null && fileData
|
||||
.fileId !== undefined && fileData
|
||||
.fileName !== undefined && fileData
|
||||
.fileName !== null) {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
|
||||
zzzzzzzzz.$set(zzzzzzzzz.downFiles,
|
||||
'downLoadImg' + fileData.fileId,
|
||||
false);
|
||||
const obj = {};
|
||||
obj.fileId = fileData.fileId + "";
|
||||
obj.fileName = fileData.fileName;
|
||||
zzzzzzzzz.formData.newsBulletinFiles.push(
|
||||
obj);
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "上传成功"
|
||||
})
|
||||
} else {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "缺少fileData.fileId, 上传文件失败"
|
||||
})
|
||||
}
|
||||
} else {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: res_c.data.message ||
|
||||
"上传文件失败"
|
||||
})
|
||||
}
|
||||
}),
|
||||
fail: (() => {
|
||||
zzzzzzzzz.imgFlag = false;
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "上传文件失败"
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
},
|
||||
|
||||
/* 回显 */
|
||||
_initPrintList() {
|
||||
console.log("sasdasasd")
|
||||
seeXinwenNew(this.itemId).then(res => {
|
||||
if (res.statusCode === 200) {
|
||||
let data = res.data.data
|
||||
that.formData.id = data.id;
|
||||
that.formData.writer = data.writer;
|
||||
that.formData.mailbox = data.mailbox;
|
||||
that.formData.contactNumber = data.contactNumber;
|
||||
that.formData.releaseColumn = data.releaseColumn;
|
||||
that.formData.newsInformation = data.newsInformation;
|
||||
if (data.typeList != '' && data.typeList != undefined && data.typeList != null) {
|
||||
for (let i = 0; i < data.typeList.length; i++) {
|
||||
for (let k = 0; k < that.releaseWeb.length; k++) {
|
||||
console.log(data.typeList[i], that.releaseWeb[k].id)
|
||||
if (data.typeList[i] == that.releaseWeb[k].id) {
|
||||
that.releaseWeb[k].checked = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log(data.validityPeriod)
|
||||
if (data.validityPeriod != '' && data.validityPeriod != undefined && data.validityPeriod !=
|
||||
null) {
|
||||
for (let i = 0; i < that.createTimeFromList.length; i++) {
|
||||
console.log('zhixingle', that.createTimeFromList[i].id)
|
||||
if (that.createTimeFromList[i].id == data.validityPeriod) {
|
||||
that.createTimeFromCon = that.createTimeFromList[i].label;
|
||||
that.formData.createTimeFrom = that.createTimeFromList[i].id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
that.formData.reason = data.reason;
|
||||
that.formData.createTimeTo = data.createTime.substring(0, 10);
|
||||
//文件数组
|
||||
let files = data.newsBulletinFiles;
|
||||
for (let val of files) {
|
||||
that.formData.newsBulletinFiles.push({
|
||||
fileId: val.fileId,
|
||||
fileName: val.fileName
|
||||
})
|
||||
//文件下载显示进度用
|
||||
this.$set(this.downFiles, 'downLoadImg' + val.fileId, false);
|
||||
}
|
||||
that.formData.itemInfo.itemName = data.itemInfo.itemName;
|
||||
that.formData.itemInfo.applicationDept = data.itemInfo.applicationDept;
|
||||
that.formData.itemInfo.applicant = data.itemInfo.applicant;
|
||||
|
||||
if (data.itemInfo.eventStatus || data.itemInfo.eventStatus == 0) {
|
||||
this.sta = Number(data.itemInfo.eventStatus)
|
||||
} else {
|
||||
this.sta = null
|
||||
}
|
||||
if (data.itemInfo.eventStatus == 1 || data.itemInfo.eventStatus == 2) {
|
||||
this.btnShow = false;
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: '网络异常, 请求失败',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
onSubmit(type) {
|
||||
if (!this.paramsCheck()) return;
|
||||
|
||||
|
@ -1186,7 +585,19 @@
|
|||
this.selectedtype = this.typeRange[idx].label;
|
||||
this.selectedtypeId = this.typeRange[idx].id;
|
||||
that.formData.leaveType = this.typeRange[idx].id;
|
||||
}
|
||||
},
|
||||
onnodeclick(e) {
|
||||
console.log(e);
|
||||
},
|
||||
onpopupopened(e) {
|
||||
console.log('popupopened');
|
||||
},
|
||||
onpopupclosed(e) {
|
||||
console.log('popupclosed');
|
||||
},
|
||||
onchange(e) {
|
||||
console.log('onchange:', e);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -1196,7 +607,8 @@
|
|||
background-color: #f3fbff;
|
||||
padding-bottom: 227rpx;
|
||||
}
|
||||
/*
|
||||
|
||||
/*
|
||||
>>>.uni-status-bar {
|
||||
height: 0 !important;
|
||||
} */
|
||||
|
@ -1400,7 +812,8 @@
|
|||
}
|
||||
|
||||
/* 主体 */
|
||||
>>>.uni-navbar__header,>>>.uni-status-bar {
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar {
|
||||
background-image: linear-gradient(90deg, #164cc3 0%, #2c6fd9 100%), linear-gradient(#e60012, #e60012) !important;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 730 B |
Loading…
Reference in New Issue