上传代码

master 智信云管理系统V1.0
e 3 years ago
parent bd19571934
commit 33e958c4de
  1. 162
      package-lock.json
  2. 235
      src/views/title/Addtitle.vue

162
package-lock.json generated

@ -2029,16 +2029,6 @@
"integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=", "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=",
"dev": true "dev": true
}, },
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz",
"integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"cacache": { "cacache": {
"version": "13.0.1", "version": "13.0.1",
"resolved": "https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1594428010987&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz", "resolved": "https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1594428010987&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz",
@ -2065,34 +2055,6 @@
"unique-filename": "^1.1.1" "unique-filename": "^1.1.1"
} }
}, },
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.nlark.com/chalk/download/chalk-4.1.2.tgz?cache=0&sync_timestamp=1627646697260&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.2.tgz",
"integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz",
"integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz",
"integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=",
"dev": true,
"optional": true
},
"find-cache-dir": { "find-cache-dir": {
"version": "3.3.1", "version": "3.3.1",
"resolved": "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-3.3.1.tgz", "resolved": "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-3.3.1.tgz",
@ -2114,13 +2076,6 @@
"path-exists": "^4.0.0" "path-exists": "^4.0.0"
} }
}, },
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz",
"integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=",
"dev": true,
"optional": true
},
"locate-path": { "locate-path": {
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-5.0.0.tgz", "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-5.0.0.tgz",
@ -2210,16 +2165,6 @@
"minipass": "^3.1.1" "minipass": "^3.1.1"
} }
}, },
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.nlark.com/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1626703414084&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz",
"integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"terser-webpack-plugin": { "terser-webpack-plugin": {
"version": "2.3.8", "version": "2.3.8",
"resolved": "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-2.3.8.tgz?cache=0&sync_timestamp=1603881757308&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-2.3.8.tgz", "resolved": "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-2.3.8.tgz?cache=0&sync_timestamp=1603881757308&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-2.3.8.tgz",
@ -2236,32 +2181,6 @@
"terser": "^4.6.12", "terser": "^4.6.12",
"webpack-sources": "^1.4.3" "webpack-sources": "^1.4.3"
} }
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/download/vue-loader-16.8.3.tgz",
"integrity": "sha1-1D5nXe9bqTRdbH8FkUwT2GGZcIc=",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/loader-utils/download/loader-utils-2.0.2.tgz?cache=0&sync_timestamp=1636039915957&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Floader-utils%2Fdownload%2Floader-utils-2.0.2.tgz",
"integrity": "sha1-1uO0+4GHByGuTghoqxHdY4NowSk=",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
}
}
} }
} }
}, },
@ -12836,6 +12755,87 @@
} }
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/download/vue-loader-16.8.3.tgz",
"integrity": "sha1-1D5nXe9bqTRdbH8FkUwT2GGZcIc=",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz",
"integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/download/chalk-4.1.2.tgz",
"integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz",
"integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz",
"integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz",
"integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=",
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/loader-utils/download/loader-utils-2.0.2.tgz?cache=0&sync_timestamp=1636687869321&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Floader-utils%2Fdownload%2Floader-utils-2.0.2.tgz",
"integrity": "sha1-1uO0+4GHByGuTghoqxHdY4NowSk=",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/supports-color/download/supports-color-7.2.0.tgz",
"integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-quill-editor": { "vue-quill-editor": {
"version": "3.0.6", "version": "3.0.6",
"resolved": "https://registry.npm.taobao.org/vue-quill-editor/download/vue-quill-editor-3.0.6.tgz", "resolved": "https://registry.npm.taobao.org/vue-quill-editor/download/vue-quill-editor-3.0.6.tgz",

@ -9,77 +9,41 @@
</div> </div>
<div class="contentbottom"> <div class="contentbottom">
<el-form :model="photoForm" :rules="rules" ref="photoForm"> <el-form :model="photoForm" :rules="rules" ref="photoForm">
<el-form-item <el-form-item label="封面图" :label-width="formLabelWidth" prop="bgImgUrl">
label="封面图"
:label-width="formLabelWidth"
prop="bgImgUrl"
>
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
:action="joggle" :action="joggle"
:show-file-list="false" :show-file-list="false"
:on-success="handlePhotoSuccess" :on-success="handlePhotoSuccess"
:before-upload="beforeAvatarUpload" :before-upload="beforeAvatarUpload">
> <img v-if="photoForm.bgImgUrl" :src="photoForm.bgImgUrl" class="avatar" width="200px"/>
<img
v-if="photoForm.bgImgUrl"
:src="photoForm.bgImgUrl"
class="avatar"
width="200px"
/>
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
<!-- <img id="preview" :src="imageUrl" width="250px" height="60px"/> <!-- <img id="preview" :src="imageUrl" width="250px" height="60px"/>
<a href="javascript:;" class="file gradient"> <a href="javascript:;" class="file gradient">
<input id="pop_file" type="file" accept=".jpg,.jpeg,.png" v-on:change="uploadFile($event)" name="fileTrans" ref="file" value="" />选择文件</a> --> <input id="pop_file" type="file" accept=".jpg,.jpeg,.png" v-on:change="uploadFile($event)" name="fileTrans" ref="file" value="" />选择文件</a> -->
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="文章标题" :label-width="formLabelWidth" prop="title">
label="文章标题"
:label-width="formLabelWidth"
prop="title"
>
<el-input v-model="photoForm.title" autocomplete="off"></el-input> <el-input v-model="photoForm.title" autocomplete="off"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="日期" :label-width="formLabelWidth"> <el-form-item label="日期" :label-width="formLabelWidth">
<el-col> <el-col>
<el-date-picker <el-date-picker type="date" placeholder="选择日期" v-model="photoForm.createTime" style="width: 100%;"></el-date-picker>
type="date"
placeholder="选择日期"
v-model="photoForm.createTime"
style="width: 100%;"
></el-date-picker>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="来源" :label-width="formLabelWidth" prop="description">
label="来源" <el-input v-model="photoForm.description" autocomplete="off"></el-input>
:label-width="formLabelWidth"
prop="description"
>
<el-input
v-model="photoForm.description"
autocomplete="off"
></el-input>
</el-form-item> </el-form-item>
<!-- <quill-editor v-model="form.content" ref="myQuillEditor" style="height: 300px;" :options="editorOption"> <el-form-item label="文章内容" :label-width="formLabelWidth" prop="textContent">
</quill-editor> -->
<!-- <editor-bar v-model="detail" :isClear="isClear" @change="change"></editor-bar> -->
<el-form-item
label="文章内容"
:label-width="formLabelWidth"
prop="textContent"
>
<quill-editor <quill-editor
ref="text" ref="text"
v-model="photoForm.textContent" v-model="photoForm.textContent"
class="myQuillEditor" class="myQuillEditor"
:options="editorOption" :options="editorOption"/>
/>
</el-form-item> </el-form-item>
<div class="footer"> <div class="footer">
<el-button type="primary" @click="photoAdd('photoForm')" <el-button type="primary" @click="photoAdd('photoForm')">确认</el-button>
>确认</el-button
>
<el-button type="info" @click="cancel()">取消</el-button> <el-button type="info" @click="cancel()">取消</el-button>
</div> </div>
</el-form> </el-form>
@ -94,59 +58,24 @@
</div> </div>
<div class="contentbottom"> <div class="contentbottom">
<el-form :model="videoForm" :rules="rules" ref="videoForm"> <el-form :model="videoForm" :rules="rules" ref="videoForm">
<el-form-item <el-form-item label="封面图" :label-width="formLabelWidth" prop="bgImgUrl">
label="封面图" <el-upload class="avatar-uploader" :action="joggle" :show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
:label-width="formLabelWidth" <img v-if="videoForm.bgImgUrl" :src="videoForm.bgImgUrl" class="avatar" width="200px"/>
prop="bgImgUrl"
>
<el-upload
class="avatar-uploader"
:action="joggle"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
>
<img
v-if="videoForm.bgImgUrl"
:src="videoForm.bgImgUrl"
class="avatar"
width="200px"
/>
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="文章标题" :label-width="formLabelWidth" prop="title">
label="文章标题"
:label-width="formLabelWidth"
prop="title"
>
<el-input v-model="videoForm.title" autocomplete="off"></el-input> <el-input v-model="videoForm.title" autocomplete="off"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="日期" :label-width="formLabelWidth"> <el-form-item label="日期" :label-width="formLabelWidth">
<el-col> <el-col>
<el-date-picker <el-date-picker type="date" placeholder="选择日期" v-model="videoForm.createTime" style="width: 100%;"></el-date-picker>
type="date"
placeholder="选择日期"
v-model="videoForm.createTime"
style="width: 100%;"
></el-date-picker>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="来源" :label-width="formLabelWidth" prop="description">
label="来源" <el-input v-model="videoForm.description" autocomplete="off"></el-input>
:label-width="formLabelWidth"
prop="description"
>
<el-input
v-model="videoForm.description"
autocomplete="off"
></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="视频" :label-width="formLabelWidth" prop="videoUrl">
label="视频"
:label-width="formLabelWidth"
prop="videoUrl"
>
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
:action="joggle" :action="joggle"
@ -154,44 +83,17 @@
v-bind:on-progress="uploadVideoProcess" v-bind:on-progress="uploadVideoProcess"
v-bind:on-success="handleVideoSuccess" v-bind:on-success="handleVideoSuccess"
v-bind:before-upload="beforeUploadVideo" v-bind:before-upload="beforeUploadVideo"
v-bind:show-file-list="false" v-bind:show-file-list="false">
> <video v-if="videoForm.videoUrl != '' && !videoFlag" v-bind:src="videoForm.videoUrl" class="avatar video-avatar" controls="controls">您的浏览器不支持视频播放</video>
<video <i v-else-if="videoForm.videoUrl == '' && !videoFlag" class="el-icon-plus avatar-uploader-icon"></i>
v-if="videoForm.videoUrl != '' && !videoFlag" <el-progress v-if="videoFlag == true" type="circle" v-bind:percentage="videoUploadPercent" style="margin-top:7px;"></el-progress>
v-bind:src="videoForm.videoUrl"
class="avatar video-avatar"
controls="controls"
>
您的浏览器不支持视频播放
</video>
<i
v-else-if="videoForm.videoUrl == '' && !videoFlag"
class="el-icon-plus avatar-uploader-icon"
></i>
<el-progress
v-if="videoFlag == true"
type="circle"
v-bind:percentage="videoUploadPercent"
style="margin-top:7px;"
></el-progress>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="文章内容" :label-width="formLabelWidth" prop="textContent">
label="文章内容" <quill-editor ref="text" v-model="videoForm.textContent" class="myQuillEditor" :options="editorOption"/>
:label-width="formLabelWidth"
prop="textContent"
>
<quill-editor
ref="text"
v-model="videoForm.textContent"
class="myQuillEditor"
:options="editorOption"
/>
</el-form-item> </el-form-item>
<div class="footer"> <div class="footer">
<el-button type="primary" @click="videoAdd('videoForm')" <el-button type="primary" @click="videoAdd('videoForm')">确认</el-button>
>确认</el-button
>
<el-button type="info" @click="cancel()">取消</el-button> <el-button type="info" @click="cancel()">取消</el-button>
</div> </div>
</el-form> </el-form>
@ -206,100 +108,39 @@
</div> </div>
<div class="contentbottom"> <div class="contentbottom">
<el-form :model="linkForm" :rules="rules" ref="linkForm"> <el-form :model="linkForm" :rules="rules" ref="linkForm">
<el-form-item <el-form-item label="封面图" :label-width="formLabelWidth" prop="bgImgUrl">
label="封面图" <el-upload class="avatar-uploader" :action="joggle" :show-file-list="false" :on-success="handleLinkSuccess" :before-upload="beforeAvatarUpload">
:label-width="formLabelWidth" <img v-if="linkForm.bgImgUrl" :src="linkForm.bgImgUrl" class="avatar" width="200px"/>
prop="bgImgUrl"
>
<el-upload
class="avatar-uploader"
:action="joggle"
:show-file-list="false"
:on-success="handleLinkSuccess"
:before-upload="beforeAvatarUpload"
>
<img
v-if="linkForm.bgImgUrl"
:src="linkForm.bgImgUrl"
class="avatar"
width="200px"
/>
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item label="日期" :label-width="formLabelWidth"> <el-form-item label="日期" :label-width="formLabelWidth">
<el-col> <el-col>
<el-date-picker <el-date-picker type="date" placeholder="选择日期" v-model="linkForm.createTime" style="width: 100%;"></el-date-picker>
type="date"
placeholder="选择日期"
v-model="linkForm.createTime"
style="width: 100%;"
></el-date-picker>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="连接类型" :label-width="formLabelWidth" prop="linkType">
label="连接类型"
:label-width="formLabelWidth"
prop="linkType"
>
<el-radio-group v-model="linkForm.linkType"> <el-radio-group v-model="linkForm.linkType">
<el-radio :label="0">站内链接</el-radio> <el-radio :label="0">站内链接</el-radio>
<el-radio :label="1">站外链接</el-radio> <el-radio :label="1">站外链接</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item <el-form-item prop="value" label="站内链接" :label-width="formLabelWidth" v-if="linkForm.linkType == 0">
prop="value" <el-cascader :change-on-select="true" :props="defaultParams" :options="options" v-model="value" @change="handleChange" :clearable="true"></el-cascader>
label="站内链接"
:label-width="formLabelWidth"
v-if="linkForm.linkType == 0"
>
<el-cascader
:change-on-select="true"
:props="defaultParams"
:options="options"
v-model="value"
@change="handleChange"
:clearable="true"
></el-cascader>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="文章" :label-width="formLabelWidth" v-if="linkForm.linkType == 0" prop="linkArticleId">
label="文章"
:label-width="formLabelWidth"
v-if="linkForm.linkType == 0"
prop="linkArticleId"
>
<el-select v-model="linkForm.linkArticleId" placeholder="请选择"> <el-select v-model="linkForm.linkArticleId" placeholder="请选择">
<el-option <el-option v-for="item in option" :key="item.value" :label="item.label" :value="item.value"></el-option>
v-for="item in option"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item prop="linkUrl" label="站外链接" :label-width="formLabelWidth" v-if="linkForm.linkType == 1">
prop="linkUrl" <el-input v-model="linkForm.linkUrl" placeholder="请输入链接"></el-input>
label="站外链接"
:label-width="formLabelWidth"
v-if="linkForm.linkType == 1"
>
<el-input
v-model="linkForm.linkUrl"
placeholder="请输入链接"
></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="文章标题" :label-width="formLabelWidth" prop="title">
label="文章标题"
:label-width="formLabelWidth"
prop="title"
>
<el-input v-model="linkForm.title" autocomplete="off"></el-input> <el-input v-model="linkForm.title" autocomplete="off"></el-input>
</el-form-item> </el-form-item>
<div class="footer"> <div class="footer">
<el-button type="primary" @click="linkAdd('linkForm')" <el-button type="primary" @click="linkAdd('linkForm')">确认</el-button>
>确认</el-button
>
<el-button type="info" @click="cancel()">取消</el-button> <el-button type="info" @click="cancel()">取消</el-button>
</div> </div>
</el-form> </el-form>

Loading…
Cancel
Save