const tenderListSpec = (function(){
function getTenderNodeHtml(node, arr, pid) {
const html = [];
html.push('
');
// 名称
html.push('');
if (node.cid) {
html.push(' ');
html.push((node.level === 1 ? '' : ''), node.name, (node.level === 1 ? '' : ''));
} else {
html.push('');
html.push(arr.indexOf(node) === arr.length - 1 ? '└' : '├');
html.push('');
html.push('', node.name, '');
}
html.push(' | ');
// 创建人
html.push('', node.user_name, ' | ');
// 创建时间
html.push('', node.create_time ? moment(node.create_time).format('YYYY-MM-DD HH:mm:ss') : '', ' | ');
// 完成期数
html.push('');
if (!node.cid) {
if (node.progress) {
html.push(node.progress.title);
} else {
html.push(node.lastStage ? '第' + node.lastStage.order + '期' : '第0期');
}
}
html.push(' | ');
// 管理
html.push('');
if (!node.cid) {
html.push('编辑');
const hasStage = node.progress ? node.stage_count > 0 : !!node.lastStage;
if (!hasStage) {
html.push('删除');
} else {
html.push('');
}
if (cache) html.push(`更新缓存`);
}
html.push(' | ');
html.push('
');
return html.join('');
}
function getTenderTreeHeaderHtml() {
const html = [];
html.push('