|
@@ -1,10 +1,7 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div>
|
|
<div>
|
|
|
<div>
|
|
<div>
|
|
|
- <Navbar
|
|
|
|
|
- title="编辑任务"
|
|
|
|
|
- :is-go-back="true"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <Navbar title="编辑任务" :is-go-back="true" />
|
|
|
<div v-if="traceDto != null">
|
|
<div v-if="traceDto != null">
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label for="exampleInputEmail1">标题</label>
|
|
<label for="exampleInputEmail1">标题</label>
|
|
@@ -74,14 +71,24 @@
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label>完成时间</label>
|
|
<label>完成时间</label>
|
|
|
- <Date
|
|
|
|
|
|
|
+ <a-locale-provider :locale="locale">
|
|
|
|
|
+ <a-date-picker
|
|
|
|
|
+ v-model:value="planFinishedDate"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ show-time
|
|
|
|
|
+ format="YYYY-MM-DD HH:mm:ss"
|
|
|
|
|
+ :show-now="false"
|
|
|
|
|
+ placeholder="请选择完成日期"
|
|
|
|
|
+ />
|
|
|
|
|
+ </a-locale-provider>
|
|
|
|
|
+ <!-- <Date
|
|
|
v-model="traceDto.planFinishedDate"
|
|
v-model="traceDto.planFinishedDate"
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
- />
|
|
|
|
|
|
|
+ /> -->
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<button
|
|
<button
|
|
|
- style="width:100%;background-color: #007aff;color: white"
|
|
|
|
|
|
|
+ style="width: 100%; background-color: #007aff; color: white"
|
|
|
type="button"
|
|
type="button"
|
|
|
class="btn btn-blue search-button"
|
|
class="btn btn-blue search-button"
|
|
|
@click="updateTrace()"
|
|
@click="updateTrace()"
|
|
@@ -95,7 +102,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
import TraceResource from './TraceResource.js';
|
|
import TraceResource from './TraceResource.js';
|
|
|
-
|
|
|
|
|
|
|
+import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN';
|
|
|
import Common from '../common/Common.js';
|
|
import Common from '../common/Common.js';
|
|
|
import UpladFile from '../widget/UpladFile.js';
|
|
import UpladFile from '../widget/UpladFile.js';
|
|
|
import TraceCommon from './TraceCommon.js';
|
|
import TraceCommon from './TraceCommon.js';
|
|
@@ -106,12 +113,8 @@ import Treeselect from '../widget/TreeSelect.vue';
|
|
|
import AudioField from '../widget/AudioField.vue';
|
|
import AudioField from '../widget/AudioField.vue';
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
UpladFile,
|
|
UpladFile,
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
Treeselect,
|
|
Treeselect,
|
|
|
AudioField,
|
|
AudioField,
|
|
|
},
|
|
},
|
|
@@ -123,10 +126,12 @@ export default {
|
|
|
projectItemUserListUser: [],
|
|
projectItemUserListUser: [],
|
|
|
projectItemUserListProject: [],
|
|
projectItemUserListProject: [],
|
|
|
summernoteInitSuccess: false, // summernote初始化成功
|
|
summernoteInitSuccess: false, // summernote初始化成功
|
|
|
- projectTaskDtos: [],//项目任务时间点
|
|
|
|
|
|
|
+ projectTaskDtos: [], //项目任务时间点
|
|
|
isflag: true,
|
|
isflag: true,
|
|
|
srcArray: [],
|
|
srcArray: [],
|
|
|
loading: false,
|
|
loading: false,
|
|
|
|
|
+ locale: zhCN,
|
|
|
|
|
+ planFinishedDate: '',
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -149,7 +154,6 @@ export default {
|
|
|
this.isflag = false;
|
|
this.isflag = false;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
-
|
|
|
|
|
beforeUnmount: function () {
|
|
beforeUnmount: function () {
|
|
|
if (this.summernoteInitSuccess == true) {
|
|
if (this.summernoteInitSuccess == true) {
|
|
|
$('#summernote').summernote('destroy');
|
|
$('#summernote').summernote('destroy');
|
|
@@ -159,18 +163,18 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
/**
|
|
/**
|
|
|
- * 删除语音
|
|
|
|
|
- * @param {Object} index
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 删除语音
|
|
|
|
|
+ * @param {Object} index
|
|
|
|
|
+ */
|
|
|
deleteAudioSrc: function (index) {
|
|
deleteAudioSrc: function (index) {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
_self.srcArray.splice(index, 1);
|
|
_self.srcArray.splice(index, 1);
|
|
|
_self.traceDto.audioSrcs = JSON.stringify(_self.srcArray);
|
|
_self.traceDto.audioSrcs = JSON.stringify(_self.srcArray);
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
- * 录音停止之后
|
|
|
|
|
- * @param {Object} param
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 录音停止之后
|
|
|
|
|
+ * @param {Object} param
|
|
|
|
|
+ */
|
|
|
handelEndRecord: function (param) {
|
|
handelEndRecord: function (param) {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
if (param.fileName != undefined) {
|
|
if (param.fileName != undefined) {
|
|
@@ -186,8 +190,13 @@ export default {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
_self.traceDto.detail = $('#summernote').summernote('code');
|
|
_self.traceDto.detail = $('#summernote').summernote('code');
|
|
|
_self.traceDto.projectTaskId = _self.$refs.treeSelect.getValue();
|
|
_self.traceDto.projectTaskId = _self.$refs.treeSelect.getValue();
|
|
|
|
|
+ if (_self.planFinishedDate != undefined && _self.planFinishedDate != '') {
|
|
|
|
|
+ _self.traceDto.planFinishedDate = _self.dateConvert(
|
|
|
|
|
+ _self.planFinishedDate,
|
|
|
|
|
+ ); //完成时间
|
|
|
|
|
+ }
|
|
|
if (_self.traceDto.summary != '' && _self.traceDto.summary != undefined) {
|
|
if (_self.traceDto.summary != '' && _self.traceDto.summary != undefined) {
|
|
|
- _self.loading=true;
|
|
|
|
|
|
|
+ _self.loading = true;
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
url: Common.getApiURL('TraceResource/updateTrace'),
|
|
url: Common.getApiURL('TraceResource/updateTrace'),
|
|
|
type: 'post',
|
|
type: 'post',
|
|
@@ -198,11 +207,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
success: function (data) {
|
|
success: function (data) {
|
|
|
Notify.success('提示', '修改成功!');
|
|
Notify.success('提示', '修改成功!');
|
|
|
- _self.loading=false;
|
|
|
|
|
|
|
+ _self.loading = false;
|
|
|
_self.back();
|
|
_self.back();
|
|
|
},
|
|
},
|
|
|
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
- _self.loading=false;
|
|
|
|
|
|
|
+ _self.loading = false;
|
|
|
Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
@@ -211,69 +220,80 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- //图片上传
|
|
|
|
|
|
|
+ //图片上传
|
|
|
sendFile: function (file, editor, $editable) {
|
|
sendFile: function (file, editor, $editable) {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
- UpladFile.photoCompress(file, {
|
|
|
|
|
- quality: 0.2,
|
|
|
|
|
- }, function (base64Codes) {
|
|
|
|
|
- var bl = UpladFile.convertBase64UrlToBlob(base64Codes);
|
|
|
|
|
- var rst = new FormData();
|
|
|
|
|
- rst.append('images', bl, 'file_' + Date.parse(new Date()) + '.jpg');
|
|
|
|
|
- rst.append('className', _self.className);
|
|
|
|
|
- $.ajax({
|
|
|
|
|
- url: Common.getApiURL('file/imageUpload'),
|
|
|
|
|
- type: 'post',
|
|
|
|
|
- data: rst,
|
|
|
|
|
- contentType: false,
|
|
|
|
|
- processData: false,
|
|
|
|
|
- beforeSend: function (request) {
|
|
|
|
|
- Common.addTokenToRequest(request);
|
|
|
|
|
- },
|
|
|
|
|
- success: function (data) {
|
|
|
|
|
- if (data != 'error') {
|
|
|
|
|
- var imageName = data.substring(data.indexOf(':') + 1);
|
|
|
|
|
- // 方法1: 直接插入图片,由于图片不能加载,导致导致插入失败。
|
|
|
|
|
- // $("#summernote").summernote('insertImage', Common.getResourceUrl("image", _self.className, imageName), 'image name');
|
|
|
|
|
|
|
+ UpladFile.photoCompress(
|
|
|
|
|
+ file,
|
|
|
|
|
+ {
|
|
|
|
|
+ quality: 0.2,
|
|
|
|
|
+ },
|
|
|
|
|
+ function (base64Codes) {
|
|
|
|
|
+ var bl = UpladFile.convertBase64UrlToBlob(base64Codes);
|
|
|
|
|
+ var rst = new FormData();
|
|
|
|
|
+ rst.append('images', bl, 'file_' + Date.parse(new Date()) + '.jpg');
|
|
|
|
|
+ rst.append('className', _self.className);
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ url: Common.getApiURL('file/imageUpload'),
|
|
|
|
|
+ type: 'post',
|
|
|
|
|
+ data: rst,
|
|
|
|
|
+ contentType: false,
|
|
|
|
|
+ processData: false,
|
|
|
|
|
+ beforeSend: function (request) {
|
|
|
|
|
+ Common.addTokenToRequest(request);
|
|
|
|
|
+ },
|
|
|
|
|
+ success: function (data) {
|
|
|
|
|
+ if (data != 'error') {
|
|
|
|
|
+ var imageName = data.substring(data.indexOf(':') + 1);
|
|
|
|
|
+ // 方法1: 直接插入图片,由于图片不能加载,导致导致插入失败。
|
|
|
|
|
+ // $("#summernote").summernote('insertImage', Common.getResourceUrl("image", _self.className, imageName), 'image name');
|
|
|
|
|
|
|
|
- // 方法2:创建img节点,然后插入<img>节点,可以插入,但是图片没有显示,点击一下code,然后就显示了。
|
|
|
|
|
- // var node = document.createElement('img') // 创建节点,用于包裹视频,再加这一层是方便调视频样式
|
|
|
|
|
- // node.setAttribute("authSrc", Common.getResourceUrl("image", _self.className, imageName));
|
|
|
|
|
- // node.setAttribute("is", "auth-img");
|
|
|
|
|
- // $("#summernote").summernote('insertNode', node);
|
|
|
|
|
|
|
+ // 方法2:创建img节点,然后插入<img>节点,可以插入,但是图片没有显示,点击一下code,然后就显示了。
|
|
|
|
|
+ // var node = document.createElement('img') // 创建节点,用于包裹视频,再加这一层是方便调视频样式
|
|
|
|
|
+ // node.setAttribute("authSrc", Common.getResourceUrl("image", _self.className, imageName));
|
|
|
|
|
+ // node.setAttribute("is", "auth-img");
|
|
|
|
|
+ // $("#summernote").summernote('insertNode', node);
|
|
|
|
|
|
|
|
- // 方法3:重新给code赋值,此时丢失了鼠标焦点,此时不满足要求。
|
|
|
|
|
- // var get_code = $('#summernote').summernote('code');
|
|
|
|
|
- // $('#summernote').summernote('code', get_code);
|
|
|
|
|
|
|
+ // 方法3:重新给code赋值,此时丢失了鼠标焦点,此时不满足要求。
|
|
|
|
|
+ // var get_code = $('#summernote').summernote('code');
|
|
|
|
|
+ // $('#summernote').summernote('code', get_code);
|
|
|
|
|
|
|
|
- // 方法4:插入文本(尝试失败)
|
|
|
|
|
- //let imageText = "<img is='auth-img' authSrc='" + Common.getResourceUrl("image", _self.className, imageName) + "'/>";
|
|
|
|
|
- //$('#summernote').summernote('insertText', imageText);
|
|
|
|
|
|
|
+ // 方法4:插入文本(尝试失败)
|
|
|
|
|
+ //let imageText = "<img is='auth-img' authSrc='" + Common.getResourceUrl("image", _self.className, imageName) + "'/>";
|
|
|
|
|
+ //$('#summernote').summernote('insertText', imageText);
|
|
|
|
|
|
|
|
- // 方法5: 插入div,div中嵌入img,测试OK
|
|
|
|
|
- // var node = document.createElement('div') // 创建节点,用于包裹视频,再加这一层是方便调视频样式
|
|
|
|
|
- // node.innerHTML = "<img is='auth-img' authSrc='" + Common.getResourceUrl("image", _self.className, imageName) + "' />";
|
|
|
|
|
- // $("#summernote").summernote('insertNode', node);
|
|
|
|
|
- $('#summernote').summernote('insertImage', Common.getResourceUrl('image', _self.className, imageName), 'image name');
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- error: function () {
|
|
|
|
|
- Notify.error('提示', '上传失败!');
|
|
|
|
|
- return;
|
|
|
|
|
- },
|
|
|
|
|
- });
|
|
|
|
|
- return rst.file;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ // 方法5: 插入div,div中嵌入img,测试OK
|
|
|
|
|
+ // var node = document.createElement('div') // 创建节点,用于包裹视频,再加这一层是方便调视频样式
|
|
|
|
|
+ // node.innerHTML = "<img is='auth-img' authSrc='" + Common.getResourceUrl("image", _self.className, imageName) + "' />";
|
|
|
|
|
+ // $("#summernote").summernote('insertNode', node);
|
|
|
|
|
+ $('#summernote').summernote(
|
|
|
|
|
+ 'insertImage',
|
|
|
|
|
+ Common.getResourceUrl('image', _self.className, imageName),
|
|
|
|
|
+ 'image name',
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ error: function () {
|
|
|
|
|
+ Notify.error('提示', '上传失败!');
|
|
|
|
|
+ return;
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ return rst.file;
|
|
|
|
|
+ },
|
|
|
|
|
+ );
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 初始化项目
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 初始化项目
|
|
|
|
|
+ */
|
|
|
initProject: function () {
|
|
initProject: function () {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
- _self.projectItemUserListProject.splice(0, _self.projectItemUserListProject.length);
|
|
|
|
|
|
|
+ _self.projectItemUserListProject.splice(
|
|
|
|
|
+ 0,
|
|
|
|
|
+ _self.projectItemUserListProject.length,
|
|
|
|
|
+ );
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
- url: Common.getApiURL('ProjectItemUserResource/listByUserId'),//通过用户Id查找有权操作的项目
|
|
|
|
|
|
|
+ url: Common.getApiURL('ProjectItemUserResource/listByUserId'), //通过用户Id查找有权操作的项目
|
|
|
type: 'get',
|
|
type: 'get',
|
|
|
dataType: 'json',
|
|
dataType: 'json',
|
|
|
contentType: 'application/json',
|
|
contentType: 'application/json',
|
|
@@ -292,26 +312,28 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 项目选择
|
|
|
|
|
- * @author ZhangTeng 20190213
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 项目选择
|
|
|
|
|
+ * @author ZhangTeng 20190213
|
|
|
|
|
+ */
|
|
|
changeProjectSelected: function () {
|
|
changeProjectSelected: function () {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
var count = 0;
|
|
var count = 0;
|
|
|
- _self.projectItemUserListUser.splice(0, _self.projectItemUserListUser.length);
|
|
|
|
|
|
|
+ _self.projectItemUserListUser.splice(
|
|
|
|
|
+ 0,
|
|
|
|
|
+ _self.projectItemUserListUser.length,
|
|
|
|
|
+ );
|
|
|
|
|
|
|
|
if (_self.traceDto == null || _self.traceDto.projectId == null) {
|
|
if (_self.traceDto == null || _self.traceDto.projectId == null) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
- url: Common.getApiURL('ProjectItemUserResource/listByProjectItemId'),//通过项目Id查找有权操作的项目的用户
|
|
|
|
|
|
|
+ url: Common.getApiURL('ProjectItemUserResource/listByProjectItemId'), //通过项目Id查找有权操作的项目的用户
|
|
|
type: 'get',
|
|
type: 'get',
|
|
|
dataType: 'json',
|
|
dataType: 'json',
|
|
|
contentType: 'application/json',
|
|
contentType: 'application/json',
|
|
|
- data: { 'projectItemId': _self.traceDto.projectId },
|
|
|
|
|
|
|
+ data: { projectItemId: _self.traceDto.projectId },
|
|
|
beforeSend: function (request) {
|
|
beforeSend: function (request) {
|
|
|
Common.addTokenToRequest(request);
|
|
Common.addTokenToRequest(request);
|
|
|
},
|
|
},
|
|
@@ -332,48 +354,80 @@ export default {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
_self.traceId = this.$route.params.traceId;
|
|
_self.traceId = this.$route.params.traceId;
|
|
|
if (_self.traceId != null && _self.traceId != '') {
|
|
if (_self.traceId != null && _self.traceId != '') {
|
|
|
- TraceResource.uniqueByTraceId(_self.traceId).then(successData => {
|
|
|
|
|
- _self.traceDto = successData;
|
|
|
|
|
- if (successData != undefined && successData.audioSrcs != undefined) {
|
|
|
|
|
- _self.srcArray = JSON.parse(successData.audioSrcs);
|
|
|
|
|
- }
|
|
|
|
|
- _self.changeProjectSelected();
|
|
|
|
|
- $('#summernote').summernote({
|
|
|
|
|
- toolbar: [
|
|
|
|
|
- ['insert', ['link', 'picture', 'video', 'audio', 'hr', 'table', //插件
|
|
|
|
|
- 'fontname', 'fontsize', 'color', 'bold', 'italic', 'underline', 'strikethrough', 'clear',//字体样式
|
|
|
|
|
- 'style', 'ol', 'ul', 'paragraph', 'height',//段落样式
|
|
|
|
|
- 'fullscreen', 'codeview', 'undo', 'redo', 'help',//Misc
|
|
|
|
|
- ]],
|
|
|
|
|
- ],
|
|
|
|
|
- height: 400,
|
|
|
|
|
- minHeight: 300,
|
|
|
|
|
- maxHeight: 500,
|
|
|
|
|
- focus: true,
|
|
|
|
|
- lang: 'zh-CN',
|
|
|
|
|
- callbacks: {
|
|
|
|
|
- onImageUpload: function (files, editor, $editable) {
|
|
|
|
|
- _self.sendFile(files[0], editor, $editable);
|
|
|
|
|
|
|
+ TraceResource.uniqueByTraceId(_self.traceId).then(
|
|
|
|
|
+ successData => {
|
|
|
|
|
+ _self.traceDto = successData;
|
|
|
|
|
+ if (
|
|
|
|
|
+ successData != undefined &&
|
|
|
|
|
+ successData.audioSrcs != undefined
|
|
|
|
|
+ ) {
|
|
|
|
|
+ _self.srcArray = JSON.parse(successData.audioSrcs);
|
|
|
|
|
+ }
|
|
|
|
|
+ _self.changeProjectSelected();
|
|
|
|
|
+ $('#summernote').summernote({
|
|
|
|
|
+ toolbar: [
|
|
|
|
|
+ [
|
|
|
|
|
+ 'insert',
|
|
|
|
|
+ [
|
|
|
|
|
+ 'link',
|
|
|
|
|
+ 'picture',
|
|
|
|
|
+ 'video',
|
|
|
|
|
+ 'audio',
|
|
|
|
|
+ 'hr',
|
|
|
|
|
+ 'table', //插件
|
|
|
|
|
+ 'fontname',
|
|
|
|
|
+ 'fontsize',
|
|
|
|
|
+ 'color',
|
|
|
|
|
+ 'bold',
|
|
|
|
|
+ 'italic',
|
|
|
|
|
+ 'underline',
|
|
|
|
|
+ 'strikethrough',
|
|
|
|
|
+ 'clear', //字体样式
|
|
|
|
|
+ 'style',
|
|
|
|
|
+ 'ol',
|
|
|
|
|
+ 'ul',
|
|
|
|
|
+ 'paragraph',
|
|
|
|
|
+ 'height', //段落样式
|
|
|
|
|
+ 'fullscreen',
|
|
|
|
|
+ 'codeview',
|
|
|
|
|
+ 'undo',
|
|
|
|
|
+ 'redo',
|
|
|
|
|
+ 'help', //Misc
|
|
|
|
|
+ ],
|
|
|
|
|
+ ],
|
|
|
|
|
+ ],
|
|
|
|
|
+ height: 400,
|
|
|
|
|
+ minHeight: 300,
|
|
|
|
|
+ maxHeight: 500,
|
|
|
|
|
+ focus: true,
|
|
|
|
|
+ lang: 'zh-CN',
|
|
|
|
|
+ callbacks: {
|
|
|
|
|
+ onImageUpload: function (files, editor, $editable) {
|
|
|
|
|
+ _self.sendFile(files[0], editor, $editable);
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
- },
|
|
|
|
|
- });
|
|
|
|
|
- if (_self.traceDto != null) {
|
|
|
|
|
- $('#summernote').summernote('code', _self.traceDto.detail);
|
|
|
|
|
- }
|
|
|
|
|
- _self.summernoteInitSuccess = true;
|
|
|
|
|
- }, errorData => {
|
|
|
|
|
- Common.processException(errorData);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+ if (_self.traceDto != null) {
|
|
|
|
|
+ $('#summernote').summernote('code', _self.traceDto.detail);
|
|
|
|
|
+ }
|
|
|
|
|
+ _self.summernoteInitSuccess = true;
|
|
|
|
|
+ },
|
|
|
|
|
+ errorData => {
|
|
|
|
|
+ Common.processException(errorData);
|
|
|
|
|
+ },
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
- * 根据项目id查询项目任务时间节点
|
|
|
|
|
- * @author GuoZhiBo 20191010
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 根据项目id查询项目任务时间节点
|
|
|
|
|
+ * @author GuoZhiBo 20191010
|
|
|
|
|
+ */
|
|
|
queryProjectTaskDtoByProjectId: function () {
|
|
queryProjectTaskDtoByProjectId: function () {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
- url: Common.getApiURL('ProjectTaskResource/queryProjectTaskDtoByProjectId'),
|
|
|
|
|
|
|
+ url: Common.getApiURL(
|
|
|
|
|
+ 'ProjectTaskResource/queryProjectTaskDtoByProjectId',
|
|
|
|
|
+ ),
|
|
|
type: 'get',
|
|
type: 'get',
|
|
|
dataType: 'json',
|
|
dataType: 'json',
|
|
|
contentType: 'application/json',
|
|
contentType: 'application/json',
|
|
@@ -392,10 +446,36 @@ export default {
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ // 日期处理函数
|
|
|
|
|
+ plusZero: function (n) {
|
|
|
|
|
+ return n >= 10 ? n : '0' + n;
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ dateConvert: function (dateStr) {
|
|
|
|
|
+ const date = new Date(dateStr);
|
|
|
|
|
+ const year = date.getFullYear();
|
|
|
|
|
+ const month = date.getMonth() + 1;
|
|
|
|
|
+ const day = date.getDate();
|
|
|
|
|
+ const hour = date.getHours();
|
|
|
|
|
+ const minute = date.getMinutes();
|
|
|
|
|
+ const second = date.getSeconds();
|
|
|
|
|
+ return (
|
|
|
|
|
+ year +
|
|
|
|
|
+ '-' +
|
|
|
|
|
+ this.plusZero(month) +
|
|
|
|
|
+ '-' +
|
|
|
|
|
+ this.plusZero(day) +
|
|
|
|
|
+ ' ' +
|
|
|
|
|
+ this.plusZero(hour) +
|
|
|
|
|
+ ':' +
|
|
|
|
|
+ this.plusZero(minute) +
|
|
|
|
|
+ ':' +
|
|
|
|
|
+ this.plusZero(second)
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
-
|
|
|
|
|
</style>
|
|
</style>
|